ovn: Constrain supported tunnel types.
authorJustin Pettit <jpettit@nicira.com>
Sat, 25 Apr 2015 17:47:56 +0000 (10:47 -0700)
committerJustin Pettit <jpettit@nicira.com>
Fri, 1 May 2015 06:08:43 +0000 (23:08 -0700)
Limit the supported tunnel types to Geneve and STT on hypervisors, and
VXLAN, Geneve, and STT on gateways.  This commit adds "DESIGN.md" that
describes the reasoning.

Wes Felter provided suggestions for improving the wording in the
architecture document.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ovn/TODO
ovn/controller/ovn-controller.8.xml
ovn/ovn-architecture.7.xml
ovn/ovn-sb.ovsschema
ovn/ovn-sb.xml
tutorial/ovs-sandbox

index 41f4d91..209a315 100644 (file)
--- a/ovn/TODO
+++ b/ovn/TODO
 
 ** ovn-controller parameters and configuration.
 
-*** Tunnel encapsulation to publish.
-
-    Default: VXLAN? Geneve?
-
 *** SSL configuration.
 
     Can probably get this from Open_vSwitch database.
index 5d4c595..e1cb6a2 100644 (file)
           <p>
             <code>external_ids:ovn-encap-type</code> specifies the
             encapsulation type that a chassis should use to connect to
-            this node.  Examples include <code>geneve</code>,
-            <code>vxlan</code>, and <code>stt</code>.
+            this node.  Supported tunnel types for connecting
+            hypervisors are <code>geneve</code> and <code>stt</code>.
+            Gateways may use <code>geneve</code>, <code>vxlan</code>,
+            or <code>stt</code>.
           </p>
         </li>
         <li>
index f1dfa5f..f092141 100644 (file)
       to reflect the update.
     </li>
   </ol>
+
+  <h1>Design Decisions</h1>
+
+  <h2>Supported Tunnel Encapsulations</h2>
+  <p>
+    For connecting hypervisors to each other, the only supported tunnel
+    encapsulations are Geneve and STT. Hypervisors may use VXLAN to
+    connect to gateways. We have limited support to these encapsulations
+    for the following reasons:
+  </p>
+
+  <ul>
+    <li>
+      <p>
+        They support large amounts of metadata.  In addition to
+        specifying the logical switch, we will likely want to indicate
+        the logical source port and where we are in the logical
+        pipeline.  Geneve supports a 24-bit VNI field and TLV-based
+        extensions.  The header of STT includes a 64-bit context id.
+      </p>
+    </li>
+
+    <li>
+      <p>
+        They use randomized UDP or TCP source ports that allows
+        efficient distribution among multiple paths in environments that
+        use ECMP in their underlay.
+      </p>
+    </li>
+
+    <li>
+      <p>
+        NICs are available that accelerate encapsulation and decapsulation.
+      </p>
+    </li>
+  </ul>
+
+  <p>
+    Due to its flexibility, the preferred encapsulation between
+    hypervisors is Geneve.  Some environments may want to use STT for
+    performance reasons until the NICs they use support hardware offload
+    of Geneve.
+  </p>
+
+  <p>
+    For connecting to gateways, the only supported tunnel encapsulations
+    are VXLAN, Geneve, and STT.  While support for Geneve is becoming
+    available for TOR (top-of-rack) switches, VXLAN is far more common.
+    Currently, gateways have a feature set that matches the capabilities
+    as defined by the VTEP schema, so fewer bits of metadata are
+    necessary.  In the future, gateways that do not support
+    encapsulations with large amounts of metadata may continue to have a
+    reduced feature set.
+  </p>
 </manpage>
index 9fd5363..363e664 100644 (file)
@@ -17,7 +17,9 @@
             "indexes": [["name"]]},
         "Encap": {
             "columns": {
-                "type": {"type": "string"},
+                "type": {"type": {"key": {
+                           "type": "string",
+                           "enum": ["set", ["geneve", "stt", "vxlan"]]}}},
                 "options": {"type": {"key": "string",
                                      "value": "string",
                                      "min": 0,
index 29a1c88..2afc9a1 100644 (file)
 
     <column name="type">
       The encapsulation to use to transmit packets to this chassis.
-      Examples include <code>geneve</code>, <code>vxlan</code>, and
-      <code>stt</code>.
+      Hypervisors must use either <code>geneve</code> or
+      <code>stt</code>.  Gateways may use <code>vxlan</code>,
+      <code>geneve</code>, or <code>stt</code>.
     </column>
 
     <column name="options">
index 8aa2ddd..1520cb7 100755 (executable)
@@ -289,7 +289,7 @@ rungdb $gdb_vswitchd ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --
 if $ovn; then
     ovs-vsctl set open . external-ids:system-id=56b18105-5706-46ef-80c4-ff20979ab068
     ovs-vsctl set open . external-ids:ovn-remote=unix:"$sandbox"/db.sock
-    ovs-vsctl set open . external-ids:ovn-encap-type=vxlan
+    ovs-vsctl set open . external-ids:ovn-encap-type=geneve
     ovs-vsctl set open . external-ids:ovn-encap-ip=127.0.0.1
     ovs-vsctl add-br br-int