Skip to content

xdp: a fistful of generic changes pt. II

Alexander Lobakin bpf lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 11 repliesIn review 3 of 12 applied

Patches in v1 3 of 12 applied

#Subject and filesSizeRepliesApplied
1/12page_pool: allow mixing PPs within one bulkinclude/net/page_pool/types.h include/net/xdp.h net/core/page_pool.c +1 more+87 -730 repliesApplied
2/12xdp: get rid of xdp_frame::mem.iddrivers/net/ethernet/freescale/dpaa/dpaa_eth.c drivers/net/veth.c include/net/xdp.h +4 more+33 -330 replies
3/12xdp: make __xdp_return() MP-agnosticinclude/net/xdp.h net/core/filter.c net/core/xdp.c+24 -360 repliesApplied
4/12xdp: add generic xdp_buff_add_frag()include/linux/skbuff.h include/net/xdp.h net/core/xdp.c+118 -50 replies
5/12xdp: add generic xdp_build_skb_from_buff()include/net/xdp.h net/core/xdp.c+56 -02 replies
6/12xsk: make xsk_buff_add_frag really add the frag via __xdp_buff_add_frag()drivers/net/ethernet/intel/i40e/i40e_xsk.c drivers/net/ethernet/intel/ice/ice_xsk.c include/net/xdp_sock_drv.h+20 -600 replies
7/12xsk: add generic XSk &xdp_buff -> skb conversioninclude/net/xdp.h net/core/xdp.c+139 -03 replies
8/12xsk: add helper to get &xdp_desc's DMA and meta pointer in one goinclude/net/xdp_sock_drv.h include/net/xsk_buff_pool.h net/xdp/xsk_buff_pool.c+71 -00 replies
9/12page_pool: add a couple of netmem counterpartsinclude/net/page_pool/helpers.h+37 -92 replies
10/12skbuff: allow 2-4-argument skb_frag_dma_map()include/linux/skbuff.h+26 -50 repliesApplied
11/12jump_label: export static_key_slow_{inc,dec}_cpuslocked()kernel/jump_label.c+2 -04 replies
12/12unroll: add generic loop unroll helpersinclude/linux/unroll.h+44 -00 replies

Reviews trailers per patch

6 of 12 patches have a Reviewed-by or Acked-by.

PatchToke Høiland-JørgensenMaciej FijalkowskiPrzemek Kitszel
1/12
2/12R-b
3/12
4/12R-b
5/12R-b
6/12A-b
7/12R-b
8/12
9/12
10/12
11/12
12/12R-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 3 reviewers.

Read the v1 thread

Cover letter [PATCH net-next 00/12] xdp: a fistful of generic changes pt. II

XDP for idpf is currently 5.5 chapters:
* convert Rx to libeth;
* convert Tx and stats to libeth;
* generic XDP and XSk code changes;
* generic XDP and XSk code additions (you are here);
* actual XDP for idpf via new libeth_xdp;
* XSk for idpf (via ^).

Part III.2 does the following:
* allows mixing pages from several Page Pools within one XDP frame;
* optimizes &xdp_frame structure and removes no-more-used field;
* adds generic functions to build skbs from xdp_buffs (regular and XSk) and attach frags to xdp_buffs (regular and XSk);
* adds helper to optimize XSk xmit in drivers;
* makes XDP core and Page Pool a bit more netmem-friendly.

Everything is prereq for libeth_xdp, but will be useful standalone as well: faster xdp_return_frame_bulk() and xdp_frame fields access, less code in drivers, faster XSk XDP_PASS, smaller object code.

Alexander Lobakin (12):
page_pool: allow mixing PPs within one bulk
xdp: get rid of xdp_frame::mem.id
xdp: make __xdp_return() MP-agnostic
xdp: add generic xdp_buff_add_frag()
xdp: add generic xdp_build_skb_from_buff()
xsk: make xsk_buff_add_frag really add the frag via

    __xdp_buff_add_frag()

xsk: add generic XSk &xdp_buff -> skb conversion
xsk: add helper to get &xdp_desc's DMA and meta pointer in one go
page_pool: add a couple of netmem counterparts
skbuff: allow 2-4-argument skb_frag_dma_map()
jump_label: export static_key_slow_{inc,dec}_cpuslocked()
unroll: add generic loop unroll helpers

 include/net/page_pool/types.h                 |   6 +-
 include/linux/skbuff.h                        |  47 ++-
 include/linux/unroll.h                        |  44 +++
 include/net/page_pool/helpers.h               |  46 ++-
 include/net/xdp.h                             | 130 +++++++-
 include/net/xdp_sock_drv.h                    |  41 ++-
 include/net/xsk_buff_pool.h                   |   8 +
 .../net/ethernet/freescale/dpaa/dpaa_eth.c    |   2 +-
 drivers/net/ethernet/intel/i40e/i40e_xsk.c    |  30 +-
 drivers/net/ethernet/intel/ice/ice_xsk.c      |  32 +-
 drivers/net/veth.c                            |   4 +-
 kernel/bpf/cpumap.c                           |   2 +-
 kernel/jump_label.c                           |   2 +
 net/bpf/test_run.c                            |   4 +-
 net/core/filter.c                             |  17 +-
 net/core/page_pool.c                          | 109 ++++---
 net/core/xdp.c                                | 290 ++++++++++++++----
 net/xdp/xsk_buff_pool.c                       |  40 +++
 18 files changed, 645 insertions(+), 209 deletions(-)

---
Each patch except trivial 0003 and 0009 was on the lists already.

* 0001 now includes Jakub's suggestions (pre-pass + while(count));
* 0004 doesn't leak refcounts anymore (also Jakub).

Signature · 1 line
2.47.1