From: Lorenz Bauer <lmb@cloudflare.com>
To: ast@kernel.org, yhs@fb.com, daniel@iogearbox.net,
jakub@cloudflare.com, john.fastabend@gmail.com
Cc: bpf@vger.kernel.org, kernel-team@cloudflare.com,
Lorenz Bauer <lmb@cloudflare.com>
Subject: [PATCH bpf-next v3 0/6] Sockmap iterator
Date: Fri, 4 Sep 2020 10:58:58 +0100 [thread overview]
Message-ID: <20200904095904.612390-1-lmb@cloudflare.com> (raw)
This addresses feedback of v2 [2] (see [1] for v1). From my POV the open
questions from v2 have been addressed.
I have a set of check_func_arg cleanups which I will post as a follow up
to this series.
Changes in v3:
- Use PTR_TO_BTF_ID in iterator context (Yonghong, Martin)
- Use rcu_dereference instead of rcu_dereference_raw (Jakub)
- Fix various test nits (Jakub, Andrii)
Changes in v2:
- Remove unnecessary sk_fullsock checks (Jakub)
- Nits for test output (Jakub)
- Increase number of sockets in tests to 64 (Jakub)
- Handle ENOENT in tests (Jakub)
- Actually test SOCKHASH iteration (myself)
- Fix SOCKHASH iterator initialization (myself)
1: https://lore.kernel.org/bpf/20200828094834.23290-1-lmb@cloudflare.com/
2: https://lore.kernel.org/bpf/20200901103210.54607-1-lmb@cloudflare.com/
Lorenz Bauer (6):
bpf: Allow passing BTF pointers as PTR_TO_SOCKET
net: sockmap: Remove unnecessary sk_fullsock checks
net: Allow iterating sockmap and sockhash
selftests: bpf: Ensure that BTF sockets cannot be released
selftests: bpf: Add helper to compare socket cookies
selftests: bpf: Test copying a sockmap via bpf_iter
kernel/bpf/verifier.c | 61 ++--
net/core/sock_map.c | 284 +++++++++++++++++-
.../bpf/prog_tests/reference_tracking.c | 20 +-
.../selftests/bpf/prog_tests/sockmap_basic.c | 138 ++++++++-
tools/testing/selftests/bpf/progs/bpf_iter.h | 9 +
.../selftests/bpf/progs/bpf_iter_sockmap.c | 57 ++++
.../selftests/bpf/progs/bpf_iter_sockmap.h | 3 +
.../bpf/progs/test_sk_ref_track_invalid.c | 20 ++
8 files changed, 548 insertions(+), 44 deletions(-)
create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_sockmap.c
create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_sockmap.h
create mode 100644 tools/testing/selftests/bpf/progs/test_sk_ref_track_invalid.c
--
2.25.1
next reply other threads:[~2020-09-04 9:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 9:58 Lorenz Bauer [this message]
2020-09-04 9:58 ` [PATCH bpf-next v3 1/6] bpf: Allow passing BTF pointers as PTR_TO_SOCKET Lorenz Bauer
2020-09-06 22:40 ` Martin KaFai Lau
2020-09-07 8:57 ` Lorenz Bauer
2020-09-08 19:52 ` Martin KaFai Lau
2020-09-09 9:16 ` Lorenz Bauer
2020-09-09 15:42 ` Lorenz Bauer
2020-09-09 16:40 ` Martin KaFai Lau
2020-09-04 9:59 ` [PATCH bpf-next v3 2/6] net: sockmap: Remove unnecessary sk_fullsock checks Lorenz Bauer
2020-09-04 9:59 ` [PATCH bpf-next v3 3/6] net: Allow iterating sockmap and sockhash Lorenz Bauer
2020-09-04 9:59 ` [PATCH bpf-next v3 4/6] selftests: bpf: Ensure that BTF sockets cannot be released Lorenz Bauer
2020-09-04 9:59 ` [PATCH bpf-next v3 5/6] selftests: bpf: Add helper to compare socket cookies Lorenz Bauer
2020-09-04 9:59 ` [PATCH bpf-next v3 6/6] selftests: bpf: Test copying a sockmap via bpf_iter Lorenz Bauer
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=20200904095904.612390-1-lmb@cloudflare.com \
--to=lmb@cloudflare.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=kernel-team@cloudflare.com \
--cc=yhs@fb.com \
/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