From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: bpf@vger.kernel.org, Cong Wang <cong.wang@bytedance.com>
Subject: [Patch bpf v2 0/4] bpf: a bug fix and test cases for bpf_skb_change_tail()
Date: Thu, 28 Nov 2024 17:22:17 -0800 [thread overview]
Message-ID: <20241129012221.739069-1-xiyou.wangcong@gmail.com> (raw)
From: Cong Wang <cong.wang@bytedance.com>
This patchset fixes a bug in bpf_skb_change_tail() helper and adds test
cases for it, as requested by Daniel and John.
---
v2: added a test case for TC where offsets are positive
fixed a typo in 1/4 patch description
reduced buffer size in the sockmap test case
Cong Wang (4):
bpf: Check negative offsets in __bpf_skb_min_len()
selftests/bpf: Add a BPF selftest for bpf_skb_change_tail()
selftests/bpf: Introduce socket_helpers.h for TC tests
selftests/bpf: Test bpf_skb_change_tail() in TC ingress
net/core/filter.c | 21 +-
.../selftests/bpf/prog_tests/socket_helpers.h | 394 ++++++++++++++++++
.../selftests/bpf/prog_tests/sockmap_basic.c | 51 +++
.../bpf/prog_tests/sockmap_helpers.h | 385 +----------------
.../selftests/bpf/prog_tests/tc_change_tail.c | 78 ++++
.../bpf/progs/test_sockmap_change_tail.c | 40 ++
.../selftests/bpf/progs/test_tc_change_tail.c | 114 +++++
7 files changed, 693 insertions(+), 390 deletions(-)
create mode 100644 tools/testing/selftests/bpf/prog_tests/socket_helpers.h
create mode 100644 tools/testing/selftests/bpf/prog_tests/tc_change_tail.c
create mode 100644 tools/testing/selftests/bpf/progs/test_sockmap_change_tail.c
create mode 100644 tools/testing/selftests/bpf/progs/test_tc_change_tail.c
--
2.34.1
next reply other threads:[~2024-11-29 1:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 1:22 Cong Wang [this message]
2024-11-29 1:22 ` [Patch bpf v2 1/4] bpf: Check negative offsets in __bpf_skb_min_len() Cong Wang
2024-11-29 1:22 ` [Patch bpf v2 2/4] selftests/bpf: Add a BPF selftest for bpf_skb_change_tail() Cong Wang
2024-11-29 1:22 ` [Patch bpf v2 3/4] selftests/bpf: Introduce socket_helpers.h for TC tests Cong Wang
2024-11-29 1:22 ` [Patch bpf v2 4/4] selftests/bpf: Test bpf_skb_change_tail() in TC ingress Cong Wang
2024-12-06 21:35 ` [Patch bpf v2 0/4] bpf: a bug fix and test cases for bpf_skb_change_tail() Daniel Borkmann
2024-12-10 5:36 ` Cong Wang
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=20241129012221.739069-1-xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox