aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2020-06-23 16:08:12 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-06-24 18:37:59 -0700
commit9e8ca27afab6c92477b459f6a5d2af0cd3197c20 (patch)
tree921d5f3e7983888dff71e9fcd9209d2d572fdcfa /include/net
parentbpf: Add bpf_skc_to_{tcp, tcp_timewait, tcp_request}_sock() helpers (diff)
downloadlinux-dev-9e8ca27afab6c92477b459f6a5d2af0cd3197c20.tar.xz
linux-dev-9e8ca27afab6c92477b459f6a5d2af0cd3197c20.zip
net: bpf: Add bpf_seq_afinfo in udp_iter_state
Similar to tcp_iter_state, a new field bpf_seq_afinfo is added to udp_iter_state to provide bpf udp iterator afinfo. This does not change /proc/net/{udp, udp6} behavior. But it enables bpf iterator to avoid get afinfo from PDE_DATA and iterate through all udp and udp6 sockets in one pass. Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20200623230812.3988347-1-yhs@fb.com
Diffstat (limited to 'include/net')
-rw-r--r--include/net/udp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/udp.h b/include/net/udp.h
index a8fa6c0c6ded..67c8b7368845 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -440,6 +440,7 @@ struct udp_seq_afinfo {
struct udp_iter_state {
struct seq_net_private p;
int bucket;
+ struct udp_seq_afinfo *bpf_seq_afinfo;
};
void *udp_seq_start(struct seq_file *seq, loff_t *pos);