Skip to contentSkip to conversation

i40e XDP program stops transmitting after link down/up

DISCUSSION Seth Forshee 3 participants 7 messages Jan 30, 2024 – Jan 31, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

I got a inquiry from a colleague about a behavior he's seeing with i40e but not with other NICs. The interfaces are bonded with a XDP load-balancer program attached to them. After 'ip link set ethX down; ip link set ethX up' on one of the interfaces the XDP program on that interface is no longer transmitting packets. He found that tx starts again after running 'sudo ethtool -t ethX'.

There's a 'i40e 0000:d8:00.1: VSI seid 391 XDP Tx ring 0 disable timeout' message in dmesg when disabling the interface. I've included the relevant portions from dmesg below.

This was first observed with a 6.1 kernel, but we've confirmed that the behavior is the same in 6.7. I realize the firmware is pretty old, so far our attempts to update the NVM have failed.

Thanks,
Seth

[    0.000000] Linux version 6.7.0 (root@616a530b3729) (gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #2 SMP Thu Jan 25 10:37:21 EST 2024
...
[    9.038171] i40e: Intel(R) Ethernet Connection XL710 Network Driver
[    9.044447] i40e: Copyright (c) 2013 - 2019 Intel Corporation.
...
[    9.064833] i40e 0000:d8:00.0: fw 7.0.50775 api 1.8 nvm 7.00 0x80004c97 1.2154.0 [8086:1583] [8086:0002]
...
[    9.320886] i40e 0000:d8:00.0: MAC address: xx:xx:xx:xx:xx:xx
[    9.327030] i40e 0000:d8:00.0: FW LLDP is enabled
[    9.344331] i40e 0000:d8:00.0 eth0: NIC Link is Up, 40 Gbps Full Duplex, Flow Control: None
[    9.355552] i40e 0000:d8:00.0: PCI-Express: Speed 8.0GT/s Width x8
[    9.374074] i40e 0000:d8:00.0: Features: PF-id[0] VFs: 64 VSIs: 66 QP: 32 RSS FD_ATR FD_SB NTUPLE DCB VxLAN Geneve PTP VEPA
...
[    9.401522] i40e 0000:d8:00.1: fw 7.0.50775 api 1.8 nvm 7.00 0x80004c97 1.2154.0 [8086:1583] [8086:0002]
...
[    9.652066] i40e 0000:d8:00.1: MAC address: xx:xx:xx:xx:xx:xx
[    9.658040] i40e 0000:d8:00.1: FW LLDP is enabled
[    9.688622] i40e 0000:d8:00.1 eth1: NIC Link is Up, 40 Gbps Full Duplex, Flow Control: None
[    9.699822] i40e 0000:d8:00.1: PCI-Express: Speed 8.0GT/s Width x8
[    9.719259] i40e 0000:d8:00.1: Features: PF-id[1] VFs: 64 VSIs: 66 QP: 32 RSS FD_ATR FD_SB NTUPLE DCB VxLAN Geneve PTP VEPA
[    9.401522] i40e 0000:d8:00.1: fw 7.0.50775 api 1.8 nvm 7.00 0x80004c97 1.2154.0 [8086:1583] [8086:0002]
...
[   13.948968] i40e 0000:d8:00.0: FW LLDP is disabled, attempting SW DCB
[   13.956753] i40e 0000:d8:00.0: SW DCB initialization succeeded.
[   13.970005] i40e 0000:d8:00.0: FW LLDP is disabled
...
[   14.113004] i40e 0000:d8:00.1: FW LLDP is disabled, attempting SW DCB
[   14.120800] i40e 0000:d8:00.1: SW DCB initialization succeeded.
[   14.133940] i40e 0000:d8:00.1: FW LLDP is disabled
...
[   14.267874] bonding: bond0 is being created...
[   14.979070] i40e 0000:d8:00.1 eth1: set new mac address xx:xx:xx:xx:xx:xx
[   14.994445] bond0: (slave eth1): Enslaving as a backup interface with an up link
[   14.994681] i40e 0000:d8:00.0 eth0: set new mac address xx:xx:xx:xx:xx:xx
[   15.010359] bond0: (slave eth0): Enslaving as a backup interface with an up link
[   15.912874] i40e 0000:d8:00.0: Stop LLDP AQ command failed =0x1
[   15.944842] i40e 0000:d8:00.1: Stop LLDP AQ command failed =0x1
[   41.262871] 8021q: 802.1Q VLAN Support v1.8
[   41.262890] 8021q: adding VLAN 0 to HW filter on device eth0
[   41.262902] 8021q: adding VLAN 0 to HW filter on device eth1
[   41.262914] 8021q: adding VLAN 0 to HW filter on device bond0
[   48.272456] i40e 0000:d8:00.0: FW LLDP is disabled, attempting SW DCB
[   48.280233] i40e 0000:d8:00.0: SW DCB initialization succeeded.
[   48.307415] i40e 0000:d8:00.0: User requested queue count/HW max RSS count:  12/32
[   48.440266] i40e 0000:d8:00.1: FW LLDP is disabled, attempting SW DCB
[   48.448025] i40e 0000:d8:00.1: SW DCB initialization succeeded.
[   48.475051] i40e 0000:d8:00.1: User requested queue count/HW max RSS count:  12/32
[   58.935900] i40e 0000:d8:00.0: FW LLDP is disabled, attempting SW DCB
[   58.945123] i40e 0000:d8:00.0: SW DCB initialization succeeded.
[   59.131772] i40e 0000:d8:00.1: FW LLDP is disabled, attempting SW DCB
[   59.139560] i40e 0000:d8:00.1: SW DCB initialization succeeded.
[  336.363825] i40e 0000:d8:00.1: VSI seid 391 XDP Tx ring 0 disable timeout
[  336.603619] bond0: (slave eth1): link status definitely down, disabling slave
[  345.464976] 8021q: adding VLAN 0 to HW filter on device eth1
[  345.547358] bond0: (slave eth1): link status definitely up, 40000 Mbps full duplex
[  345.547379] bond0: active interface up!
#1 lore raw

Dear Seth,

Thank you for bring this up.

Am 30.01.24 um 15:17 schrieb Seth Forshee:

Quoted 7 lines

I got a inquiry from a colleague about a behavior he's seeing with i40e but not with other NICs. The interfaces are bonded with a XDP load-balancer program attached to them. After 'ip link set ethX down; ip link set ethX up' on one of the interfaces the XDP program on that interface is no longer transmitting packets. He found that tx starts again after running 'sudo ethtool -t ethX'.

Quoted 7 lines

There's a 'i40e 0000:d8:00.1: VSI seid 391 XDP Tx ring 0 disable timeout' message in dmesg when disabling the interface. I've included the relevant portions from dmesg below.

This was first observed with a 6.1 kernel, but we've confirmed that the behavior is the same in 6.7. I realize the firmware is pretty old, so far our attempts to update the NVM have failed.

Does that mean, the problem didn’t happen before Linux 6.1? If so, if you have the reproducer and the time, bisecting the issue is normally the fastest way to solve the issue.

Kind regards,

Paul

Quoted 56 lines
[    0.000000] Linux version 6.7.0 (root@616a530b3729) (gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #2 SMP Thu Jan 25 10:37:21 EST 2024
...
[    9.038171] i40e: Intel(R) Ethernet Connection XL710 Network Driver
[    9.044447] i40e: Copyright (c) 2013 - 2019 Intel Corporation.
...
[    9.064833] i40e 0000:d8:00.0: fw 7.0.50775 api 1.8 nvm 7.00 0x80004c97 1.2154.0 [8086:1583] [8086:0002]
...
[    9.320886] i40e 0000:d8:00.0: MAC address: xx:xx:xx:xx:xx:xx
[    9.327030] i40e 0000:d8:00.0: FW LLDP is enabled
[    9.344331] i40e 0000:d8:00.0 eth0: NIC Link is Up, 40 Gbps Full Duplex, Flow Control: None
[    9.355552] i40e 0000:d8:00.0: PCI-Express: Speed 8.0GT/s Width x8
[    9.374074] i40e 0000:d8:00.0: Features: PF-id[0] VFs: 64 VSIs: 66 QP: 32 RSS FD_ATR FD_SB NTUPLE DCB VxLAN Geneve PTP VEPA
...
[    9.401522] i40e 0000:d8:00.1: fw 7.0.50775 api 1.8 nvm 7.00 0x80004c97 1.2154.0 [8086:1583] [8086:0002]
...
[    9.652066] i40e 0000:d8:00.1: MAC address: xx:xx:xx:xx:xx:xx
[    9.658040] i40e 0000:d8:00.1: FW LLDP is enabled
[    9.688622] i40e 0000:d8:00.1 eth1: NIC Link is Up, 40 Gbps Full Duplex, Flow Control: None
[    9.699822] i40e 0000:d8:00.1: PCI-Express: Speed 8.0GT/s Width x8
[    9.719259] i40e 0000:d8:00.1: Features: PF-id[1] VFs: 64 VSIs: 66 QP: 32 RSS FD_ATR FD_SB NTUPLE DCB VxLAN Geneve PTP VEPA
[    9.401522] i40e 0000:d8:00.1: fw 7.0.50775 api 1.8 nvm 7.00 0x80004c97 1.2154.0 [8086:1583] [8086:0002]
...
[   13.948968] i40e 0000:d8:00.0: FW LLDP is disabled, attempting SW DCB
[   13.956753] i40e 0000:d8:00.0: SW DCB initialization succeeded.
[   13.970005] i40e 0000:d8:00.0: FW LLDP is disabled
...
[   14.113004] i40e 0000:d8:00.1: FW LLDP is disabled, attempting SW DCB
[   14.120800] i40e 0000:d8:00.1: SW DCB initialization succeeded.
[   14.133940] i40e 0000:d8:00.1: FW LLDP is disabled
...
[   14.267874] bonding: bond0 is being created...
[   14.979070] i40e 0000:d8:00.1 eth1: set new mac address xx:xx:xx:xx:xx:xx
[   14.994445] bond0: (slave eth1): Enslaving as a backup interface with an up link
[   14.994681] i40e 0000:d8:00.0 eth0: set new mac address xx:xx:xx:xx:xx:xx
[   15.010359] bond0: (slave eth0): Enslaving as a backup interface with an up link
[   15.912874] i40e 0000:d8:00.0: Stop LLDP AQ command failed =0x1
[   15.944842] i40e 0000:d8:00.1: Stop LLDP AQ command failed =0x1
[   41.262871] 8021q: 802.1Q VLAN Support v1.8
[   41.262890] 8021q: adding VLAN 0 to HW filter on device eth0
[   41.262902] 8021q: adding VLAN 0 to HW filter on device eth1
[   41.262914] 8021q: adding VLAN 0 to HW filter on device bond0
[   48.272456] i40e 0000:d8:00.0: FW LLDP is disabled, attempting SW DCB
[   48.280233] i40e 0000:d8:00.0: SW DCB initialization succeeded.
[   48.307415] i40e 0000:d8:00.0: User requested queue count/HW max RSS count:  12/32
[   48.440266] i40e 0000:d8:00.1: FW LLDP is disabled, attempting SW DCB
[   48.448025] i40e 0000:d8:00.1: SW DCB initialization succeeded.
[   48.475051] i40e 0000:d8:00.1: User requested queue count/HW max RSS count:  12/32
[   58.935900] i40e 0000:d8:00.0: FW LLDP is disabled, attempting SW DCB
[   58.945123] i40e 0000:d8:00.0: SW DCB initialization succeeded.
[   59.131772] i40e 0000:d8:00.1: FW LLDP is disabled, attempting SW DCB
[   59.139560] i40e 0000:d8:00.1: SW DCB initialization succeeded.
[  336.363825] i40e 0000:d8:00.1: VSI seid 391 XDP Tx ring 0 disable timeout
[  336.603619] bond0: (slave eth1): link status definitely down, disabling slave
[  345.464976] 8021q: adding VLAN 0 to HW filter on device eth1
[  345.547358] bond0: (slave eth1): link status definitely up, 40000 Mbps full duplex
[  345.547379] bond0: active interface up!
#2 lore raw
Quoted 17 lines · Paul Menzel

Dear Seth,

Thank you for bring this up.

Am 30.01.24 um 15:17 schrieb Seth Forshee:

Quoted 11 lines

I got a inquiry from a colleague about a behavior he's seeing with i40e but not with other NICs. The interfaces are bonded with a XDP load-balancer program attached to them. After 'ip link set ethX down; ip link set ethX up' on one of the interfaces the XDP program on that interface is no longer transmitting packets. He found that tx starts again after running 'sudo ethtool -t ethX'.

There's a 'i40e 0000:d8:00.1: VSI seid 391 XDP Tx ring 0 disable timeout' message in dmesg when disabling the interface. I've included the relevant portions from dmesg below.

Quoted 7 lines
Quoted 3 lines

This was first observed with a 6.1 kernel, but we've confirmed that the behavior is the same in 6.7. I realize the firmware is pretty old, so far our attempts to update the NVM have failed.

Does that mean, the problem didn’t happen before Linux 6.1? If so, if you have the reproducer and the time, bisecting the issue is normally the fastest way to solve the issue.

No, sorry, I should have worded that better. I meant that they were using 6.1 when they noticed the issue, not that kernels before 6.1 did not have that issue. We've also tried a 5.15 kernel build now and still see the issue there, we haven't tested anything older than that.

Thanks,
Seth

#3 lore raw
Quoted 22 lines · Seth Forshee
Quoted 21 lines · Paul Menzel

Dear Seth,

Thank you for bring this up.

Am 30.01.24 um 15:17 schrieb Seth Forshee:

Quoted 14 lines

I got a inquiry from a colleague about a behavior he's seeing with i40e but not with other NICs. The interfaces are bonded with a XDP load-balancer program attached to them. After 'ip link set ethX down; ip link set ethX up' on one of the interfaces the XDP program on that interface is no longer transmitting packets. He found that tx starts again after running 'sudo ethtool -t ethX'.

There's a 'i40e 0000:d8:00.1: VSI seid 391 XDP Tx ring 0 disable timeout' message in dmesg when disabling the interface. I've included the relevant portions from dmesg below.

This was first observed with a 6.1 kernel, but we've confirmed that the behavior is the same in 6.7. I realize the firmware is pretty old, so far our attempts to update the NVM have failed.

Quoted 8 lines
Quoted 3 lines

Does that mean, the problem didn’t happen before Linux 6.1? If so, if you have the reproducer and the time, bisecting the issue is normally the fastest way to solve the issue.

No, sorry, I should have worded that better. I meant that they were using 6.1 when they noticed the issue, not that kernels before 6.1 did not have that issue. We've also tried a 5.15 kernel build now and still see the issue there, we haven't tested anything older than that.

Hey Seth,

I am observing same thing on my side with xdpsock in txonly mode, so I'll take a look at this and will keep you updated.

Quoted 4 lines

Thanks,
Seth

#4 lore raw
Quoted 32 lines · Maciej Fijalkowski
Quoted 22 lines · Seth Forshee
Quoted 21 lines · Paul Menzel

Dear Seth,

Thank you for bring this up.

Am 30.01.24 um 15:17 schrieb Seth Forshee:

Quoted 14 lines

I got a inquiry from a colleague about a behavior he's seeing with i40e but not with other NICs. The interfaces are bonded with a XDP load-balancer program attached to them. After 'ip link set ethX down; ip link set ethX up' on one of the interfaces the XDP program on that interface is no longer transmitting packets. He found that tx starts again after running 'sudo ethtool -t ethX'.

There's a 'i40e 0000:d8:00.1: VSI seid 391 XDP Tx ring 0 disable timeout' message in dmesg when disabling the interface. I've included the relevant portions from dmesg below.

This was first observed with a 6.1 kernel, but we've confirmed that the behavior is the same in 6.7. I realize the firmware is pretty old, so far our attempts to update the NVM have failed.

Quoted 8 lines
Quoted 3 lines

Does that mean, the problem didn’t happen before Linux 6.1? If so, if you have the reproducer and the time, bisecting the issue is normally the fastest way to solve the issue.

No, sorry, I should have worded that better. I meant that they were using 6.1 when they noticed the issue, not that kernels before 6.1 did not have that issue. We've also tried a 5.15 kernel build now and still see the issue there, we haven't tested anything older than that.

Quoted 4 lines

Hey Seth,

I am observing same thing on my side with xdpsock in txonly mode, so I'll take a look at this and will keep you updated.

Can you try this diff on your side?

From 1d3b2d92506c0af4bea843c046bdef34f3f66893 Mon Sep 17 00:00:00 2001
From: Maciej Fijalkowski <[email protected]>
Date: Tue, 30 Jan 2024 23:01:28 +0100
Subject: [PATCH net] i40e: stop XDP txqs

---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +4 -1
index 6e7fd473abfd..08ef88783762 100644
@@ -4926,13 +4926,16 @@ int i40e_vsi_start_rings(struct i40e_vsi *vsi)
 void i40e_vsi_stop_rings(struct i40e_vsi *vsi)
 {
 	struct i40e_pf *pf = vsi->back;
+	u32 alloc_queue_pairs;
 	int pf_q, err, q_end;
 
 	/* When port TX is suspended, don't wait */
 	if (test_bit(__I40E_PORT_SUSPENDED, vsi->back->state))
 		return i40e_vsi_stop_rings_no_wait(vsi);
 
-	q_end = vsi->base_queue + vsi->num_queue_pairs;
+	alloc_queue_pairs = vsi->alloc_queue_pairs *
+			    (i40e_enabled_xdp_vsi(vsi) ? 2 : 1);
+	q_end = vsi->base_queue + alloc_queue_pairs;
 	for (pf_q = vsi->base_queue; pf_q < q_end; pf_q++)
 		i40e_pre_tx_queue_cfg(&pf->hw, (u32)pf_q, false);
 
Signature · 1 line
2.34.1
Quoted 5 lines
Quoted 5 lines

Thanks,
Seth

#5 lore raw
Quoted 33 lines · Maciej Fijalkowski
Quoted 32 lines · Maciej Fijalkowski
Quoted 30 lines · Seth Forshee
Quoted 17 lines · Paul Menzel

Dear Seth,

Thank you for bring this up.

Am 30.01.24 um 15:17 schrieb Seth Forshee:

Quoted 11 lines

I got a inquiry from a colleague about a behavior he's seeing with i40e but not with other NICs. The interfaces are bonded with a XDP load-balancer program attached to them. After 'ip link set ethX down; ip link set ethX up' on one of the interfaces the XDP program on that interface is no longer transmitting packets. He found that tx starts again after running 'sudo ethtool -t ethX'.

There's a 'i40e 0000:d8:00.1: VSI seid 391 XDP Tx ring 0 disable timeout' message in dmesg when disabling the interface. I've included the relevant portions from dmesg below.

Quoted 7 lines
Quoted 3 lines

This was first observed with a 6.1 kernel, but we've confirmed that the behavior is the same in 6.7. I realize the firmware is pretty old, so far our attempts to update the NVM have failed.

Does that mean, the problem didn’t happen before Linux 6.1? If so, if you have the reproducer and the time, bisecting the issue is normally the fastest way to solve the issue.

No, sorry, I should have worded that better. I meant that they were using 6.1 when they noticed the issue, not that kernels before 6.1 did not have that issue. We've also tried a 5.15 kernel build now and still see the issue there, we haven't tested anything older than that.

Quoted 6 lines
Quoted 4 lines

Hey Seth,

I am observing same thing on my side with xdpsock in txonly mode, so I'll take a look at this and will keep you updated.

Can you try this diff on your side?

That fixes the problem!

Thanks,
Seth

#6 lore raw
Quoted 34 lines · Seth Forshee
Quoted 33 lines · Maciej Fijalkowski
Quoted 32 lines · Maciej Fijalkowski
Quoted 30 lines · Seth Forshee
Quoted 17 lines · Paul Menzel

Dear Seth,

Thank you for bring this up.

Am 30.01.24 um 15:17 schrieb Seth Forshee:

Quoted 11 lines

I got a inquiry from a colleague about a behavior he's seeing with i40e but not with other NICs. The interfaces are bonded with a XDP load-balancer program attached to them. After 'ip link set ethX down; ip link set ethX up' on one of the interfaces the XDP program on that interface is no longer transmitting packets. He found that tx starts again after running 'sudo ethtool -t ethX'.

There's a 'i40e 0000:d8:00.1: VSI seid 391 XDP Tx ring 0 disable timeout' message in dmesg when disabling the interface. I've included the relevant portions from dmesg below.

Quoted 7 lines
Quoted 3 lines

This was first observed with a 6.1 kernel, but we've confirmed that the behavior is the same in 6.7. I realize the firmware is pretty old, so far our attempts to update the NVM have failed.

Does that mean, the problem didn’t happen before Linux 6.1? If so, if you have the reproducer and the time, bisecting the issue is normally the fastest way to solve the issue.

No, sorry, I should have worded that better. I meant that they were using 6.1 when they noticed the issue, not that kernels before 6.1 did not have that issue. We've also tried a 5.15 kernel build now and still see the issue there, we haven't tested anything older than that.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Hey Seth,

I am observing same thing on my side with xdpsock in txonly mode, so I'll take a look at this and will keep you updated.

Can you try this diff on your side?

That fixes the problem!

Awesome. I'll send a proper fix then and will keep you in loop.

Quoted 3 lines

Thanks,
Seth