ixgbe: do not account for XDP rings in Tx watchdog
Subsystems (2)
RFC PATCH 1/1 ixgbe: do not account for XDP rings in Tx watchdog
Fix issue where ixgbe driver triggers resets in endless manner. A snippet from dmesg:
[1879966.583523] ixgbe 0000:86:00.0 enp134s0f0: initiating reset to clear Tx work after link loss [1879968.405694] ixgbe 0000:86:00.0 enp134s0f0: Reset adapter [1879968.925689] ixgbe 0000:86:00.0 enp134s0f0: detected SFP+: 3 [1879969.185504] ixgbe 0000:86:00.0 enp134s0f0: NIC Link is Up 10 Gbps, Flow Control: RX/TX [1879969.592433] ixgbe 0000:86:00.0 enp134s0f0: NIC Link is Down [1879969.592539] ixgbe 0000:86:00.0 enp134s0f0: initiating reset to clear Tx work after link loss [1879971.413253] ixgbe 0000:86:00.0 enp134s0f0: Reset adapter [1879971.901400] ixgbe 0000:86:00.0 enp134s0f0: detected SFP+: 3 [1879972.161224] ixgbe 0000:86:00.0 enp134s0f0: NIC Link is Up 10 Gbps, Flow Control: RX/TX [1879972.567922] ixgbe 0000:86:00.0 enp134s0f0: NIC Link is Down [1879972.568023] ixgbe 0000:86:00.0 enp134s0f0: initiating reset to clear Tx work after link loss
[...]
This can happen when user launches multiple xdpsock in txonly mode and flap the link few times. Commit c685c69fba71 ("ixgbe: don't do any AF_XDP zero-copy transmit if netif is not OK") tried to address same thing by calling netif_carrier_ok() in ZC Tx path, however as shown above I am still able to trigger reset loop.
In watchdog subtask, when bringing link up, messages that are shown in dmesg are:
Link is up
Link is down <--- at this state, !netif_carrier_ok() xsk managed to
produce tx desc, ixgbe_ring_tx_pending() will see ntc != ntu at XDP ring at will schedule reset
Link is up
I am not sure if sequence of events when bringing interface up is correct. I would expect that link would go just from downed state to up, not up/down/up.
For now, do not look at XDP rings within watchdog. It is not common to do so. After that it is no longer needed to call netif_carrier_ok() in ZC Tx.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 ------- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 3 --- 2 files changed, 10 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +0 -7
@@ -7624,13 +7624,6 @@ static bool ixgbe_ring_tx_pending(struct ixgbe_adapter *adapter)return true; } -for (i =0 ; i < adapter->num_xdp_queues; i++) { -struct ixgbe_ring *ring = adapter->xdp_ring[i]; - -if (ring->next_to_use != ring->next_to_clean) -return true; - } -return false; }
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +0 -3
@@ -409,9 +409,6 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget)break ; } -if (!netif_carrier_ok (xdp_ring->netdev)) -break ; -if (!xsk_tx_peek_desc (pool, &desc))break ;
Signature · 1 line
2.34.1