On Thu, Nov 5, 2026 at 10:48 AM Srikar Tati <[email protected]> wrote:
>
> From: Srikar Tati <[email protected]>
>
> OVN ECMP groups for learned routes and for multi-homed EVPN FDB entries
> always use selection_method=dp_hash.  dp_hash needs a recirculation,
> which the tc datapath cannot offload, so on NICs with hardware offload
> this traffic stays in software.  Static routes already avoid this with
> the "selection_fields" column, which switches the group to
> selection_method=hash.  This series brings the same choice to learned
> routes and EVPN FDB groups.
>
> v2:
>   - Addressed Numan's review comments (details in each patch).
>   - Added Numan's Acked-by to all three patches.
>   - Rebased on main.
>
> Srikar Tati (3):
>   lib: Add a helper for ECMP selection fields.
>   northd: Add ECMP selection fields for learned routes.
>   controller: Add ECMP selection fields for EVPN FDB groups.

Thanks Srikar.  I added you to the AUTHORS file and applied this
series to the main.

I also did the below changes in patch 2 before applying  as it was
failing the new test case added by you.

-----
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 72b008c599..7f4f38f59d 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -17840,34 +17840,35 @@ check ovn-nbctl --wait=sb sync

 # Without selection fields the group uses dp_hash.
 ovn-sbctl dump-flows lr0 > lr0flows
-AT_CHECK([grep -e "(lr_in_ip_routing   ).*192.168.1.0" lr0flows |
ovn_strip_lflows], [0], [dnl
-  table=??(lr_in_ip_routing   ), priority=1838 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24), action=(ip.ttl--; flags.loopback = 1;
reg8[[0..15]] = 1; reg8[[16..31]] = select(1, 2);)
+
+AT_CHECK([grep -e "(lr_in_ip_routing   ).*192.168.1.0" lr0flows |
ovn_strip_ecmp_ids | ovn_strip_lflows], [0], [dnl
+  table=??(lr_in_ip_routing   ), priority=1838 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24), action=(ip.ttl--; flags.loopback = 1;
reg8[[0..15]] = <gid>; reg8[[16..31]] = select(<mid>, <mid>);)
 ])

 check ovn-nbctl --wait=sb set Logical_Router lr0 \
     options:dynamic-routing-ecmp-selection-fields="ip_proto,ip_src,ip_dst"
 ovn-sbctl dump-flows lr0 > lr0flows
-AT_CHECK([grep -e "(lr_in_ip_routing   ).*192.168.1.0" lr0flows |
ovn_strip_lflows], [0], [dnl
-  table=??(lr_in_ip_routing   ), priority=1838 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24), action=(ip.ttl--; flags.loopback = 1;
reg8[[0..15]] = 1; reg8[[16..31]] = select(values=(1, 2);
hash_fields="ip_dst,ip_proto,ip_src");)
+AT_CHECK([grep -e "(lr_in_ip_routing   ).*192.168.1.0" lr0flows |
ovn_strip_ecmp_ids | ovn_strip_lflows], [0], [dnl
+  table=??(lr_in_ip_routing   ), priority=1838 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24), action=(ip.ttl--; flags.loopback = 1;
reg8[[0..15]] = <gid>; reg8[[16..31]] = select(values=(<mid>, <mid>);
hash_fields="ip_dst,ip_proto,ip_src");)
 ])

 # tp_src and tp_dst give one flow for each L4 protocol.
 check ovn-nbctl --wait=sb set Logical_Router lr0 \
     options:dynamic-routing-ecmp-selection-fields="ip_src,ip_dst,tp_src,tp_dst"
 ovn-sbctl dump-flows lr0 > lr0flows
-AT_CHECK([grep -e "(lr_in_ip_routing   ).*192.168.1.0" lr0flows |
ovn_strip_lflows], [0], [dnl
-  table=??(lr_in_ip_routing   ), priority=1838 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24), action=(ip.ttl--; flags.loopback = 1;
reg8[[0..15]] = 1; reg8[[16..31]] = select(values=(1, 2);
hash_fields="ip_dst,ip_proto,ip_src");)
-  table=??(lr_in_ip_routing   ), priority=1839 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24 && sctp), action=(ip.ttl--; flags.loopback =
1; reg8[[0..15]] = 1; reg8[[16..31]] = select(values=(1, 2);
hash_fields="ip_dst,ip_proto,ip_src,sctp_dst,sctp_src");)
-  table=??(lr_in_ip_routing   ), priority=1839 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24 && tcp), action=(ip.ttl--; flags.loopback =
1; reg8[[0..15]] = 1; reg8[[16..31]] = select(values=(1, 2);
hash_fields="ip_dst,ip_proto,ip_src,tcp_dst,tcp_src");)
-  table=??(lr_in_ip_routing   ), priority=1839 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24 && udp), action=(ip.ttl--; flags.loopback =
1; reg8[[0..15]] = 1; reg8[[16..31]] = select(values=(1, 2);
hash_fields="ip_dst,ip_proto,ip_src,udp_dst,udp_src");)
+AT_CHECK([grep -e "(lr_in_ip_routing   ).*192.168.1.0" lr0flows |
ovn_strip_ecmp_ids | ovn_strip_lflows], [0], [dnl
+  table=??(lr_in_ip_routing   ), priority=1838 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24), action=(ip.ttl--; flags.loopback = 1;
reg8[[0..15]] = <gid>; reg8[[16..31]] = select(values=(<mid>, <mid>);
hash_fields="ip_dst,ip_proto,ip_src");)
+  table=??(lr_in_ip_routing   ), priority=1839 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24 && sctp), action=(ip.ttl--; flags.loopback =
1; reg8[[0..15]] = <gid>; reg8[[16..31]] = select(values=(<mid>,
<mid>); hash_fields="ip_dst,ip_proto,ip_src,sctp_dst,sctp_src");)
+  table=??(lr_in_ip_routing   ), priority=1839 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24 && tcp), action=(ip.ttl--; flags.loopback =
1; reg8[[0..15]] = <gid>; reg8[[16..31]] = select(values=(<mid>,
<mid>); hash_fields="ip_dst,ip_proto,ip_src,tcp_dst,tcp_src");)
+  table=??(lr_in_ip_routing   ), priority=1839 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24 && udp), action=(ip.ttl--; flags.loopback =
1; reg8[[0..15]] = <gid>; reg8[[16..31]] = select(values=(<mid>,
<mid>); hash_fields="ip_dst,ip_proto,ip_src,udp_dst,udp_src");)
 ])

 # A field that is not supported falls back to dp_hash.
 check ovn-nbctl --wait=sb set Logical_Router lr0 \
     options:dynamic-routing-ecmp-selection-fields="ip_src,foo"
 ovn-sbctl dump-flows lr0 > lr0flows
-AT_CHECK([grep -e "(lr_in_ip_routing   ).*192.168.1.0" lr0flows |
ovn_strip_lflows], [0], [dnl
-  table=??(lr_in_ip_routing   ), priority=1838 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24), action=(ip.ttl--; flags.loopback = 1;
reg8[[0..15]] = 1; reg8[[16..31]] = select(1, 2);)
+AT_CHECK([grep -e "(lr_in_ip_routing   ).*192.168.1.0" lr0flows |
ovn_strip_ecmp_ids | ovn_strip_lflows], [0], [dnl
+  table=??(lr_in_ip_routing   ), priority=1838 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24), action=(ip.ttl--; flags.loopback = 1;
reg8[[0..15]] = <gid>; reg8[[16..31]] = select(<mid>, <mid>);)
 ])
 check grep -q "bad 'dynamic-routing-ecmp-selection-fields' ip_src,foo" \
     northd/ovn-northd.log
@@ -17875,8 +17876,8 @@ check grep -q "bad
'dynamic-routing-ecmp-selection-fields' ip_src,foo" \
 check ovn-nbctl --wait=sb remove Logical_Router lr0 \
     options dynamic-routing-ecmp-selection-fields
 ovn-sbctl dump-flows lr0 > lr0flows
-AT_CHECK([grep -e "(lr_in_ip_routing   ).*192.168.1.0" lr0flows |
ovn_strip_lflows], [0], [dnl
-  table=??(lr_in_ip_routing   ), priority=1838 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24), action=(ip.ttl--; flags.loopback = 1;
reg8[[0..15]] = 1; reg8[[16..31]] = select(1, 2);)
+AT_CHECK([grep -e "(lr_in_ip_routing   ).*192.168.1.0" lr0flows |
ovn_strip_ecmp_ids | ovn_strip_lflows], [0], [dnl
+  table=??(lr_in_ip_routing   ), priority=1838 , match=(reg7 == 0 &&
ip4.dst == 192.168.1.0/24), action=(ip.ttl--; flags.loopback = 1;
reg8[[0..15]] = <gid>; reg8[[16..31]] = select(<mid>, <mid>);)
 ])

 OVN_CLEANUP_NORTHD
------------------


Thanks
Numan


>
>  NEWS                                |   8 ++
>  controller/evpn-fdb.c               |  34 +++++++++
>  controller/evpn-fdb.h               |   3 +
>  controller/ovn-controller.c         |  46 +++++++++++
>  controller/physical.c               |   7 +-
>  lib/ovn-util.c                      |  81 ++++++++++++++++++++
>  lib/ovn-util.h                      |   7 ++
>  northd/en-datapath-logical-switch.c |  19 +++++
>  northd/en-learned-route-sync.c      |  23 +++++-
>  northd/northd.c                     |  17 +----
>  ovn-nb.xml                          |  47 ++++++++++++
>  tests/ovn-inc-proc-graph-dump.at    |   2 +
>  tests/ovn-northd.at                 | 113 ++++++++++++++++++++++++++++
>  tests/system-ovn.at                 |  29 +++++++
>  14 files changed, 417 insertions(+), 19 deletions(-)
>
> --
> 2.54.0
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to