Skip to contentSkip to conversation

ixgbe: don't do any AF_XDP zero-copy transmit if netif is not OK

PATCH New Jan Sokolowski 1 participant 1 message Feb 20, 2019

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

PATCH 1/1 ixgbe: don't do any AF_XDP zero-copy transmit if netif is not OK

An issue has been found while testing zero-copy XDP that causes a reset to be triggered. As it takes some time to turn the carrier on after setting zc, and we already start trying to transmit some packets, watchdog considers this as an erroneous state and triggers a reset.

Don't do any work if netif carrier is not OK.

Fixes 8221c5eba8c13 (ixgbe: add AF_XDP zero-copy Tx support)
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +2 -1
index 98870707b51a..51c29358c2a9 100644
@@ -617,7 +617,8 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget)
 	dma_addr_t dma;
 
 	while (budget-- > 0) {
-		if (unlikely(!ixgbe_desc_unused(xdp_ring))) {
+		if (unlikely(!ixgbe_desc_unused(xdp_ring)) ||
+		    !netif_carrier_ok(xdp_ring->netdev)) {
 			work_done = false;
 			break;
 		}
Signature · 1 line
2.18.1