From: Lorenz Bauer <lmb@cloudflare.com> To: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org Cc: kernel-team@cloudflare.com, netdev@vger.kernel.org, bpf@vger.kernel.org, Lorenz Bauer <lmb@cloudflare.com> Subject: [PATCH bpf-next v4 0/5] PROG_TEST_RUN support for sk_lookup programs Date: Wed, 3 Mar 2021 10:18:11 +0000 [thread overview] Message-ID: <20210303101816.36774-1-lmb@cloudflare.com> (raw) 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(-) -- 2.27.0
next reply other threads:[~2021-03-03 22:56 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-03 10:18 Lorenz Bauer [this message] 2021-03-03 10:18 ` [PATCH bpf-next v4 1/5] bpf: consolidate shared test timing code Lorenz Bauer 2021-03-04 18:51 ` Andrii Nakryiko 2021-03-03 10:18 ` [PATCH bpf-next v4 2/5] bpf: add PROG_TEST_RUN support for sk_lookup programs Lorenz Bauer 2021-03-03 10:18 ` [PATCH bpf-next v4 3/5] selftests: bpf: convert sk_lookup ctx access tests to PROG_TEST_RUN Lorenz Bauer 2021-03-03 10:18 ` [PATCH bpf-next v4 4/5] selftests: bpf: check that PROG_TEST_RUN repeats as requested Lorenz Bauer 2021-03-03 10:18 ` [PATCH bpf-next v4 5/5] selftests: bpf: don't run sk_lookup in verifier tests Lorenz Bauer 2021-03-05 3:21 ` [PATCH bpf-next v4 0/5] PROG_TEST_RUN support for sk_lookup programs Alexei Starovoitov
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=20210303101816.36774-1-lmb@cloudflare.com \ --to=lmb@cloudflare.com \ --cc=andrii@kernel.org \ --cc=ast@kernel.org \ --cc=bpf@vger.kernel.org \ --cc=daniel@iogearbox.net \ --cc=kernel-team@cloudflare.com \ --cc=netdev@vger.kernel.org \ --subject='Re: [PATCH bpf-next v4 0/5] PROG_TEST_RUN support for sk_lookup programs' \ /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
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).