iplink_vlan: add support for VLAN bridge binding flag
This patch adds support for the VLAN bridge binding flag that is
provided in net-next kernel by the series merged by 1ab839281cf7
("net-support-binding-vlan-dev-link-state-to-vlan-member-bridge-ports")
Signed-off-by: Mike Manning <mmanning@vyatta.att-mail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
70de8a7fa7
commit
3f2e457ae4
|
|
@ -27,6 +27,7 @@ static void print_explain(FILE *f)
|
|||
" [ gvrp { on | off } ]\n"
|
||||
" [ mvrp { on | off } ]\n"
|
||||
" [ loose_binding { on | off } ]\n"
|
||||
" [ bridge_binding { on | off } ]\n"
|
||||
" [ ingress-qos-map QOS-MAP ]\n"
|
||||
" [ egress-qos-map QOS-MAP ]\n"
|
||||
"\n"
|
||||
|
|
@ -134,6 +135,15 @@ static int vlan_parse_opt(struct link_util *lu, int argc, char **argv,
|
|||
flags.flags &= ~VLAN_FLAG_LOOSE_BINDING;
|
||||
else
|
||||
return on_off("loose_binding", *argv);
|
||||
} else if (matches(*argv, "bridge_binding") == 0) {
|
||||
NEXT_ARG();
|
||||
flags.mask |= VLAN_FLAG_BRIDGE_BINDING;
|
||||
if (strcmp(*argv, "on") == 0)
|
||||
flags.flags |= VLAN_FLAG_BRIDGE_BINDING;
|
||||
else if (strcmp(*argv, "off") == 0)
|
||||
flags.flags &= ~VLAN_FLAG_BRIDGE_BINDING;
|
||||
else
|
||||
return on_off("bridge_binding", *argv);
|
||||
} else if (matches(*argv, "ingress-qos-map") == 0) {
|
||||
NEXT_ARG();
|
||||
if (vlan_parse_qos_map(&argc, &argv, n,
|
||||
|
|
@ -204,6 +214,7 @@ static void vlan_print_flags(FILE *fp, __u32 flags)
|
|||
_PF(GVRP);
|
||||
_PF(MVRP);
|
||||
_PF(LOOSE_BINDING);
|
||||
_PF(BRIDGE_BINDING);
|
||||
#undef _PF
|
||||
if (flags)
|
||||
print_hex(PRINT_ANY, NULL, "%x", flags);
|
||||
|
|
|
|||
|
|
@ -406,6 +406,9 @@ the following additional arguments are supported:
|
|||
.BR loose_binding " { " on " | " off " } "
|
||||
]
|
||||
[
|
||||
.BR bridge_binding " { " on " | " off " } "
|
||||
]
|
||||
[
|
||||
.BI ingress-qos-map " QOS-MAP "
|
||||
]
|
||||
[
|
||||
|
|
@ -459,6 +462,10 @@ where <phy_dev> is the physical device to which VLAN device is bound.
|
|||
.BR loose_binding " { " on " | " off " } "
|
||||
- specifies whether the VLAN device state is bound to the physical device state.
|
||||
|
||||
.BR bridge_binding " { " on " | " off " } "
|
||||
- specifies whether the VLAN device link state tracks the state of bridge ports
|
||||
that are members of the VLAN.
|
||||
|
||||
.BI ingress-qos-map " QOS-MAP "
|
||||
- defines a mapping of VLAN header prio field to the Linux internal packet
|
||||
priority on incoming frames. The format is FROM:TO with multiple mappings
|
||||
|
|
|
|||
Loading…
Reference in New Issue