diff options
| author | Alexander Lobakin <[email protected]> | 2023-02-10 17:06:18 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2023-02-13 18:13:13 +0000 |
| commit | ad07f29b9c9a29eba04b19116c6db51387a638d7 (patch) | |
| tree | a4711ebfbe3eda0cdc10b3c91d0d2c13762132e4 /drivers/net/ethernet/intel/ice/ice_txrx_lib.c | |
| parent | ice: Fix freeing XDP frames backed by Page Pool (diff) | |
| download | kernel-ad07f29b9c9a29eba04b19116c6db51387a638d7.tar.gz kernel-ad07f29b9c9a29eba04b19116c6db51387a638d7.zip | |
ice: Micro-optimize .ndo_xdp_xmit() path
After the recent mbuf changes, ice_xmit_xdp_ring() became a 3-liner.
It makes no sense to keep it global in a different file than its caller.
Move it just next to the sole call site and mark static. Also, it
doesn't need a full xdp_convert_frame_to_buff(). Save several cycles
and fill only the fields used by __ice_xmit_xdp_ring() later on.
Finally, since it doesn't modify @xdpf anyhow, mark the argument const
to save some more (whole -11 bytes of .text! :D).
Thanks to 1 jump less and less calcs as well, this yields as many as
6.7 Mpps per queue. `xdp.data_hard_start = xdpf` is fully intentional
again (see xdp_convert_buff_to_frame()) and just works when there are
no source device's driver issues.
Signed-off-by: Alexander Lobakin <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Maciej Fijalkowski <[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 | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c index 6d98c34d99fc..7bc5aa340c7d 100644 --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c @@ -435,19 +435,6 @@ busy: } /** - * ice_xmit_xdp_ring - submit frame to XDP ring for transmission - * @xdpf: XDP frame that will be converted to XDP buff - * @xdp_ring: XDP ring for transmission - */ -int ice_xmit_xdp_ring(struct xdp_frame *xdpf, struct ice_tx_ring *xdp_ring) -{ - struct xdp_buff xdp; - - xdp_convert_frame_to_buff(xdpf, &xdp); - return __ice_xmit_xdp_ring(&xdp, xdp_ring, true); -} - -/** * ice_finalize_xdp_rx - Bump XDP Tx tail and/or flush redirect map * @xdp_ring: XDP ring * @xdp_res: Result of the receive batch |
