Add XDP support for bpf_load_hdr_opt
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 15 repliesIn review
- v13 patches 5 repliesSuperseded
Changes in v2 from the cover letter
* 1/3 - Change "(flags & 0xffffffffffff)" to (flags & ((1ULL << BPF_LOAD_HDR_OPT_TCP_OFFSET_SHIFT) - 1))
* 3/3 - Skip check_opt_out on failures
* 3/3 - Change CHECKs to ASSERTs
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | bpf/xdp: Add bpf_load_hdr_opt support for xdpinclude/ net/ tools/ | +103 | 1 reply | |
| 2/3 | bpf/selftests: Rename test_tcp_hdr_options to test_sockops_tcp_hdr_optionstools/ tools/ tools/ | +9 | 1 reply | |
| 3/3 | bpf/selftests: Add xdp bpf_load_tcp_hdr_options teststools/ tools/ | +342 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Song Liu |
|---|---|
| 1/3 | A-b |
| 2/3 | A-b |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf-next v2 0/3] Add XDP support for bpf_load_hdr_opt
Currently, bpf_sockops programs have been using bpf_load_hdr_opt() to parse the tcp header option. It will be useful to allow other bpf prog types to have a similar way of handling tcp hdr options.
This series adds XDP support for bpf_load_hdr_opt(). At a high level, these patches are:
1/3 patch - Add functionality for xdp bpf_load_hdr_opt in net/core.
2/3 patch - Rename existing test_tcp_hdr_options to test_sockops_tcp_hdr_options.
3/3 patch - Add tests for xdp bpf_load_hdr_opt (test_xdp_tcp_hdr_options).
v1 -> v2:
* 1/3 - Change "(flags & 0xffffffffffff)" to (flags & ((1ULL << BPF_LOAD_HDR_OPT_TCP_OFFSET_SHIFT) - 1))
* 3/3 - Skip check_opt_out on failures
* 3/3 - Change CHECKs to ASSERTs
Joanne Koong (3):
bpf/xdp: Add bpf_load_hdr_opt support for xdp bpf/selftests: Rename test_tcp_hdr_options to
test_sockops_tcp_hdr_options
bpf/selftests: Add xdp bpf_load_tcp_hdr_options tests
include/uapi/linux/bpf.h | 26 ++-
net/core/filter.c | 88 ++++++--
tools/include/uapi/linux/bpf.h | 26 ++-
...dr_options.c => sockops_tcp_hdr_options.c} | 18 +-
.../bpf/prog_tests/xdp_tcp_hdr_options.c | 144 +++++++++++++
....c => test_sockops_misc_tcp_hdr_options.c} | 0
...tions.c => test_sockops_tcp_hdr_options.c} | 0
.../bpf/progs/test_xdp_tcp_hdr_options.c | 198 ++++++++++++++++++
8 files changed, 454 insertions(+), 46 deletions(-)
rename tools/testing/selftests/bpf/prog_tests/{tcp_hdr_options.c => sockops_tcp_hdr_options.c} (96%)
create mode 100644 tools/testing/selftests/bpf/prog_tests/xdp_tcp_hdr_options.c
rename tools/testing/selftests/bpf/progs/{test_misc_tcp_hdr_options.c => test_sockops_misc_tcp_hdr_options.c} (100%)
rename tools/testing/selftests/bpf/progs/{test_tcp_hdr_options.c => test_sockops_tcp_hdr_options.c} (100%)
create mode 100644 tools/testing/selftests/bpf/progs/test_xdp_tcp_hdr_options.cSignature · 1 line
2.30.2