Commit cfb33e17 authored by Sven Auhagen's avatar Sven Auhagen Committed by Tony Nguyen

igb: XDP xmit back fix error code

The igb XDP xmit back function should only return
defined error codes.

Fixes: 9cbc948b ("igb: add XDP support")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: default avatarSven Auhagen <sven.auhagen@voleatech.de>
Tested-by: default avatarSandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 323a391a
...@@ -2910,7 +2910,7 @@ static int igb_xdp_xmit_back(struct igb_adapter *adapter, struct xdp_buff *xdp) ...@@ -2910,7 +2910,7 @@ static int igb_xdp_xmit_back(struct igb_adapter *adapter, struct xdp_buff *xdp)
*/ */
tx_ring = adapter->xdp_prog ? igb_xdp_tx_queue_mapping(adapter) : NULL; tx_ring = adapter->xdp_prog ? igb_xdp_tx_queue_mapping(adapter) : NULL;
if (unlikely(!tx_ring)) if (unlikely(!tx_ring))
return -ENXIO; return IGB_XDP_CONSUMED;
nq = txring_txq(tx_ring); nq = txring_txq(tx_ring);
__netif_tx_lock(nq, cpu); __netif_tx_lock(nq, cpu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment