]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: af_unix: Implement BPF iterator for UNIX domain socket.
authorKuniyuki Iwashima <kuniyu@amazon.co.jp>
Sat, 14 Aug 2021 01:57:15 +0000 (10:57 +0900)
committerAndrii Nakryiko <andrii@kernel.org>
Sun, 15 Aug 2021 07:13:32 +0000 (00:13 -0700)
commit1c490f59ab01eca5ab20d701c784737f32d540f0
tree86ef0c1115eda01220a5ffa8053e48a1394a43fc
parent314076a254796c28232cf5b0ad9205e1580fca05
bpf: af_unix: Implement BPF iterator for UNIX domain socket.

This patch implements the BPF iterator for the UNIX domain socket.

Currently, the batch optimisation introduced for the TCP iterator in the
commit 152ad7e09df9 ("bpf: tcp: Bpf iter batching and lock_sock") is not
used for the UNIX domain socket.  It will require replacing the big lock
for the hash table with small locks for each hash list not to block other
processes.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210814015718.42704-2-kuniyu@amazon.co.jp
include/linux/btf_ids.h
net/unix/af_unix.c