* [PATCH iproute2] iplink_vlan: Add flag for Multiple VLAN Registration Protocol (MVRP)
@ 2013-02-27 23:00 David Ward
0 siblings, 0 replies; 3+ messages in thread
From: David Ward @ 2013-02-27 23:00 UTC (permalink / raw)
To: netdev; +Cc: David Ward
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Patrick McHardy <kaber@trash.net>
---
include/linux/if_vlan.h | 1 +
ip/iplink_vlan.c | 12 +++++++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 3be1ca6..24ae007 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -34,6 +34,7 @@ enum vlan_flags {
VLAN_FLAG_REORDER_HDR = 0x1,
VLAN_FLAG_GVRP = 0x2,
VLAN_FLAG_LOOSE_BINDING = 0x4,
+ VLAN_FLAG_MVRP = 0x8,
};
enum vlan_name_types {
diff --git a/ip/iplink_vlan.c b/ip/iplink_vlan.c
index 26ceb8d..ed8984a 100644
--- a/ip/iplink_vlan.c
+++ b/ip/iplink_vlan.c
@@ -26,7 +26,7 @@ static void explain(void)
"\n"
"VLANID := 0-4095\n"
"FLAG-LIST := [ FLAG-LIST ] FLAG\n"
- "FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ]\n"
+ "FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ] [ mvrp { on | off } ]\n"
" [ loose_binding { on | off } ]\n"
"QOS-MAP := [ QOS-MAP ] QOS-MAPPING\n"
"QOS-MAPPING := FROM:TO\n"
@@ -103,6 +103,15 @@ static int vlan_parse_opt(struct link_util *lu, int argc, char **argv,
flags.flags &= ~VLAN_FLAG_GVRP;
else
return on_off("gvrp", *argv);
+ } else if (matches(*argv, "mvrp") == 0) {
+ NEXT_ARG();
+ flags.mask |= VLAN_FLAG_MVRP;
+ if (strcmp(*argv, "on") == 0)
+ flags.flags |= VLAN_FLAG_MVRP;
+ else if (strcmp(*argv, "off") == 0)
+ flags.flags &= ~VLAN_FLAG_MVRP;
+ else
+ return on_off("mvrp", *argv);
} else if (matches(*argv, "loose_binding") == 0) {
NEXT_ARG();
flags.mask |= VLAN_FLAG_LOOSE_BINDING;
@@ -166,6 +175,7 @@ static void vlan_print_flags(FILE *fp, __u32 flags)
}
_PF(REORDER_HDR);
_PF(GVRP);
+ _PF(MVRP);
_PF(LOOSE_BINDING);
#undef _PF
if (flags)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 0/2] Multiple VLAN Registration Protocol (IEEE 802.1Q-2011)
@ 2013-02-09 3:17 David Ward
2013-02-09 3:17 ` [PATCH iproute2] iplink_vlan: Add flag for Multiple VLAN Registration Protocol (MVRP) David Ward
0 siblings, 1 reply; 3+ messages in thread
From: David Ward @ 2013-02-09 3:17 UTC (permalink / raw)
To: netdev; +Cc: David Ward
The Linux kernel currently implements the GARP VLAN Registration
Protocol (GVRP) from IEEE 802.1Q-1998 (applicant-only participant).
When the GVRP flag is set for a VLAN interface on a Linux host, the
host advertises its membership in the VLAN to the attached bridge/
switch, so that it is not necessary to manually configure the bridge/
switch port to participate in the VLAN.
GVRP has been superseded by the Multiple VLAN Registration Protocol
(MVRP) in IEEE 802.1Q-2011, which addresses scalability concerns about
the earlier protocol. The following patches add support for MVRP to
the Linux kernel and iproute2 utility. They are based largely off of
the existing implementation of GVRP, but have been modified for the
new PDU structure and state machine.
This implementation was tested with two Juniper EX4200 switches.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Patrick McHardy <kaber@trash.net>
David Ward (2):
net/802: Implement Multiple Registration Protocol (MRP)
net/8021q: Implement Multiple VLAN Registration Protocol (MVRP)
include/linux/netdevice.h | 2 +
include/net/mrp.h | 143 +++++++
include/uapi/linux/if_ether.h | 1 +
include/uapi/linux/if_vlan.h | 1 +
net/802/Kconfig | 3 +
net/802/Makefile | 1 +
net/802/mrp.c | 895 +++++++++++++++++++++++++++++++++++++++++
net/8021q/Kconfig | 11 +
net/8021q/Makefile | 1 +
net/8021q/vlan.c | 27 +-
net/8021q/vlan.h | 16 +
net/8021q/vlan_dev.c | 12 +-
net/8021q/vlan_mvrp.c | 72 ++++
net/8021q/vlan_netlink.c | 2 +-
14 files changed, 1180 insertions(+), 7 deletions(-)
create mode 100644 include/net/mrp.h
create mode 100644 net/802/mrp.c
create mode 100644 net/8021q/vlan_mvrp.c
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH iproute2] iplink_vlan: Add flag for Multiple VLAN Registration Protocol (MVRP)
2013-02-09 3:17 [PATCH 0/2] Multiple VLAN Registration Protocol (IEEE 802.1Q-2011) David Ward
@ 2013-02-09 3:17 ` David Ward
2013-02-11 17:18 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: David Ward @ 2013-02-09 3:17 UTC (permalink / raw)
To: netdev; +Cc: David Ward
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Patrick McHardy <kaber@trash.net>
---
include/linux/if_vlan.h | 1 +
ip/iplink_vlan.c | 12 +++++++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 3be1ca6..24ae007 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -34,6 +34,7 @@ enum vlan_flags {
VLAN_FLAG_REORDER_HDR = 0x1,
VLAN_FLAG_GVRP = 0x2,
VLAN_FLAG_LOOSE_BINDING = 0x4,
+ VLAN_FLAG_MVRP = 0x8,
};
enum vlan_name_types {
diff --git a/ip/iplink_vlan.c b/ip/iplink_vlan.c
index 97af8d6..4d155b6 100644
--- a/ip/iplink_vlan.c
+++ b/ip/iplink_vlan.c
@@ -26,7 +26,7 @@ static void explain(void)
"\n"
"VLANID := 0-4095\n"
"FLAG-LIST := [ FLAG-LIST ] FLAG\n"
- "FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ]\n"
+ "FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ] [ mvrp { on | off } ]\n"
" [ loose_binding { on | off } ]\n"
"QOS-MAP := [ QOS-MAP ] QOS-MAPPING\n"
"QOS-MAPPING := FROM:TO\n"
@@ -103,6 +103,15 @@ static int vlan_parse_opt(struct link_util *lu, int argc, char **argv,
flags.flags &= ~VLAN_FLAG_GVRP;
else
return on_off("gvrp");
+ } else if (matches(*argv, "mvrp") == 0) {
+ NEXT_ARG();
+ flags.mask |= VLAN_FLAG_MVRP;
+ if (strcmp(*argv, "on") == 0)
+ flags.flags |= VLAN_FLAG_MVRP;
+ else if (strcmp(*argv, "off") == 0)
+ flags.flags &= ~VLAN_FLAG_MVRP;
+ else
+ return on_off("mvrp");
} else if (matches(*argv, "loose_binding") == 0) {
NEXT_ARG();
flags.mask |= VLAN_FLAG_LOOSE_BINDING;
@@ -166,6 +175,7 @@ static void vlan_print_flags(FILE *fp, __u32 flags)
}
_PF(REORDER_HDR);
_PF(GVRP);
+ _PF(MVRP);
_PF(LOOSE_BINDING);
#undef _PF
if (flags)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-27 23:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27 23:00 [PATCH iproute2] iplink_vlan: Add flag for Multiple VLAN Registration Protocol (MVRP) David Ward
-- strict thread matches above, loose matches on Subject: below --
2013-02-09 3:17 [PATCH 0/2] Multiple VLAN Registration Protocol (IEEE 802.1Q-2011) David Ward
2013-02-09 3:17 ` [PATCH iproute2] iplink_vlan: Add flag for Multiple VLAN Registration Protocol (MVRP) David Ward
2013-02-11 17:18 ` 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).