Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bpf: sync bpf.h uapi with tools/

This patch syncs tools/include/uapi/linux/bpf.h with the flow dissector
definitions from include/uapi/linux/bpf.h

Signed-off-by: Petar Penkov <ppenkov@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Petar Penkov and committed by
Alexei Starovoitov
2f965e3f d58e468b

+26
+26
tools/include/uapi/linux/bpf.h
··· 152 152 BPF_PROG_TYPE_LWT_SEG6LOCAL, 153 153 BPF_PROG_TYPE_LIRC_MODE2, 154 154 BPF_PROG_TYPE_SK_REUSEPORT, 155 + BPF_PROG_TYPE_FLOW_DISSECTOR, 155 156 }; 156 157 157 158 enum bpf_attach_type { ··· 173 172 BPF_CGROUP_UDP4_SENDMSG, 174 173 BPF_CGROUP_UDP6_SENDMSG, 175 174 BPF_LIRC_MODE2, 175 + BPF_FLOW_DISSECTOR, 176 176 __MAX_BPF_ATTACH_TYPE 177 177 }; 178 178 ··· 2335 2333 /* ... here. */ 2336 2334 2337 2335 __u32 data_meta; 2336 + struct bpf_flow_keys *flow_keys; 2338 2337 }; 2339 2338 2340 2339 struct bpf_tunnel_key { ··· 2779 2776 BPF_FD_TYPE_KRETPROBE, /* (symbol + offset) or addr */ 2780 2777 BPF_FD_TYPE_UPROBE, /* filename + offset */ 2781 2778 BPF_FD_TYPE_URETPROBE, /* filename + offset */ 2779 + }; 2780 + 2781 + struct bpf_flow_keys { 2782 + __u16 nhoff; 2783 + __u16 thoff; 2784 + __u16 addr_proto; /* ETH_P_* of valid addrs */ 2785 + __u8 is_frag; 2786 + __u8 is_first_frag; 2787 + __u8 is_encap; 2788 + __u8 ip_proto; 2789 + __be16 n_proto; 2790 + __be16 sport; 2791 + __be16 dport; 2792 + union { 2793 + struct { 2794 + __be32 ipv4_src; 2795 + __be32 ipv4_dst; 2796 + }; 2797 + struct { 2798 + __u32 ipv6_src[4]; /* in6_addr; network order */ 2799 + __u32 ipv6_dst[4]; /* in6_addr; network order */ 2800 + }; 2801 + }; 2782 2802 }; 2783 2803 2784 2804 #endif /* _UAPI__LINUX_BPF_H__ */