[ovs-dev] [PATCH ] Add tunnel key to Physical_Locator

ofer.benyacov at gmail.com ofer.benyacov at gmail.com
Sun Dec 6 16:04:45 UTC 2015


From: Ofer Ben Yacov <ofer.benyacov at gmail.com>

Currently the scenario of single logical bridge that use multiple locators
with different tunnel key on each of the locators is not supported.
In order to support much more flexibility in the tunnel settings, we need
to add tunnel key column to the Physical_Locator table.

This patch is needed to support the usage of neutron L2GW as an inter-cloud
gateway. The tunnel key that is set in the logical bridge will be used 
'internally' to connect the L2GW to the compute hosts and the key that 
is set in the physical locator will be used to connect the L2GW to a 
remote L2GW to form a tunnel between 2 clouds. In this case, the
'external' connection will use single 'dst_ip' on all the locators with 
different tunnel key for each L2 domain.

Signed-off-by: Ofer Ben-Yacov<ofer.benyacov at gmail.com>

---
 vtep/vtep.ovsschema |  3 ++-
 vtep/vtep.xml       | 22 ++++++++++++----------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/vtep/vtep.ovsschema b/vtep/vtep.ovsschema
index 1375173..a9d3fd8 100644
--- a/vtep/vtep.ovsschema
+++ b/vtep/vtep.ovsschema
@@ -188,7 +188,8 @@
               "enum": ["set", ["vxlan_over_ipv4"]],
               "type": "string"}},
           "mutable": false},
-        "dst_ip": {"type": "string", "mutable": false}},
+        "dst_ip": {"type": "string", "mutable": false},
+        "tunnel_key": {"type": {"key": "integer", "min": 0, "max": 1}}},
       "indexes": [["encapsulation_type", "dst_ip"]]},
     "ACL_entry": {
       "columns": {
diff --git a/vtep/vtep.xml b/vtep/vtep.xml
index 6c49e06..483f8f4 100644
--- a/vtep/vtep.xml
+++ b/vtep/vtep.xml
@@ -995,17 +995,10 @@
     <p>
       For the <code>vxlan_over_ipv4</code> encapsulation, the only
       encapsulation defined so far, all endpoints associated with a given <ref
-      table="Logical_Switch"/> must use a common tunnel key, which is carried
+      table="Logical_Switch"/> can use a common tunnel key, which is carried
       in the <ref table="Logical_Switch" column="tunnel_key"/> column of <ref
-      table="Logical_Switch"/>.
-    </p>
-
-    <p>
-      For some encapsulations yet to be defined, we expect <ref
-      table="Physical_Locator"/> to identify both an endpoint and a tunnel key.
-      When the first such encapsulation is defined, we expect to add a
-      ``tunnel_key'' column to <ref table="Physical_Locator"/> to allow the
-      tunnel key to be defined.
+      table="Logical_Switch"/>, or use key per tunnel by using the tunnel key
+      carried in the <ref table="Physical_Locator" column="tunnel_key"/>
     </p>
 
     <p>
@@ -1029,6 +1022,15 @@
       </p>
     </column>
 
+    <column name="tunnel_key">
+      <p>
+        This supports per <ref table="Logical_Switch"/>+<ref
+        table="Physical_Locator"/> pair. That is, each logical switch may be
+        assigned a different tunnel key on every <ref table="Physical_Locator"/>.
+        The <ref table="Physical_Locator"/> carries the tunnel key in this case.
+      </p>
+    </column>
+
   </table>
   <table name="ACL_entry">
     <p>
-- 
2.1.4




More information about the dev mailing list