Add three new options for Logical Router Ports that control
host route redistribution.

Signed-off-by: Frode Nordahl <[email protected]>
---
 northd/northd.c | 11 +++++++++++
 ovn-nb.xml      | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/northd/northd.c b/northd/northd.c
index 6898daa00..c76501549 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -3939,6 +3939,17 @@ sync_pb_for_lrp(struct ovn_port *op,
         }
         if (chassis_name) {
             smap_add(&new, "l3gateway-chassis", chassis_name);
+            if (smap_get_bool(&op->nbrp->options, "maintain-vrf", false)) {
+                smap_add(&new, "maintain-vrf", "true");
+            }
+            if (smap_get_bool(&op->nbrp->options,
+                              "redistribute-nat", false)) {
+                smap_add(&new, "redistribute-nat", "true");
+            }
+            if (smap_get_bool(&op->nbrp->options,
+                              "redistribute-lb-vips", false)) {
+                smap_add(&new, "redistribute-lb-vips", "true");
+            }
         }
     }
 
diff --git a/ovn-nb.xml b/ovn-nb.xml
index 9552534f6..97ac98e96 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -3451,6 +3451,45 @@ or
           <ref column="options" key="gateway_mtu"/> option.
         </p>
       </column>
+
+      <column name="options" key="redistribute-lb-vips">
+        <p>
+          Redistribute host routes to Load Balancer VIPs local to this chassis.
+
+          This option currently only works on gateway routers (routers that
+          have <ref column="options" key="chassis" table="Logical_Router"/>
+          set).
+        </p>
+      </column>
+
+      <column name="options" key="redistribute-nat">
+        <p>
+          Redistribute host routes to <code>dnat_and_snat</code> NAT records
+          associated with logical ports local to this chassis.
+
+          This option currently only works on gateway routers (routers that
+          have <ref column="options" key="chassis" table="Logical_Router"/>
+          set).
+        </p>
+      </column>
+
+      <column name="options" key="maintain-vrf">
+        <p>
+          Maintain a VRF in the system for exporting host routes to NAT
+          addresses (see <ref column="options" key="redistribute-nat"/>
+          option) and Load Balancer VIPs (see <ref column="options"
+          key="redistribute-lb-vips"/> option).
+
+          Route table ID to use can be influenced by setting the
+          <ref column="options" key="requested-tnl-key"/> option.  If not
+          set, <code>ovn-northd</code> will allocate one.
+
+          This option currently only works on gateway routers (routers that
+          have <ref column="options" key="chassis" table="Logical_Router"/>
+          set).
+        </p>
+      </column>
+
     </group>
 
     <group title="Attachment">
-- 
2.45.2

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to