Skip to content

iavf: defer loading netmem_desc

Matt Vollrath intel-wired-lan netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3libeth: add __libeth_rx_sync_for_cpuinclude/net/libeth/rx.h+26 -111 reply
2/3iavf: use __libeth_rx_sync_for_cpudrivers/net/ethernet/intel/iavf/iavf_txrx.c+2 -11 reply
3/3iavf: use cached page_pool ref in skb helpersdrivers/net/ethernet/intel/iavf/iavf_txrx.c+9 -61 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAleksandr Loktionov
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH iwl-next 0/3] iavf: defer loading netmem_desc

In a few places libeth and the iavf driver inspect which page pool is attached to a netmem_ref. This forces an immediate load of the netmem_desc struct for each buffer in the Rx loop.

Defer or eliminate these loads of netmem_desc from the driver fast path by using the page_pool ref in the first cache line of iavf_ring instead.

There are only two paths out of the Rx loop where netmem_desc needs to be consumed:
* The "very rare" case of libeth_rx_sync_for_cpu calling libeth_rx_recycle_slow and indicating that there was no data. This could be similarly factored out, but not by this series.
* GRO merging a frame into an existing aggregate stream. In this case, the cold load of netmem_desc may overlap the payload prefetch started by iavf_build_skb, which is now no longer dependent on netmem_desc to start.

Matt Vollrath (3):
libeth: add __libeth_rx_sync_for_cpu
iavf: use __libeth_rx_sync_for_cpu
iavf: use cached page_pool ref in skb helpers

 drivers/net/ethernet/intel/iavf/iavf_txrx.c | 18 ++++++----
 include/net/libeth/rx.h                     | 37 +++++++++++++++------
 2 files changed, 37 insertions(+), 18 deletions(-)

base-commit: 5c458073553f0ef74f5c8db1bd459c87c722a299

Signature · 1 line
2.43.0