Merge branch ’40GbE’ of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue [Linux 5.0]

Merge branch ’40GbE’ of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue [Linux 5.0]

This Linux kernel change "Merge branch ’40GbE’ of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue" is included in the Linux 5.0 release. This change is authored by David S. Miller <davem [at] davemloft.net> on Thu Feb 21 12:21:37 2019 -0800. The commit for this change in Linux stable tree is 033575e (patch). Other info about this change: Merge: d7cf4a3 c685c69

Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue

Jeff Kirsher says:

====================
Intel Wired LAN Driver Fixes 2019-02-21

This series contains fixes to ixgbe and i40e.

Majority of the fixes are to resolve XDP issues found in both drivers,
there is only one fix which is not XDP related.  That one fix resolves
an issue seen on older 10GbE devices, where UDP traffic was either being
dropped or being transmitted out of order when the bit to enable L3/L4
filtering for transmit switched packets is enabled on older devices that
did not support this option.

Magnus fixes an XDP issue for both ixgbe and i40e, where receive rings
are created but no buffers are allocated for AF_XDP in zero-copy mode,
so no packets can be received and no interrupts will be generated so
that NAPI poll function that allocates buffers to the rings will never
get executed.

Björn fixes a race in XDP xmit ring cleanup for i40e, where
ndo_xdp_xmit() must be taken into consideration.  Added a
synchronize_rcu() to wait for napi(s) before clearing the queue.

Jan fixes a ixgbe AF_XDP zero-copy transmit issue which can cause a
reset to be triggered, so add a check to ensure that netif carrier is
'ok' before trying to transmit packets.
====================

Signed-off-by: David S. Miller <[email protected]>

There is no are 0 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
index 654ae92..36a8879 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
@@ -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;
        }

Leave a Reply

Your email address will not be published. Required fields are marked *