bpf: Refactor to provide aux info to bpf_iter_init_seq_priv_t
authorYonghong Song <yhs@fb.com>
Thu, 23 Jul 2020 18:41:10 +0000 (11:41 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 26 Jul 2020 03:16:32 +0000 (20:16 -0700)
commitf9c792729581bd8b8473af163e8ab426c2c61d89
tree2b5ff0209c3cb3cd0ab98a145c3541ce40c11017
parent14fc6bd6b79c430f615500d0fe6cea4722110db8
bpf: Refactor to provide aux info to bpf_iter_init_seq_priv_t

This patch refactored target bpf_iter_init_seq_priv_t callback
function to accept additional information. This will be needed
in later patches for map element targets since a particular
map should be passed to traverse elements for that particular
map. In the future, other information may be passed to target
as well, e.g., pid, cgroup id, etc. to customize the iterator.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200723184110.590156-1-yhs@fb.com
fs/proc/proc_net.c
include/linux/bpf.h
include/linux/proc_fs.h
kernel/bpf/bpf_iter.c
kernel/bpf/task_iter.c
net/ipv4/tcp_ipv4.c
net/ipv4/udp.c