From: Joanne Koong <joannekoong@fb.com>
To: <bpf@vger.kernel.org>
Cc: <kafai@fb.com>, <netdev@vger.kernel.org>, <Kernel-team@fb.com>,
Joanne Koong <joannekoong@fb.com>
Subject: [PATCH bpf-next v2 0/3] Add XDP support for bpf_load_hdr_opt
Date: Wed, 6 Oct 2021 16:05:40 -0700 [thread overview]
Message-ID: <20211006230543.3928580-1-joannekoong@fb.com> (raw)
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.c
--
2.30.2
next reply other threads:[~2021-10-06 23:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-06 23:05 Joanne Koong [this message]
2021-10-06 23:05 ` [PATCH bpf-next v2 1/3] bpf/xdp: Add bpf_load_hdr_opt support for xdp Joanne Koong
2021-10-06 23:50 ` Song Liu
2021-10-06 23:05 ` [PATCH bpf-next v2 2/3] bpf/selftests: Rename test_tcp_hdr_options to test_sockops_tcp_hdr_options Joanne Koong
2021-10-06 23:47 ` Song Liu
2021-10-06 23:05 ` [PATCH bpf-next v2 3/3] bpf/selftests: Add xdp bpf_load_tcp_hdr_options tests Joanne Koong
2021-10-06 23:52 ` Song Liu
2021-10-07 14:41 ` [PATCH bpf-next v2 0/3] Add XDP support for bpf_load_hdr_opt Toke Høiland-Jørgensen
2021-10-07 20:57 ` Joanne Koong
2021-10-07 21:25 ` Daniel Borkmann
2021-10-07 23:52 ` Martin KaFai Lau
2021-10-08 22:20 ` Toke Høiland-Jørgensen
2021-10-11 18:43 ` Martin KaFai Lau
2021-10-12 14:11 ` Toke Høiland-Jørgensen
2021-10-12 20:51 ` Joanne Koong
2021-10-13 10:19 ` Toke Høiland-Jørgensen
2021-10-19 0:00 ` Alexei Starovoitov
2021-10-19 16:02 ` Yonghong Song
2021-10-19 16:10 ` Toke Høiland-Jørgensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211006230543.3928580-1-joannekoong@fb.com \
--to=joannekoong@fb.com \
--cc=Kernel-team@fb.com \
--cc=bpf@vger.kernel.org \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.