* [PATCH 0/2 net-next] iproute2: VXLAN Group Policy extension
@ 2015-01-15 13:54 Thomas Graf
2015-01-15 13:54 ` [PATCH 1/2] vxlan: Group policy extension Thomas Graf
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Graf @ 2015-01-15 13:54 UTC (permalink / raw)
To: stephen; +Cc: netdev
Stephen,
Against net-next branch. I assume you only want to apply patch 1/2 after
the next header sync. I've included 2/2 if anyone wants to use it now and
needs the header bits
Thomas Graf (2):
vxlan: Group policy extension
vxlan: synchronize <linux/if_link.h> header
include/linux/if_link.h | 3 +++
ip/iplink_vxlan.c | 11 +++++++++++
man/man8/ip-link.8.in | 45 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+)
--
1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] vxlan: Group policy extension
2015-01-15 13:54 [PATCH 0/2 net-next] iproute2: VXLAN Group Policy extension Thomas Graf
@ 2015-01-15 13:54 ` Thomas Graf
2015-01-15 13:54 ` [PATCH 2/2] vxlan: synchronize <linux/if_link.h> header Thomas Graf
2015-02-05 18:32 ` [PATCH 0/2 net-next] iproute2: VXLAN Group Policy extension Stephen Hemminger
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Graf @ 2015-01-15 13:54 UTC (permalink / raw)
To: stephen; +Cc: netdev
Signed-off-by: Thomas Graf <tgraf@suug.ch>
---
ip/iplink_vxlan.c | 11 +++++++++++
man/man8/ip-link.8.in | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+)
diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c
index 9cc3ec3..473ff97 100644
--- a/ip/iplink_vxlan.c
+++ b/ip/iplink_vxlan.c
@@ -30,6 +30,7 @@ static void print_explain(FILE *f)
fprintf(f, " [ [no]l2miss ] [ [no]l3miss ]\n");
fprintf(f, " [ ageing SECONDS ] [ maxaddress NUMBER ]\n");
fprintf(f, " [ [no]udpcsum ] [ [no]udp6zerocsumtx ] [ [no]udp6zerocsumrx ]\n");
+ fprintf(f, " [ gbp ]\n");
fprintf(f, "\n");
fprintf(f, "Where: VNI := 0-16777215\n");
fprintf(f, " ADDR := { IP_ADDRESS | any }\n");
@@ -68,6 +69,7 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
__u8 udpcsum = 0;
__u8 udp6zerocsumtx = 0;
__u8 udp6zerocsumrx = 0;
+ __u8 gbp = 0;
int dst_port_set = 0;
struct ifla_vxlan_port_range range = { 0, 0 };
@@ -197,6 +199,8 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
udp6zerocsumrx = 1;
} else if (!matches(*argv, "noudp6zerocsumrx")) {
udp6zerocsumrx = 0;
+ } else if (!matches(*argv, "gbp")) {
+ gbp = 1;
} else if (matches(*argv, "help") == 0) {
explain();
return -1;
@@ -268,6 +272,10 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
if (dstport)
addattr16(n, 1024, IFLA_VXLAN_PORT, htons(dstport));
+ if (gbp)
+ addattr_l(n, 1024, IFLA_VXLAN_GBP, NULL, 0);
+
+
return 0;
}
@@ -398,6 +406,9 @@ static void vxlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_VXLAN_UDP_ZERO_CSUM6_RX] &&
rta_getattr_u8(tb[IFLA_VXLAN_UDP_ZERO_CSUM6_RX]))
fputs("udp6zerocsumrx ", f);
+
+ if (tb[IFLA_VXLAN_GBP])
+ fputs("gbp ", f);
}
static void vxlan_print_help(struct link_util *lu, int argc, char **argv,
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 1209b55..be52ac6 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -276,6 +276,8 @@ the following additional arguments are supported:
.BI ageing " SECONDS "
.R " ] [ "
.BI maxaddress " NUMBER "
+.R " ] [ "
+.B gbp
.R " ]"
.in +8
@@ -348,6 +350,49 @@ are entered into the VXLAN device forwarding database.
.BI maxaddress " NUMBER"
- specifies the maximum number of FDB entries.
+.sp
+.B gbp
+- enables the Group Policy extension (VXLAN-GBP).
+
+.in +4
+Allows to transport group policy context across VXLAN network peers.
+If enabled, includes the mark of a packet in the VXLAN header for outgoing
+packets and fills the packet mark based on the information found in the
+VXLAN header for incomming packets.
+
+Format of upper 16 bits of packet mark (flags);
+
+.in +2
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+.br
+|-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
+.br
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+.B D :=
+Don't Learn bit. When set, this bit indicates that the egress
+VTEP MUST NOT learn the source address of the encapsulated frame.
+
+.B A :=
+Indicates that the group policy has already been applied to
+this packet. Policies MUST NOT be applied by devices when the A bit is set.
+.in -2
+
+Format of lower 16 bits of packet mark (policy ID):
+
+.in +2
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+.br
+| Group Policy ID |
+.br
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+.in -2
+
+Example:
+ iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
+
+.in -4
+
.in -8
.TP
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] vxlan: synchronize <linux/if_link.h> header
2015-01-15 13:54 [PATCH 0/2 net-next] iproute2: VXLAN Group Policy extension Thomas Graf
2015-01-15 13:54 ` [PATCH 1/2] vxlan: Group policy extension Thomas Graf
@ 2015-01-15 13:54 ` Thomas Graf
2015-02-05 18:32 ` [PATCH 0/2 net-next] iproute2: VXLAN Group Policy extension Stephen Hemminger
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Graf @ 2015-01-15 13:54 UTC (permalink / raw)
To: stephen; +Cc: netdev
Signed-off-by: Thomas Graf <tgraf@suug.ch>
---
include/linux/if_link.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 167ec34..0b33d0a 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -368,6 +368,9 @@ enum {
IFLA_VXLAN_UDP_CSUM,
IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
+ IFLA_VXLAN_REMCSUM_TX,
+ IFLA_VXLAN_REMCSUM_RX,
+ IFLA_VXLAN_GBP,
__IFLA_VXLAN_MAX
};
#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2 net-next] iproute2: VXLAN Group Policy extension
2015-01-15 13:54 [PATCH 0/2 net-next] iproute2: VXLAN Group Policy extension Thomas Graf
2015-01-15 13:54 ` [PATCH 1/2] vxlan: Group policy extension Thomas Graf
2015-01-15 13:54 ` [PATCH 2/2] vxlan: synchronize <linux/if_link.h> header Thomas Graf
@ 2015-02-05 18:32 ` Stephen Hemminger
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2015-02-05 18:32 UTC (permalink / raw)
To: Thomas Graf; +Cc: netdev
On Thu, 15 Jan 2015 14:54:24 +0100
Thomas Graf <tgraf@suug.ch> wrote:
> Stephen,
>
> Against net-next branch. I assume you only want to apply patch 1/2 after
> the next header sync. I've included 2/2 if anyone wants to use it now and
> needs the header bits
>
> Thomas Graf (2):
> vxlan: Group policy extension
> vxlan: synchronize <linux/if_link.h> header
>
> include/linux/if_link.h | 3 +++
> ip/iplink_vxlan.c | 11 +++++++++++
> man/man8/ip-link.8.in | 45 +++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 59 insertions(+)
>
I picked headers up in separate merge.
The iplink changes are waiting in net-next branch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-05 18:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15 13:54 [PATCH 0/2 net-next] iproute2: VXLAN Group Policy extension Thomas Graf
2015-01-15 13:54 ` [PATCH 1/2] vxlan: Group policy extension Thomas Graf
2015-01-15 13:54 ` [PATCH 2/2] vxlan: synchronize <linux/if_link.h> header Thomas Graf
2015-02-05 18:32 ` [PATCH 0/2 net-next] iproute2: VXLAN Group Policy extension Stephen Hemminger
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).