Skip to content

PROG_TEST_RUN support for sk_lookup programs

Lorenz Bauer bpf netdev 5 versions – Applied

Status from this message: Applied. Thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 2 repliesApplied
  2. v35 patches 1 replySuperseded
  3. v2 posting 2/24 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/20 of 5 patches1 replySuperseded
v18 patches7 repliesSuperseded

Changes in v4 from the cover letter

- Use bpf_test_timer prefix (Andrii)

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/5bpf: consolidate shared test timing codenet/bpf/test_run.c+78 -631 reply
2/5bpf: add PROG_TEST_RUN support for sk_lookup programsinclude/linux/bpf.h include/uapi/linux/bpf.h net/bpf/test_run.c +2 more+124 -20 replies
3/5selftests: bpf: convert sk_lookup ctx access tests to PROG_TEST_RUNtools/testing/selftests/bpf/prog_tests/sk_lookup.c tools/testing/selftests/bpf/progs/test_sk_lookup.c+109 -360 replies
4/5selftests: bpf: check that PROG_TEST_RUN repeats as requestedtools/testing/selftests/bpf/prog_tests/prog_run_xattr.c+42 -90 replies
5/5selftests: bpf: don't run sk_lookup in verifier teststools/testing/selftests/bpf/test_verifier.c tools/testing/selftests/bpf/verifier/ctx_sk_lookup.c+3 -20 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchAndrii Nakryiko
1/5A-b
2/5
3/5
4/5
5/5

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

Read the v4 thread

Cover letter [PATCH bpf-next v4 0/5] PROG_TEST_RUN support for sk_lookup programs

We don't have PROG_TEST_RUN support for sk_lookup programs at the moment. So far this hasn't been a problem, since we can run our tests in a separate network namespace. For benchmarking it's nice to have PROG_TEST_RUN, so I've gone and implemented it.

Based on discussion on the v1 I've dropped support for testing multiple programs at once.

Changes since v3:
- Use bpf_test_timer prefix (Andrii)

Changes since v2:
- Fix test_verifier failure (Alexei)

Changes since v1:
- Add sparse annotations to the t_* functions
- Add appropriate type casts in bpf_prog_test_run_sk_lookup
- Drop running multiple programs

Lorenz Bauer (5):
bpf: consolidate shared test timing code
bpf: add PROG_TEST_RUN support for sk_lookup programs
selftests: bpf: convert sk_lookup ctx access tests to PROG_TEST_RUN
selftests: bpf: check that PROG_TEST_RUN repeats as requested
selftests: bpf: don't run sk_lookup in verifier tests

 include/linux/bpf.h                           |  10 +
 include/uapi/linux/bpf.h                      |   5 +-
 net/bpf/test_run.c                            | 246 +++++++++++++-----
 net/core/filter.c                             |   1 +
 tools/include/uapi/linux/bpf.h                |   5 +-
 .../selftests/bpf/prog_tests/prog_run_xattr.c |  51 +++-
 .../selftests/bpf/prog_tests/sk_lookup.c      |  83 ++++--
 .../selftests/bpf/progs/test_sk_lookup.c      |  62 +++--
 tools/testing/selftests/bpf/test_verifier.c   |   4 +-
 .../selftests/bpf/verifier/ctx_sk_lookup.c    |   1 +
 10 files changed, 356 insertions(+), 112 deletions(-)
Signature · 1 line
2.27.0