Ethernet Products
Determine ramifications of Intel® Ethernet products and technologies
4810 Discussions

How do setup MAC loopback on 82599EB

AChak7
Beginner
2,008 Views

Hi,

I'd like to setup MAC loopback for a NIC interface? I attempted to modify (IXGBE) linux kernel driver to setup the loop back. Apparently, the kernel crashes with Tx hang detected with timeout.

The watchdog timer kicks in.

a) NIC is not connected to any SFP+. Thus, link does not come up. I'd like to setup MAC loopback (tx <--> rx).

1) i run the "ethtool -t enp4s0f1" to setup mac loop back.

Action: I commented out the loop back run and loop back clear after setting up the loop back as I'd like to keep the MAC loop back persistent.

Therefore, I commented out (ixgbe_run_loopback_test) and ixgbe_loopback_cleanup in the function ixgbe_loopback_test in ixgbe_ethtool.c

ethtool -t enp4s0f1

# ethtool -t enp4s0f1

The test result is PASS

The test extra info:

Register test (offline) 0

Eeprom test (offline) 0

Interrupt test (offline) 0

Loopback test (offline) 0

Link test (on/offline) 1

Then, in the kernel log (dmesg), The link comes back up for the interface (enp4s0f1) and kernel panics.

I also attempted to port DPDK loopback driver patch into linux kernel ixgbe driver (ixgbe-5.0.4). But, I'm still having issues with it.

Can you please tell me what needs to be done? Do you have linux kernel patch associated with it?

This is the patch that needs to be ported to Linux kernel driver.

DPDK Patch http://dpdk.org/browse/dpdk/commit/?id=db035925617 dpdk - Data Plane Development Kit

I'd appreciate if you could provide me the kernel patch or work around to this problem?

Thanks

Chakri

dmesg

-------

[ 2015.712158] ixgbe 0000:04:00.1 enp4s0f1: loopback testing starting

[ 2015.734989] ==> [ixgbe_setup_loopback_test] adapter enp4s0f1 orig_autoc = 0xC09C6084 hlreg=0x800afff

[ 2015.759805] ==> [ixgbe_setup_loopback_test] adapter enp4s0f1 wrote autoc = 0xC09C6085

[ 2015.759942] ixgbe 0000:04:00.1 enp4s0f1: NIC Link is Up 10 Gbps, Flow Control: RX/TX

[ 2020.125844] IPv6: ADDRCONF(NETDEV_CHANGE): enp4s0f1: link becomes ready

[ 2025.627124] ------------[ cut here ]------------

[ 2025.643280] WARNING: CPU: 1 PID: 22 at net/sched/sch_generic.c:306 dev_watchdog+0x246/0x250()

[ 2025.667460] NETDEV WATCHDOG: enp4s0f1 (ixgbe): transmit queue 1 timed out

[ 2025.688363] Modules linked in: ixgbe(O) vhost_net vhost macvtap macvlan tun xfs nbd vxlan ip6_udp_tunnel udp_tunnel binfmt_misc deflate twofish_generic twofish_avx_x86_64 twofish_x86_64_3way twofish_x86_64 twofish_common camellia_generic camellia_aesni_avx2 camellia_aesni_avx_x86_64 camellia_x86_64 serpent_avx2 serpent_avx_x86_64 serpent_sse2_x86_64 xts serpent_generic blowfish_generic blowfish_x86_64 blowfish_common cast5_avx_x86_64 cast5_generic cast_common des_generic cmac xcbc rmd160 sha512_ssse3 sha512_generic af_key rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache bonding vfat fat intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul aesni_intel lrw gf128mul glue_helper ablk_helper cryptd sb_edac edac_core sg 8250_fintek ipmi_si ipmi_msghandler acpi_power_meter shpchp

[ 2025.964187] CPU: 1 PID: 22 Comm: ktimersoftd/1 Tainted: G O4.4.27-rt37 # 1

[ 2025.964188] Hardware name: Wiwynn SV7220G2-V 81.B0F01.007G/SV7220G2 MB, BIOS LP4B_V02 07/20/2015

[ 2025.964193] 0000000000000286 0000000088422274 ffff881feaa37c68 ffffffff81342f20

[ 2025.964196] ffff881feaa37cb0 0000000000000009 ffff881feaa37ca0 ffffffff81081b72

[ 2025.964198] 0000000000000001 0000000000000001 ffff881ec89c7b00 ffff881ec8ae0000

[ 2025.964199] Call Trace:

[ 2025.964209] [] dump_stack+0x65/0x85

[ 2025.964215] [] warn_slowpath_common+0x82/0xd0

[ 2025.964220] [] warn_slowpath_fmt+0x5c/0x80

[ 2025.964227] [] dev_watchdog+0x246/0x250

[ 2025.964230] [] ? dev_graft_qdisc+0x80/0x80

[ 2025.964236] [] call_timer_fn+0x35/0x1a0

[ 2025.964238] [] ? dev_graft_qdisc+0x80/0x80

[ 2025.964241] [] run_timer_softirq+0x139/0x300

[ 2025.964244] [] do_current_softirqs+0x1ef/0x410

[ 2025.964247] [] run_ksoftirqd+0x26/0x50

[ 2025.964253] [] smpboot_thread_fn+0x244/0x330

[ 2025.964257] [] ? smpboot_register_percpu_thread_cpumask+0x130/0x130

[ 2025.964260] [] kthread+0xd8/0xf0

[ 2025.964263] [] ? kthread_worker_fn+0x150/0x150

[ 2025.964268] [] ret_from_fork+0x3f/0x70

[ 2025.964271] [] ? kthread_worker_fn+0x150/0x150

[ 2025.964273] ---[ end trace 0000000000000002 ]---

[ 2026.461693] ixgbe 0000:04:00.1 enp4s0f1: Fake Tx hang detected with timeout of 5 seconds

[ 2036.619964] ixgbe 0000:04:00.1 enp4s0f1: Reset adapter

0 Kudos
1 Reply
idata
Employee
908 Views

Hi Arisetty,

 

 

Thank you for the post. For inquiry about Intel® DPDK, please contact the Intel® Premier Support site http://premier.intel.com/premier http://premier.intel.com/premier or access your IBL account and click

 

the Intel® Premier Support link to enter issues under the Product Name "Data Plane Development Kit (DPDK)", after that this will be routed to our support team to better assist you.

 

 

Thanks,

 

wb

 

 

 

 

0 Kudos
Reply