OSDN Git Service

ixgbe: change ndo_xdp_xmit return code on xmit errors
authorJesper Dangaard Brouer <brouer@redhat.com>
Thu, 17 Aug 2017 16:22:32 +0000 (18:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Aug 2017 23:18:31 +0000 (16:18 -0700)
Use errno -ENOSPC ("No space left on device") when the XDP xmit
have no space left on the TX ring buffer, instead of -ENOMEM.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 56d7ef0..8d3224a 100644 (file)
@@ -9860,7 +9860,7 @@ static int ixgbe_xdp_xmit(struct net_device *dev, struct xdp_buff *xdp)
 
        err = ixgbe_xmit_xdp_ring(adapter, xdp);
        if (err != IXGBE_XDP_TX)
-               return -ENOMEM;
+               return -ENOSPC;
 
        return 0;
 }