bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] tools: Update bpf header
@ 2021-06-29 17:37 Rumen Telbizov
  0 siblings, 0 replies; 2+ messages in thread
From: Rumen Telbizov @ 2021-06-29 17:37 UTC (permalink / raw)
  To: bpf; +Cc: David Ahern, Daniel Borkmann, Jesper Dangaard Brouer

Update bpf header under tools to bring in the bpf_fib_lookup
struct changes.

Signed-off-by: Rumen Telbizov <telbizov@gmail.com>
---
 tools/include/uapi/linux/bpf.h | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index ec6d85a81744..6c78cc9c3c75 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -5925,8 +5925,20 @@ struct bpf_fib_lookup {
  /* output */
  __be16 h_vlan_proto;
  __be16 h_vlan_TCI;
- __u8 smac[6];     /* ETH_ALEN */
- __u8 dmac[6];     /* ETH_ALEN */
+
+ union {
+ /* input */
+ struct {
+ __u32 mark;   /* fwmark for policy routing */
+ /* 2 4-byte holes for input */
+ };
+
+ /* output: source and dest mac */
+ struct {
+ __u8 smac[6]; /* ETH_ALEN */
+ __u8 dmac[6]; /* ETH_ALEN */
+ };
+ };
 };

 struct bpf_redir_neigh {
--
2.30.1 (Apple Git-130)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/3] tools: Update bpf header
  2021-06-29 18:55 [PATCH 0/3] Add support for fwmark to bpf_fib_lookup Rumen Telbizov
@ 2021-06-29 18:55 ` Rumen Telbizov
  0 siblings, 0 replies; 2+ messages in thread
From: Rumen Telbizov @ 2021-06-29 18:55 UTC (permalink / raw)
  To: bpf; +Cc: dsahern, David Ahern, Rumen Telbizov

From: David Ahern <dsahern@kernel.org>

Update bpf header under tools to bring in the bpf_fib_lookup
struct changes.

Signed-off-by: Rumen Telbizov <rumen.telbizov@menlosecurity.com>
---
 tools/include/uapi/linux/bpf.h | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index ec6d85a81744..6c78cc9c3c75 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -5925,8 +5925,20 @@ struct bpf_fib_lookup {
 	/* output */
 	__be16	h_vlan_proto;
 	__be16	h_vlan_TCI;
-	__u8	smac[6];     /* ETH_ALEN */
-	__u8	dmac[6];     /* ETH_ALEN */
+
+	union {
+		/* input */
+		struct {
+			__u32	mark;   /* fwmark for policy routing */
+			/* 2 4-byte holes for input */
+		};
+
+		/* output: source and dest mac */
+		struct {
+			__u8	smac[6];	/* ETH_ALEN */
+			__u8	dmac[6];	/* ETH_ALEN */
+		};
+	};
 };
 
 struct bpf_redir_neigh {
-- 
2.30.1 (Apple Git-130)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-29 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 17:37 [PATCH 2/3] tools: Update bpf header Rumen Telbizov
2021-06-29 18:55 [PATCH 0/3] Add support for fwmark to bpf_fib_lookup Rumen Telbizov
2021-06-29 18:55 ` [PATCH 2/3] tools: Update bpf header Rumen Telbizov

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).