bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>,
	Benjamin Herrenschmidt <benh@amazon.com>,
	Kuniyuki Iwashima <kuniyu@amazon.co.jp>,
	Kuniyuki Iwashima <kuni1840@gmail.com>, <bpf@vger.kernel.org>,
	<netdev@vger.kernel.org>
Subject: [PATCH v2 bpf-next 0/5] bpf: Batching iter for AF_UNIX sockets.
Date: Thu, 13 Jan 2022 09:28:44 +0900	[thread overview]
Message-ID: <20220113002849.4384-1-kuniyu@amazon.co.jp> (raw)

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


             reply	other threads:[~2022-01-13  0:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13  0:28 Kuniyuki Iwashima [this message]
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

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=20220113002849.4384-1-kuniyu@amazon.co.jp \
    --to=kuniyu@amazon.co.jp \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=benh@amazon.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kafai@fb.com \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).