bpf: Refactor bpf_iter_reg to have separate seq_info member
authorYonghong Song <yhs@fb.com>
Thu, 23 Jul 2020 18:41:09 +0000 (11:41 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 26 Jul 2020 03:16:32 +0000 (20:16 -0700)
commit14fc6bd6b79c430f615500d0fe6cea4722110db8
tree5fef4ccfed6460489ece68286530134f630ad4eb
parenta228a64fc1e4428e2b96dc68e9ad3c447095c9e7
bpf: Refactor bpf_iter_reg to have separate seq_info member

There is no functionality change for this patch.
Struct bpf_iter_reg is used to register a bpf_iter target,
which includes information for both prog_load, link_create
and seq_file creation.

This patch puts fields related seq_file creation into
a different structure. This will be useful for map
elements iterator where one iterator covers different
map types and different map types may have different
seq_ops, init/fini private_data function and
private_data size.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200723184109.590030-1-yhs@fb.com
include/linux/bpf.h
kernel/bpf/bpf_iter.c
kernel/bpf/map_iter.c
kernel/bpf/prog_iter.c
kernel/bpf/task_iter.c
net/ipv4/tcp_ipv4.c
net/ipv4/udp.c
net/ipv6/route.c
net/netlink/af_netlink.c