Skip to content

bpf: a bug fix and test cases for bpf_skb_change_tail()

Cong Wang bpf netdev 3 versions – Applied

Status from this message: This series was applied to bpf/bpf.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 4 repliesApplied 4/4
  2. v24 patches 2 repliesSuperseded
  3. v12 patches 3 repliesSuperseded

Patches in v3 All 4 applied

#Subject and filesSizeRepliesApplied
1/4bpf: Check negative offsets in __bpf_skb_min_len()net/core/filter.c+15 -61 replyApplied
2/4selftests/bpf: Add a BPF selftest for bpf_skb_change_tail()tools/testing/selftests/bpf/prog_tests/sockmap_basic.c tools/testing/selftests/bpf/progs/test_sockmap_change_tail.c+91 -01 replyApplied
3/4selftests/bpf: Introduce socket_helpers.h for TC teststools/testing/selftests/bpf/prog_tests/socket_helpers.h tools/testing/selftests/bpf/prog_tests/sockmap_helpers.h+395 -3841 replyApplied
4/4selftests/bpf: Test bpf_skb_change_tail() in TC ingresstools/testing/selftests/bpf/prog_tests/tc_change_tail.c tools/testing/selftests/bpf/progs/test_tc_change_tail.c+168 -01 replyApplied

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchZijian ZhangJohn Fastabend
1/4A-b
2/4A-b
3/4A-b
4/4T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Patch bpf v3 0/4] bpf: a bug fix and test cases for bpf_skb_change_tail()

From: Cong Wang <[email protected]>

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
Signature · 1 line
2.34.1