netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch bpf v3 0/4] bpf: a bug fix and test cases for bpf_skb_change_tail()
@ 2024-12-13  3:40 Cong Wang
  2024-12-13  3:40 ` [Patch bpf v3 1/4] bpf: Check negative offsets in __bpf_skb_min_len() Cong Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Cong Wang @ 2024-12-13  3:40 UTC (permalink / raw)
  To: netdev; +Cc: bpf, Cong Wang

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.

---
v3: switched to TCX prog attaching API
    switched to UDP from TCP for TC test
    cleaned up TC test code

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 |  62 +++
 .../bpf/progs/test_sockmap_change_tail.c      |  40 ++
 .../selftests/bpf/progs/test_tc_change_tail.c | 106 +++++
 7 files changed, 669 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-12-20 22:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13  3:40 [Patch bpf v3 0/4] bpf: a bug fix and test cases for bpf_skb_change_tail() Cong Wang
2024-12-13  3:40 ` [Patch bpf v3 1/4] bpf: Check negative offsets in __bpf_skb_min_len() Cong Wang
2024-12-20 17:51   ` John Fastabend
2024-12-13  3:40 ` [Patch bpf v3 2/4] selftests/bpf: Add a BPF selftest for bpf_skb_change_tail() Cong Wang
2024-12-20 17:52   ` John Fastabend
2024-12-13  3:40 ` [Patch bpf v3 3/4] selftests/bpf: Introduce socket_helpers.h for TC tests Cong Wang
2024-12-20 17:53   ` John Fastabend
2024-12-13  3:40 ` [Patch bpf v3 4/4] selftests/bpf: Test bpf_skb_change_tail() in TC ingress Cong Wang
2024-12-20 17:55   ` John Fastabend
2024-12-20 22:20 ` [Patch bpf v3 0/4] bpf: a bug fix and test cases for bpf_skb_change_tail() patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).