[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210804070851.97834-1-kuniyu@amazon.co.jp>
Date: Wed, 4 Aug 2021 16:08:49 +0900
From: Kuniyuki Iwashima <kuniyu@...zon.co.jp>
To: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
"Song Liu" <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>
CC: Benjamin Herrenschmidt <benh@...zon.com>,
Kuniyuki Iwashima <kuniyu@...zon.co.jp>,
Kuniyuki Iwashima <kuni1840@...il.com>, <bpf@...r.kernel.org>,
<netdev@...r.kernel.org>
Subject: [PATCH v3 bpf-next 0/2] BPF iterator for UNIX domain socket.
This patch set adds BPF iterator support for UNIX domain socket. The first
patch implements it and the second adds a selftest.
Changelog:
v3:
- Export some functions for CONFIG_UNIX=m
v2:
https://lore.kernel.org/netdev/20210803011110.21205-1-kuniyu@amazon.co.jp/
- Implement bpf_iter specific seq_ops->stop()
- Add bpf_iter__unix in bpf_iter.h
- Move common definitions in selftest to bpf_tracing_net.h
- Include the code for abstract UNIX domain socket as comment in selftest
- Use ASSERT_OK_PTR() instead of CHECK()
- Make ternary operators on single line
v1:
https://lore.kernel.org/netdev/20210729233645.4869-1-kuniyu@amazon.co.jp/
Kuniyuki Iwashima (2):
bpf: af_unix: Implement BPF iterator for UNIX domain socket.
selftest/bpf: Implement sample UNIX domain socket iterator program.
fs/proc/proc_net.c | 2 +
include/linux/btf_ids.h | 3 +-
kernel/bpf/bpf_iter.c | 3 +
net/core/filter.c | 1 +
net/unix/af_unix.c | 93 +++++++++++++++++++
.../selftests/bpf/prog_tests/bpf_iter.c | 16 ++++
tools/testing/selftests/bpf/progs/bpf_iter.h | 8 ++
.../selftests/bpf/progs/bpf_iter_unix.c | 86 +++++++++++++++++
.../selftests/bpf/progs/bpf_tracing_net.h | 4 +
9 files changed, 215 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_unix.c
--
2.30.2
Powered by blists - more mailing lists