Propagate the VNI option from LS to the datapath, this is the last
missing piece required to activate all the code around EVPN in
ovn-controller. The LS is considered to be part of EVPN when
the "dynamic-routing-vni" is set to valid integer.

Reported-at: https://issues.redhat.com/browse/FDP-1385
Signed-off-by: Ales Musil <amu...@redhat.com>
---
 NEWS            |  2 ++
 northd/northd.c |  6 ++++++
 ovn-nb.xml      | 23 +++++++++++++++++++++++
 3 files changed, 31 insertions(+)

diff --git a/NEWS b/NEWS
index 1b6b5ab1d..2659e2b70 100644
--- a/NEWS
+++ b/NEWS
@@ -45,6 +45,8 @@ Post v25.03.0
      * Add the option "external_ids:ovn-evpn-local-ip" into OvS datapath.
        This option allows CMS to set IP address that will be used as source
        for the EVPN traffic egressing through the tunnel.
+     * Add the "other_config:dynamic-routing-vni" to Logical Switches. If set
+       to valid integer the LS is considered to be connected to EVPN L2 domain.
 
 OVN v25.03.0 - 07 Mar 2025
 --------------------------
diff --git a/northd/northd.c b/northd/northd.c
index 764575f21..4ab1800ba 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -822,6 +822,12 @@ ovn_datapath_update_external_ids(struct ovn_datapath *od)
             smap_add_format(&ids, "fdb_age_threshold",
                             "%u", age_threshold);
         }
+
+        int64_t vni = ovn_smap_get_llong(&od->nbs->other_config,
+                                         "dynamic-routing-vni", -1);
+        if (ovn_is_valid_vni(vni)) {
+            smap_add_format(&ids, "dynamic-routing-vni", "%"PRIi64, vni);
+        }
     }
 
     /* Set snat-ct-zone */
diff --git a/ovn-nb.xml b/ovn-nb.xml
index 4a7581807..065bffd3f 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -866,6 +866,29 @@
         dropped, even if use_ct_inv_match is set to true.
         Default: <code>false</code>.
       </column>
+
+      <column name="other_config" key="dynamic-routing-vni"
+              type='{"type": "integer", "minInteger": 0,
+                     "maxInteger": 16777215}'>
+        <p>
+          This defines the vni number associated with EVPN domain that the
+          Logical Switch is supposed to connect to.
+        </p>
+
+        <p>
+          The ovn-controller expects three interfaces to exist within the
+          BGP vrf: <code>br-$vi</code>, <code>lo-$vni</code> and
+          <code>vxlan-$vni</code>. ovn-controller also expects that there is
+          VXLAN tunnel interface connected to br-int with the following
+          options: <code>local_ip=flow</code>, <code>remote_ip=flow</code>,
+          <code>key=flow</code>, <code>dst_port=4789</code>.
+        </p>
+
+        <p>
+          NOTE: this feature is experimental and may be subject to
+          removal/change in the future.
+        </p>
+      </column>
     </group>
 
     <group title="IP Multicast Snooping Options">
-- 
2.50.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to