summaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorEric Garver <e@erig.me>2017-03-01 17:47:59 -0500
committerBen Pfaff <blp@ovn.org>2017-03-16 15:18:40 -0700
commitf0fb825a3785320430686834741c718ff4f8ebf4 (patch)
treee58d08de18a42bd74edbed5a9c0d8951d03e7d81 /vswitchd
parent4c71600d2256641b927e04b75e95751355e799f8 (diff)
downloadopenvswitch-f0fb825a3785320430686834741c718ff4f8ebf4.tar.gz
Add support for 802.1ad (QinQ tunneling)
Flow key handling changes: - Add VLAN header array in struct flow, to record multiple 802.1q VLAN headers. - Add dpif multi-VLAN capability probing. If datapath supports multi-VLAN, increase the maximum depth of nested OVS_KEY_ATTR_ENCAP. Refactor VLAN handling in dpif-xlate: - Introduce 'xvlan' to track VLAN stack during flow processing. - Input and output VLAN translation according to the xbundle type. Push VLAN action support: - Allow ethertype 0x88a8 in VLAN headers and push_vlan action. - Support push_vlan on dot1q packets. Use other_config:vlan-limit in table Open_vSwitch to limit maximum VLANs that can be matched. This allows us to preserve backwards compatibility. Add test cases for VLAN depth limit, Multi-VLAN actions and QinQ VLAN handling Co-authored-by: Thomas F Herbert <thomasfherbert@gmail.com> Signed-off-by: Thomas F Herbert <thomasfherbert@gmail.com> Co-authored-by: Xiao Liang <shaw.leon@gmail.com> Signed-off-by: Xiao Liang <shaw.leon@gmail.com> Signed-off-by: Eric Garver <e@erig.me> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/bridge.c2
-rw-r--r--vswitchd/vswitch.xml23
2 files changed, 25 insertions, 0 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 2e1001350..f1483112b 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -598,6 +598,8 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg)
OFPROTO_FLOW_LIMIT_DEFAULT));
ofproto_set_max_idle(smap_get_int(&ovs_cfg->other_config, "max-idle",
OFPROTO_MAX_IDLE_DEFAULT));
+ ofproto_set_vlan_limit(smap_get_int(&ovs_cfg->other_config, "vlan-limit",
+ LEGACY_MAX_VLAN_HEADERS));
ofproto_set_threads(
smap_get_int(&ovs_cfg->other_config, "n-handler-threads", 0),
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index a91be59b0..464a211ad 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -350,6 +350,29 @@
Defaults to 100 ie. there is (1/100 =) 1% chance of EMC insertion.
</p>
</column>
+
+ <column name="other_config" key="vlan-limit"
+ type='{"type": "integer", "minInteger": 0}'>
+ <p>
+ Limits the number of VLAN headers that can be matched to the
+ specified number. Further VLAN headers will be treated as payload,
+ e.g. a packet with more 802.1q headers will match Ethernet type
+ 0x8100.
+ </p>
+ <p>
+ Value <code>0</code> means unlimited. The actual number of supported
+ VLAN headers is the smallest of <code>vlan-limit</code>, the number
+ of VLANs supported by Open vSwitch userspace (currently 2), and the
+ number supported by the datapath.
+ </p>
+
+ <p>
+ If this value is absent, the default is currently 1. This maintains
+ backward compatibility with controllers that were designed for use
+ with Open vSwitch versions earlier than 2.8, which only supported one
+ VLAN.
+ </p>
+ </column>
</group>
<group title="Status">