diff options
author | Eli Britstein <elibr@mellanox.com> | 2019-05-12 05:51:00 +0000 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-05-24 11:22:10 -0700 |
commit | ffbe41dbcb4882aafdf80d86afa1906b2a00199e (patch) | |
tree | 36afd692f9017406ca83f1cfd702e0adab1af9f0 /vswitchd | |
parent | 88f52d7fabb0d22296223b97d51747f696c87d45 (diff) | |
download | openvswitch-ffbe41dbcb4882aafdf80d86afa1906b2a00199e.tar.gz |
ofproto-dpif-xlate: Add "always" mode to priority tags
Configure "if-nonzero" priority tags to retain the 802.1Q header
when the VLAN ID is zero, except both the VLAN ID and priority are zero.
Add a "always" configuration option to retain the 802.1Q header in such
frames as well.
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/bridge.c | 2 | ||||
-rw-r--r-- | vswitchd/vswitch.xml | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 02a33293e..0702cc6ca 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1026,6 +1026,8 @@ port_configure(struct port *port) const char *pt = smap_get_def(&cfg->other_config, "priority-tags", ""); if (!strcmp(pt, "if-nonzero") || !strcmp(pt, "true")) { s.use_priority_tags = PORT_PRIORITY_TAGS_IF_NONZERO; + } else if (!strcmp(pt, "always")) { + s.use_priority_tags = PORT_PRIORITY_TAGS_ALWAYS; } else { s.use_priority_tags = PORT_PRIORITY_TAGS_NEVER; } diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 1613d3569..89c06a1b7 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -1877,7 +1877,7 @@ <column name="other_config" key="priority-tags" type='{"type": "string", - "enum": ["set", ["never", "if-nonzero"]]}'> + "enum": ["set", ["never", "if-nonzero", "always"]]}'> <p> An 802.1Q header contains two important pieces of information: a VLAN ID and a priority. A frame with a zero VLAN ID, called a @@ -1894,8 +1894,10 @@ </p> <p> - Regardless of this setting, Open vSwitch omits the 802.1Q header on - output if both the VLAN ID and priority would be zero. + For <code>if-nonzero</code> Open vSwitch omits the 802.1Q header on + output if both the VLAN ID and priority would be zero. Set to + <code>always</code> to retain the 802.1Q header in such frames as + well. </p> <p> |