Skip to content

Commit 2f965e3

Browse files
Petar PenkovAlexei Starovoitov
authored andcommitted
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>
1 parent d58e468 commit 2f965e3

File tree

1 file changed

+26
-0
lines changed
  • tools/include/uapi/linux

1 file changed

+26
-0
lines changed

tools/include/uapi/linux/bpf.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ enum bpf_prog_type {
152152
BPF_PROG_TYPE_LWT_SEG6LOCAL,
153153
BPF_PROG_TYPE_LIRC_MODE2,
154154
BPF_PROG_TYPE_SK_REUSEPORT,
155+
BPF_PROG_TYPE_FLOW_DISSECTOR,
155156
};
156157

157158
enum bpf_attach_type {
@@ -172,6 +173,7 @@ enum bpf_attach_type {
172173
BPF_CGROUP_UDP4_SENDMSG,
173174
BPF_CGROUP_UDP6_SENDMSG,
174175
BPF_LIRC_MODE2,
176+
BPF_FLOW_DISSECTOR,
175177
__MAX_BPF_ATTACH_TYPE
176178
};
177179

@@ -2333,6 +2335,7 @@ struct __sk_buff {
23332335
/* ... here. */
23342336

23352337
__u32 data_meta;
2338+
struct bpf_flow_keys *flow_keys;
23362339
};
23372340

23382341
struct bpf_tunnel_key {
@@ -2778,4 +2781,27 @@ enum bpf_task_fd_type {
27782781
BPF_FD_TYPE_URETPROBE, /* filename + offset */
27792782
};
27802783

2784+
struct bpf_flow_keys {
2785+
__u16 nhoff;
2786+
__u16 thoff;
2787+
__u16 addr_proto; /* ETH_P_* of valid addrs */
2788+
__u8 is_frag;
2789+
__u8 is_first_frag;
2790+
__u8 is_encap;
2791+
__u8 ip_proto;
2792+
__be16 n_proto;
2793+
__be16 sport;
2794+
__be16 dport;
2795+
union {
2796+
struct {
2797+
__be32 ipv4_src;
2798+
__be32 ipv4_dst;
2799+
};
2800+
struct {
2801+
__u32 ipv6_src[4]; /* in6_addr; network order */
2802+
__u32 ipv6_dst[4]; /* in6_addr; network order */
2803+
};
2804+
};
2805+
};
2806+
27812807
#endif /* _UAPI__LINUX_BPF_H__ */

0 commit comments

Comments
 (0)