Skip to content

Commit

Permalink
igb: XDP xmit back fix error code
Browse files Browse the repository at this point in the history
The igb XDP xmit back function should only return
defined error codes.

Fixes: 9cbc948 ("igb: add XDP support")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
  • Loading branch information
Sven Auhagen authored and Tony Nguyen committed Dec 9, 2020
1 parent 323a391 commit cfb33e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
if (unlikely(!tx_ring))
return -ENXIO;
return IGB_XDP_CONSUMED;

nq = txring_txq(tx_ring);
__netif_tx_lock(nq, cpu);
Expand Down

0 comments on commit cfb33e1

Please sign in to comment.