diff options
| author | Maciej Fijalkowski <[email protected]> | 2022-01-25 16:04:46 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2022-01-27 16:25:33 +0000 |
| commit | 59e92bfe4df71a833678a94b9947843a4c9f55bb (patch) | |
| tree | c2350d03fe3d1bc0860f7b084fc3f69d1725c1e0 /drivers/net/ethernet/intel/ice/ice_txrx_lib.c | |
| parent | ice: xsk: Improve AF_XDP ZC Tx and use batching API (diff) | |
| download | kernel-59e92bfe4df71a833678a94b9947843a4c9f55bb.tar.gz kernel-59e92bfe4df71a833678a94b9947843a4c9f55bb.zip | |
ice: xsk: Borrow xdp_tx_active logic from i40e
One of the things that commit 5574ff7b7b3d ("i40e: optimize AF_XDP Tx
completion path") introduced was the @xdp_tx_active field. Its usage
from i40e can be adjusted to ice driver and give us positive performance
results.
If the descriptor that @next_dd points to has been sent by HW (its DD
bit is set), then we are sure that at least quarter of the ring is ready
to be cleaned. If @xdp_tx_active is 0 which means that related xdp_ring
is not used for XDP_{TX, REDIRECT} workloads, then we know how many XSK
entries should placed to completion queue, IOW walking through the ring
can be skipped.
Signed-off-by: Maciej Fijalkowski <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Reviewed-by: Alexander Lobakin <[email protected]>
Acked-by: Magnus Karlsson <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_txrx_lib.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c index 9677cf880a4b..eb21cec1d772 100644 --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c @@ -302,6 +302,7 @@ int ice_xmit_xdp_ring(void *data, u16 size, struct ice_tx_ring *xdp_ring) tx_desc->cmd_type_offset_bsz = ice_build_ctob(ICE_TX_DESC_CMD_EOP, 0, size, 0); + xdp_ring->xdp_tx_active++; i++; if (i == xdp_ring->count) { i = 0; |
