This is used when traffic from HW VTEP goes to
routable networks and logical switch to which VTEP
logical port is attached also needs to support
distributed routing features such as NAT and others.

Signed-off-by: Vladislav Odintsov <[email protected]>
---
 northd/northd.c |  8 +++++++-
 ovn-nb.xml      | 10 ++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/northd/northd.c b/northd/northd.c
index d31cb1688..0be45e22a 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -1674,6 +1674,12 @@ is_cr_port(const struct ovn_port *op)
     return op->l3dgw_port;
 }
 
+static bool
+is_distributed(const struct ovn_port *op)
+{
+    return smap_get_bool(&op->nbrp->options, "distributed", false);
+}
+
 static void
 destroy_routable_addresses(struct ovn_port_routable_addresses *ra)
 {
@@ -10920,7 +10926,7 @@ build_adm_ctrl_flows_for_lrouter_port(
         ds_clear(match);
         ds_put_format(match, "eth.dst == %s && inport == %s",
                       op->lrp_networks.ea_s, op->json_key);
-        if (is_l3dgw_port(op)) {
+        if (is_l3dgw_port(op) && !is_distributed(op)) {
             /* Traffic with eth.dst = l3dgw_port->lrp_networks.ea_s
              * should only be received on the gateway chassis. */
             ds_put_format(match, " && is_chassis_resident(%s)",
diff --git a/ovn-nb.xml b/ovn-nb.xml
index e26afd83c..d4b454791 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -2976,6 +2976,16 @@
           <ref column="options" key="gateway_mtu"/> option.
         </p>
       </column>
+
+      <column name="options" key="distributed" type='{"type": "boolean"}'>
+        If <var>true</var>, indicates, that flow for current LRP in
+        lr_in_admission must be installed on all chassis, even if it has
+        associated chassisredirect port.
+        Usable when traffic from HW VTEP goes to routable networks and logical
+        switch to which VTEP logical port is attached also needs to support
+        distributed routing features such as NAT, Load Balancing and others.
+        Empty value (default) means false.
+      </column>
     </group>
 
     <group title="Attachment">
-- 
2.26.3

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

Reply via email to