Skip to content

xdp: introduce bulking for page_pool tx return path

Lorenzo Bianconi bpf netdev 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest5 patches 7 repliesIn review
  2. v55 patches 6 repliesSuperseded
  3. v45 patches 6 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v35 patches6 repliesSuperseded
v24 patches2 repliesSuperseded
v14 patches18 repliesSuperseded

Changes in v6 from the cover letter

- do not keep looping over ptr_ring if the cache is full but release leftover pages running page_pool_return_page

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5net: xdp: introduce bulking for xdp tx return pathinclude/net/xdp.h net/core/xdp.c+75 -12 replies
2/5net: page_pool: add bulk support for ptr_ringinclude/net/page_pool.h net/core/page_pool.c net/core/xdp.c+88 -172 replies
3/5net: mvneta: add xdp tx return bulking supportdrivers/net/ethernet/marvell/mvneta.c+9 -11 reply
4/5net: mvpp2: add xdp tx return bulking supportdrivers/net/ethernet/marvell/mvpp2/mvpp2_main.c+9 -11 reply
5/5net: mlx5: add xdp tx return bulking supportdrivers/net/ethernet/mellanox/mlx5/core/en/xdp.c+18 -41 reply

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJesper Dangaard BrouerMatteo CroceJohn FastabendIlias Apalodimas
SeriesA-b
1/5A-b A-b
2/5A-b A-b
3/5A-b
4/5T-b A-b
5/5T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v6 thread

Cover letter [PATCH v6 net-nex 0/5] xdp: introduce bulking for page_pool tx return path

XDP bulk APIs introduce a defer/flush mechanism to return pages belonging to the same xdp_mem_allocator object (identified via the mem.id field) in bulk to optimize I-cache and D-cache since xdp_return_frame is usually run inside the driver NAPI tx completion loop.
Convert mvneta, mvpp2 and mlx5 drivers to xdp_return_frame_bulk APIs.

More details on benchmarks run on mlx5 can be found here:
https://github.com/xdp-project/xdp-project/blob/master/areas/mem/xdp_bulk_return01.org

Changes since v5:
- do not keep looping over ptr_ring if the cache is full but release leftover pages running page_pool_return_page

Changes since v4:
- fix comments
- introduce xdp_frame_bulk_init utility routine
- compiler annotations for I-cache code layout
- move rcu_read_lock outside fast-path
- mlx5 xdp bulking code optimization

Changes since v3:
- align DEV_MAP_BULK_SIZE to XDP_BULK_QUEUE_SIZE
- refactor page_pool_put_page_bulk to avoid code duplication

Changes since v2:
- move mvneta changes in a dedicated patch

Changes since v1:
- improve comments
- rework xdp_return_frame_bulk routine logic
- move count and xa fields at the beginning of xdp_frame_bulk struct
- invert logic in page_pool_put_page_bulk for loop

Lorenzo Bianconi (5):
net: xdp: introduce bulking for xdp tx return path
net: page_pool: add bulk support for ptr_ring
net: mvneta: add xdp tx return bulking support
net: mvpp2: add xdp tx return bulking support
net: mlx5: add xdp tx return bulking support

 drivers/net/ethernet/marvell/mvneta.c         | 10 ++-
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   | 10 ++-
 .../net/ethernet/mellanox/mlx5/core/en/xdp.c  | 22 ++++--
 include/net/page_pool.h                       | 26 +++++++
 include/net/xdp.h                             | 17 ++++-
 net/core/page_pool.c                          | 70 ++++++++++++++++---
 net/core/xdp.c                                | 54 ++++++++++++++
 7 files changed, 192 insertions(+), 17 deletions(-)
Signature · 1 line
2.26.2