Sockmap iterator
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest3 patches 3 repliesIn review
- v47 patches 1 replySuperseded
- v36 patches 6 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 4 patches | 10 replies | Superseded | |
| v1 | 3 patches | 7 replies | Superseded |
Changes in v5 from the cover letter
- Drop pointer to struct sock shenanigans
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | net: sockmap: Remove unnecessary sk_fullsock checksnet/ | +2 | 0 replies | |
| 2/3 | net: Allow iterating sockmap and sockhashnet/ | +278 | 1 reply | |
| 3/3 | selftests: bpf: Test iterating a sockmaptools/ tools/ tools/ +1 more | +144 | 2 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Yonghong Song |
|---|---|
| 1/3 | |
| 2/3 | A-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf-next v5 0/3] Sockmap iterator
I've decided to drop the changes that extend BTF pointers from this series. They are a lot more work than I anticipated, and I don't want to hold this up more.
The context for a sockmap / sockhash iterator contains the key, and a BTF pointer to a socket. Iterating a sockmap will yield a NULL socket if the slot in the array is empty. Iterating a hashmap will never yield a NULL socket.
I'll add support to call map_update_elem from bpf_iter in a follow up to this series.
Changes in v5:
- Drop pointer to struct sock shenanigans
Changes in v4:
- Alias struct sock* to PTR_TO_SOCK_COMMON instead of PTR_TO_SOCKET (Martin)
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)
Lorenz Bauer (3):
net: sockmap: Remove unnecessary sk_fullsock checks
net: Allow iterating sockmap and sockhash
selftests: bpf: Test iterating a sockmap
net/core/sock_map.c | 284 +++++++++++++++++- .../selftests/bpf/prog_tests/sockmap_basic.c | 89 ++++++ tools/testing/selftests/bpf/progs/bpf_iter.h | 9 + .../selftests/bpf/progs/bpf_iter_sockmap.c | 43 +++ .../selftests/bpf/progs/bpf_iter_sockmap.h | 3 + 5 files changed, 424 insertions(+), 4 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
Signature · 1 line
2.25.1