Generic XDP improvements
Status from this message: Applied. Thanks
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest5 patches 4 repliesApplied
- v55 patches 2 repliesSuperseded
- v45 patches 1 replySuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 5 patches | 7 replies | Superseded | |
| v2 | 5 patches | 1 reply | Superseded | |
| v1 | 4 patches | 2 replies | Superseded |
Changes in v6 from the cover letter
v5: https://lore.kernel.org/bpf/[email protected]
* Put rcpu->prog check before RCU-bh section to avoid do_softirq (Jesper)
Patches in v6 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | net: core: split out code to run generic XDP proginclude/ net/ | +55 | 0 replies | |
| 2/5 | bitops: add non-atomic bitops for pointersinclude/ include/ | +59 | 2 replies | |
| 3/5 | bpf: cpumap: implement generic cpumapinclude/ include/ kernel/ +2 more | +114 | 1 reply | |
| 4/5 | bpf: devmap: implement devmap prog execution for generic XDPinclude/ kernel/ net/ | +39 | 0 replies | |
| 5/5 | bpf: tidy xdp attach selfteststools/ tools/ | +32 | 0 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Toke Høiland-Jørgensen | Jesper Dangaard Brouer |
|---|---|---|
| 1/5 | R-b | |
| 2/5 | R-b | |
| 3/5 | R-b | A-b |
| 4/5 | R-b | |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next v6 0/5] Generic XDP improvements
This small series makes some improvements to generic XDP mode and brings it closer to native XDP. Patch 1 splits out generic XDP processing into reusable parts, patch 2 adds pointer friendly wrappers for bitops (not have to cast back and forth the address of local pointer to unsigned long *), patch 3 implements generic cpumap support (details in commit) and patch 4 allows devmap bpf prog execution before generic_xdp_tx is called.
Patch 5 just updates a couple of selftests to adapt to changes in behavior (in that specifying devmap/cpumap prog fd in generic mode is now allowed).
Changelog:
----------
v5 -> v6
v5: https://lore.kernel.org/bpf/[email protected]
* Put rcpu->prog check before RCU-bh section to avoid do_softirq (Jesper)
v4 -> v5
v4: https://lore.kernel.org/bpf/[email protected]
* Add comments and examples for new bitops macros (Alexei)
v3 -> v4
v3: https://lore.kernel.org/bpf/[email protected]
* Add detach now that attach of XDP program succeeds (Toke)
* Clean up the test to use new ASSERT macros
v2 -> v3
v2: https://lore.kernel.org/bpf/[email protected]
* list_for_each_entry -> list_for_each_entry_safe (due to deletion of skb)
v1 -> v2
v1: https://lore.kernel.org/bpf/[email protected]
* Move __ptr_{set,clear,test}_bit to bitops.h (Toke)
Also changed argument order to match the bit op they wrap.
* Remove map value size checking functions for cpumap/devmap (Toke)
* Rework prog run for skb in cpu_map_kthread_run (Toke)
* Set skb->dev to dst->dev after devmap prog has run
* Don't set xdp rxq that will be overwritten in cpumap prog run
Kumar Kartikeya Dwivedi (5):
net: core: split out code to run generic XDP prog
bitops: add non-atomic bitops for pointers
bpf: cpumap: implement generic cpumap
bpf: devmap: implement devmap prog execution for generic XDP
bpf: tidy xdp attach selftests
include/linux/bitops.h | 50 ++++++++ include/linux/bpf.h | 10 +- include/linux/netdevice.h | 2 + include/linux/skbuff.h | 10 +- include/linux/typecheck.h | 9 ++ kernel/bpf/cpumap.c | 116 +++++++++++++++--- kernel/bpf/devmap.c | 49 ++++++-- net/core/dev.c | 103 ++++++++-------- net/core/filter.c | 6 +- .../bpf/prog_tests/xdp_cpumap_attach.c | 43 +++---- .../bpf/prog_tests/xdp_devmap_attach.c | 39 +++--- 11 files changed, 298 insertions(+), 139 deletions(-)
Signature · 1 line
2.31.1