]> Git Repo - linux.git/commitdiff
ixgbe: don't do any AF_XDP zero-copy transmit if netif is not OK
authorJan Sokolowski <[email protected]>
Wed, 20 Feb 2019 15:20:14 +0000 (15:20 +0000)
committerJeff Kirsher <[email protected]>
Thu, 21 Feb 2019 19:11:25 +0000 (11:11 -0800)
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)
Signed-off-by: Jan Sokolowski <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c

index 654ae92342ea25b713a9c4c524cad866dd227626..36a8879536a4a552405de80ad6f6c3a319ebbd6e 100644 (file)
@@ -642,7 +642,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;
                }
This page took 0.095698 seconds and 4 git commands to generate.