Skip to content

Commit 9070fe3

Browse files
mfijalkoborkmann
authored andcommitted
ice: Do not call ice_finalize_xdp_rx() unnecessarily
Currently ice_finalize_xdp_rx() is called only when xdp_prog is present on VSI, which is a good thing. However, this optimization can be enhanced and check only if any of the XDP_TX/XDP_REDIRECT took place in current Rx processing. Non-zero value of @xdp_xmit indicates that xdp_prog is present on VSI. This way XDP_DROP-based workloads will not suffer from unnecessary calls to external function. Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com> Link: https://lore.kernel.org/bpf/20230131204506.219292-9-maciej.fijalkowski@intel.com
1 parent 60bc72b commit 9070fe3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/ice/ice_txrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
12521252
/* return up to cleaned_count buffers to hardware */
12531253
failure = ice_alloc_rx_bufs(rx_ring, cleaned_count);
12541254

1255-
if (xdp_prog)
1255+
if (xdp_xmit)
12561256
ice_finalize_xdp_rx(xdp_ring, xdp_xmit);
12571257
rx_ring->skb = skb;
12581258

0 commit comments

Comments
 (0)