[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210122235734.447240-5-anthony.l.nguyen@intel.com>
Date: Fri, 22 Jan 2021 15:57:31 -0800
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net, kuba@...nel.org
Cc: Piotr Raczynski <piotr.raczynski@...el.com>,
netdev@...r.kernel.org, sassmann@...hat.com,
anthony.l.nguyen@...el.com,
George Kuruvinakunnel <george.kuruvinakunnel@...el.com>
Subject: [PATCH net 4/7] ice: use correct xdp_ring with XDP_TX action
From: Piotr Raczynski <piotr.raczynski@...el.com>
XDP queue number for XDP_TX action is used inconsistently
and may result with no packets transmitted. Fix queue number
used by the driver when doing XDP_TX, i.e. use receive queue
number as in ice_finalize_xdp_rx.
Also, using smp_processor_id() is wrong here and won't
work with less queues.
Fixes: efc2214b6047 ("ice: Add support for XDP")
Signed-off-by: Piotr Raczynski <piotr.raczynski@...el.com>
Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@...el.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
---
drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index b6fa83c619dd..7946a90b2da7 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -546,7 +546,7 @@ ice_run_xdp(struct ice_ring *rx_ring, struct xdp_buff *xdp,
case XDP_PASS:
break;
case XDP_TX:
- xdp_ring = rx_ring->vsi->xdp_rings[smp_processor_id()];
+ xdp_ring = rx_ring->vsi->xdp_rings[rx_ring->q_index];
result = ice_xmit_xdp_buff(xdp, xdp_ring);
break;
case XDP_REDIRECT:
--
2.26.2
Powered by blists - more mailing lists