bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/5] bpf: Batching iter for AF_UNIX sockets.
@ 2022-01-13  0:28 Kuniyuki Iwashima
  2022-01-13  0:28 ` [PATCH v2 bpf-next 1/5] af_unix: Refactor unix_next_socket() Kuniyuki Iwashima
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Kuniyuki Iwashima @ 2022-01-13  0:28 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko
  Cc: Martin KaFai Lau, Benjamin Herrenschmidt, Kuniyuki Iwashima,
	Kuniyuki Iwashima, bpf, netdev

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

-- 
2.30.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-18 23:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13  0:28 [PATCH v2 bpf-next 0/5] bpf: Batching iter for AF_UNIX sockets Kuniyuki Iwashima
2022-01-13  0:28 ` [PATCH v2 bpf-next 1/5] af_unix: Refactor unix_next_socket() Kuniyuki Iwashima
2022-01-13  0:28 ` [PATCH v2 bpf-next 2/5] bpf: af_unix: Use batching algorithm in bpf unix iter Kuniyuki Iwashima
2022-01-13  0:28 ` [PATCH v2 bpf-next 3/5] bpf: Support bpf_(get|set)sockopt() " Kuniyuki Iwashima
2022-01-13  0:28 ` [PATCH v2 bpf-next 4/5] selftest/bpf: Test batching and bpf_(get|set)sockopt " Kuniyuki Iwashima
2022-01-13  0:28 ` [PATCH v2 bpf-next 5/5] selftest/bpf: Fix a stale comment Kuniyuki Iwashima
2022-01-18 23:53 ` [PATCH v2 bpf-next 0/5] bpf: Batching iter for AF_UNIX sockets Alexei Starovoitov

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).