Prior to this patch documentation for routes lookup did not match the actual
behavior.

Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-dev/2024-November/418485.html
Fixes: 1655a6c146ca ("northd, utils: support for RouteTables in LRs")
Signed-off-by: Vladislav Odintsov <[email protected]>
---
 ovn-nb.xml | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/ovn-nb.xml b/ovn-nb.xml
index 5114bbc2e..9dc68732d 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -3877,22 +3877,32 @@ or
 
     <column name="route_table">
       <p>
-        Any string to place route to separate routing table. If Logical Router
-        Port has configured value in <ref table="Logical_Router_Port"
-        column="options" key="route_table"/> other than empty string, OVN
-        performs route lookup for all packets entering Logical Router ingress
-        pipeline from this port in the following manner:
+        Any string to place route to separate routing table. Maximum prefix
+        length matched route takes precedence over others, while for the same
+        routes with same prefix length the following lookup order applies:
       </p>
 
       <ul>
         <li>
-          1. First lookup among "global" routes: routes without
-          <code>route_table</code> value set and routes to directly connected
-          networks.
+          1. Lookup among directly connected to LR networks (including
+          directly connected routes learned from other availability zones
+          within same LR through OVN-IC).
+        </li>
+      </ul>
+      <ul>
+        <li>
+          2. Lookup among static routes with same <code>route_table</code>
+          value as specified in <ref table="Logical_Router_Port"
+          column="options" key="route_table"/> field.
+        </li>
+        <li>
+          If no value specified in <ref table="Logical_Router_Port"
+          column="options" key="route_table"/>, static routes with empty
+          <code>route_table</code> are looked up.
         </li>
         <li>
-          2. Next lookup among routes with same <code>route_table</code> value
-          as specified in LRP's options:route_table field.
+          If route is source-based, it has lower priority than
+          destination-based route with same CIDR.
         </li>
       </ul>
     </column>
-- 
2.46.2

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

Reply via email to