Skip to content

Commit c685c69

Browse files
JanJSokolowskiJeff Kirsher
authored andcommitted
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: 8221c5e (ixgbe: add AF_XDP zero-copy Tx support) Signed-off-by: Jan Sokolowski <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 59eb2a8 commit c685c69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,8 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget)
642642
dma_addr_t dma;
643643

644644
while (budget-- > 0) {
645-
if (unlikely(!ixgbe_desc_unused(xdp_ring))) {
645+
if (unlikely(!ixgbe_desc_unused(xdp_ring)) ||
646+
!netif_carrier_ok(xdp_ring->netdev)) {
646647
work_done = false;
647648
break;
648649
}

0 commit comments

Comments
 (0)