netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petar Penkov <peterpenkov96@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, ast@kernel.org, daniel@iogearbox.net,
	simon.horman@netronome.com, ecree@solarflare.com,
	songliubraving@fb.com, tom@herbertland.com,
	Petar Penkov <ppenkov@google.com>,
	Willem de Bruijn <willemb@google.com>
Subject: [bpf-next, v4 2/5] bpf: sync bpf.h uapi with tools/
Date: Fri, 14 Sep 2018 07:46:19 -0700	[thread overview]
Message-ID: <20180914144622.16436-3-peterpenkov96@gmail.com> (raw)
In-Reply-To: <20180914144622.16436-1-peterpenkov96@gmail.com>

From: Petar Penkov <ppenkov@google.com>

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>
---
 tools/include/uapi/linux/bpf.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 66917a4eba27..aa5ccd2385ed 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -152,6 +152,7 @@ enum bpf_prog_type {
 	BPF_PROG_TYPE_LWT_SEG6LOCAL,
 	BPF_PROG_TYPE_LIRC_MODE2,
 	BPF_PROG_TYPE_SK_REUSEPORT,
+	BPF_PROG_TYPE_FLOW_DISSECTOR,
 };
 
 enum bpf_attach_type {
@@ -172,6 +173,7 @@ enum bpf_attach_type {
 	BPF_CGROUP_UDP4_SENDMSG,
 	BPF_CGROUP_UDP6_SENDMSG,
 	BPF_LIRC_MODE2,
+	BPF_FLOW_DISSECTOR,
 	__MAX_BPF_ATTACH_TYPE
 };
 
@@ -2333,6 +2335,7 @@ struct __sk_buff {
 	/* ... here. */
 
 	__u32 data_meta;
+	struct bpf_flow_keys *flow_keys;
 };
 
 struct bpf_tunnel_key {
@@ -2778,4 +2781,27 @@ enum bpf_task_fd_type {
 	BPF_FD_TYPE_URETPROBE,		/* filename + offset */
 };
 
+struct bpf_flow_keys {
+	__u16	nhoff;
+	__u16	thoff;
+	__u16	addr_proto;			/* ETH_P_* of valid addrs */
+	__u8	is_frag;
+	__u8	is_first_frag;
+	__u8	is_encap;
+	__u8	ip_proto;
+	__be16	n_proto;
+	__be16	sport;
+	__be16	dport;
+	union {
+		struct {
+			__be32	ipv4_src;
+			__be32	ipv4_dst;
+		};
+		struct {
+			__u32	ipv6_src[4];	/* in6_addr; network order */
+			__u32	ipv6_dst[4];	/* in6_addr; network order */
+		};
+	};
+};
+
 #endif /* _UAPI__LINUX_BPF_H__ */
-- 
2.19.0.397.gdd90340f6a-goog

  parent reply	other threads:[~2018-09-14 20:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-14 14:46 [bpf-next, v4 0/5] Introduce eBPF flow dissector Petar Penkov
2018-09-14 14:46 ` [bpf-next, v4 1/5] flow_dissector: implements flow dissector BPF hook Petar Penkov
2018-09-18 18:07   ` Eric Dumazet
2018-09-18 20:40     ` Willem de Bruijn
2018-09-14 14:46 ` Petar Penkov [this message]
2018-09-14 14:46 ` [bpf-next, v4 3/5] bpf: support flow dissector in libbpf and bpftool Petar Penkov
2018-09-14 14:46 ` [bpf-next, v4 4/5] flow_dissector: implements eBPF parser Petar Penkov
2018-09-14 14:46 ` [bpf-next, v4 5/5] selftests/bpf: test bpf flow dissection Petar Penkov
2018-09-14 19:22 ` [bpf-next, v4 0/5] Introduce eBPF flow dissector Alexei Starovoitov
2018-09-14 21:47   ` Y Song
2018-09-14 21:49     ` Petar Penkov
2018-09-24 21:14       ` Willem de Bruijn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180914144622.16436-3-peterpenkov96@gmail.com \
    --to=peterpenkov96@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=ppenkov@google.com \
    --cc=simon.horman@netronome.com \
    --cc=songliubraving@fb.com \
    --cc=tom@herbertland.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).