diff mbox series

[ovs-dev,2/6] ovn-sb.ovsschema: Add Logical Datapath Groups.

Message ID 20201114075653.9142-3-i.maximets@ovn.org
State New
Headers show
Series Combine Logical Flows by Logical Datapath. | expand

Commit Message

Ilya Maximets Nov. 14, 2020, 7:56 a.m. UTC
New table 'Logical_Datapath_Group'.  Each row of this table will store
a set of logical datapaths.  Each logical flow now has a reference to
a logical datapath group, so the same logical flow could be applied to
many different logical datapaths in a group.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 ovn-sb.ovsschema | 22 ++++++++++++++++++----
 ovn-sb.xml       | 42 +++++++++++++++++++++++++++++++-----------
 2 files changed, 49 insertions(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/ovn-sb.ovsschema b/ovn-sb.ovsschema
index d1c506a22..71574261e 100644
--- a/ovn-sb.ovsschema
+++ b/ovn-sb.ovsschema
@@ -1,7 +1,7 @@ 
 {
     "name": "OVN_Southbound",
-    "version": "2.10.0",
-    "cksum": "2548342632 22615",
+    "version": "20.12.0",
+    "cksum": "2311403201 23260",
     "tables": {
         "SB_Global": {
             "columns": {
@@ -90,8 +90,14 @@ 
             "isRoot": true},
         "Logical_Flow": {
             "columns": {
-                "logical_datapath": {"type": {"key": {"type": "uuid",
-                                                      "refTable": "Datapath_Binding"}}},
+                "logical_datapath":
+                    {"type": {"key": {"type": "uuid",
+                                      "refTable": "Datapath_Binding"},
+                              "min": 0, "max": 1}},
+                "logical_datapath_group":
+                    {"type": {"key": {"type": "uuid",
+                                      "refTable": "Logical_Datapath_Group"},
+                              "min": 0, "max": 1}},
                 "pipeline": {"type": {"key": {"type": "string",
                                       "enum": ["set", ["ingress",
                                                        "egress"]]}}},
@@ -107,6 +113,14 @@ 
                     "type": {"key": "string", "value": "string",
                              "min": 0, "max": "unlimited"}}},
             "isRoot": true},
+        "Logical_Datapath_Group": {
+            "columns": {
+                "datapaths":
+                    {"type": {"key": {"type": "uuid",
+                                      "refTable": "Datapath_Binding",
+                                      "refType": "weak"},
+                              "min": 0, "max": "unlimited"}}},
+            "isRoot": false},
         "Multicast_Group": {
             "columns": {
                 "datapath": {"type": {"key": {"type": "uuid",
diff --git a/ovn-sb.xml b/ovn-sb.xml
index ebe2893e3..b70f5aa64 100644
--- a/ovn-sb.xml
+++ b/ovn-sb.xml
@@ -579,11 +579,12 @@ 
 
     <p>
       In more detail, to start, OVN searches the <ref table="Logical_Flow"/>
-      table for a row with correct <ref column="logical_datapath"/>, a <ref
-      column="pipeline"/> of <code>ingress</code>, a <ref column="table_id"/>
-      of 0, and a <ref column="match"/> that is true for the packet.  If none
-      is found, OVN drops the packet.  If OVN finds more than one, it chooses
-      the match with the highest <ref column="priority"/>.  Then OVN executes
+      table for a row with correct <ref column="logical_datapath"/> or a
+      <ref column="logical_datapath_group"/>, a <ref column="pipeline"/> of
+      <code>ingress</code>, a <ref column="table_id"/> of 0, and a <ref
+      column="match"/> that is true for the packet.  If none is found, OVN
+      drops the packet.  If OVN finds more than one, it chooses the match with
+      the highest <ref column="priority"/>.  Then OVN executes
       each of the actions specified in the row's <ref table="actions"/> column,
       in the order specified.  Some actions, such as those to modify packet
       headers, require no further details.  The <code>next</code> and
@@ -616,12 +617,12 @@ 
     <p>
       To execute the egress pipeline, OVN again searches the <ref
       table="Logical_Flow"/> table for a row with correct <ref
-      column="logical_datapath"/>, a <ref column="table_id"/> of 0, a <ref
-      column="match"/> that is true for the packet, but now looking for a <ref
-      column="pipeline"/> of <code>egress</code>.  If no matching row is found,
-      the output becomes a no-op.  Otherwise, OVN executes the actions for the
-      matching flow (which is chosen from multiple, if necessary, as already
-      described).
+      column="logical_datapath"/> or a <ref column="logical_datapath_group"/>,
+      a <ref column="table_id"/> of 0, a <ref column="match"/> that is true for
+      the packet, but now looking for a <ref column="pipeline"/> of
+      <code>egress</code>.  If no matching row is found, the output becomes a
+      no-op.  Otherwise, OVN executes the actions for the matching flow (which
+      is chosen from multiple, if necessary, as already described).
     </p>
 
     <p>
@@ -652,6 +653,11 @@ 
       The logical datapath to which the logical flow belongs.
     </column>
 
+    <column name="logical_datapath_group">
+      The group of logical datapaths to which the logical flow belongs.  This
+      means that the same logical flow belongs to all datapaths in a group.
+    </column>
+
     <column name="pipeline">
       <p>
         The primary flows used for deciding on a packet's destination are the
@@ -2354,6 +2360,20 @@  tcp.flags = RST;
     </group>
   </table>
 
+  <table name="Logical_Datapath_Group" title="Logical Datapath Groups">
+    <p>
+      Each row in this table represents a group of logical datapaths referenced
+      by the <ref column="logical_datapath_group" table="Logical_Flow"/> column
+      in the <ref table="Logical_Flow"/> table.
+    </p>
+
+    <column name="datapaths">
+      <p>
+        List of <ref table="Datapath_Binding"/> entries.
+      </p>
+    </column>
+  </table>
+
   <table name="Multicast_Group" title="Logical Port Multicast Groups">
     <p>
       The rows in this table define multicast groups of logical ports.