Skip to content

bpf: Batching iter for AF_UNIX sockets.

Kuniyuki Iwashima bpf netdev 2 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. v2 Latest5 patches 1 replyApplied
  2. v16 patches 2 repliesApplied

Changelog from the cover letter

- Add the 1st patch.
- Call unix_get_first() in .start()/.next() to always acquire a lock in each iteration in the 2nd patch.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5af_unix: Refactor unix_next_socket().net/unix/af_unix.c+30 -210 replies
2/5bpf: af_unix: Use batching algorithm in bpf unix iter.net/unix/af_unix.c+177 -70 replies
3/5bpf: Support bpf_(get|set)sockopt() in bpf unix iter.net/unix/af_unix.c+15 -00 replies
4/5selftest/bpf: Test batching and bpf_(get|set)sockopt in bpf unix iter.tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt_unix.c tools/testing/selftests/bpf/progs/bpf_iter_setsockopt_unix.c tools/testing/selftests/bpf/progs/bpf_tracing_net.h+162 -00 replies
5/5selftest/bpf: Fix a stale comment.tools/testing/selftests/bpf/progs/bpf_iter_unix.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 bpf-next 0/5] bpf: Batching iter for AF_UNIX sockets.

Last year the commit afd20b9290e1 ("af_unix: Replace the big lock with small locks.") landed on bpf-next. Now we can use a batching algorithm for AF_UNIX bpf iter as TCP bpf iter.

Changelog:
- Add the 1st patch.
- Call unix_get_first() in .start()/.next() to always acquire a lock in each iteration in the 2nd patch.

Kuniyuki Iwashima (5):
af_unix: Refactor unix_next_socket().
bpf: af_unix: Use batching algorithm in bpf unix iter.
bpf: Support bpf_(get|set)sockopt() in bpf unix iter. selftest/bpf: Test batching and bpf_(get|set)sockopt in bpf unix iter. selftest/bpf: Fix a stale comment.

 net/unix/af_unix.c                            | 250 ++++++++++++++++--
 .../bpf/prog_tests/bpf_iter_setsockopt_unix.c | 100 +++++++
 .../bpf/progs/bpf_iter_setsockopt_unix.c      |  60 +++++
 .../selftests/bpf/progs/bpf_iter_unix.c       |   2 +-
 .../selftests/bpf/progs/bpf_tracing_net.h     |   2 +
 5 files changed, 385 insertions(+), 29 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt_unix.c
 create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_setsockopt_unix.c
Signature · 1 line
2.30.2