On 5/21/26 10:48 AM, Alexandra Rukomoinikova via dev wrote:
> This reverts commit 289b370dc621840cf1a192db5590ca706fdf5047.
> 
> Commit [1] caused issues with handling ARP requests to vif ports inside
> switch that has connectivity to the external network through a localnet port,
> as well as many other problems, so it was suggested to revert the commit.
> This commit was part of a fixes for this broken commit.
> 
> [1] 
> https://github.com/ovn-org/ovn/commit/1b4058b9162c27edc6bd42c3dedbef622e2fd0a7
> Reported-at: 
> https://mail.openvswitch.org/pipermail/ovs-dev/2026-May/431983.html
> Signed-off-by: Alexandra Rukomoinikova <[email protected]>
> ---

Hi Alexandra,

Thanks for the patch!

>  northd/en-ls-arp.c  | 10 +++----
>  tests/ovn-northd.at | 70 ---------------------------------------------
>  tests/system-ovn.at | 62 ---------------------------------------
>  3 files changed, 5 insertions(+), 137 deletions(-)
> 
> diff --git a/northd/en-ls-arp.c b/northd/en-ls-arp.c
> index 021f5054f..c48732b8c 100644
> --- a/northd/en-ls-arp.c
> +++ b/northd/en-ls-arp.c
> @@ -69,12 +69,13 @@ ls_arp_table_clear(struct ls_arp_table *table)
>  }
>  
>  static inline bool
> -is_nat_dgp_connected(const struct ovn_nat *nat_entry)
> +is_centralized_nat_record(const struct ovn_nat *nat_entry)
>  {
>      return nat_entry->is_valid
>             && nat_entry->l3dgw_port
>             && nat_entry->l3dgw_port->peer
> -           && nat_entry->l3dgw_port->peer->od;
> +           && nat_entry->l3dgw_port->peer->od
> +           && !nat_entry->is_distributed;
>  }
>  
>  static void
> @@ -95,10 +96,9 @@ nat_record_data_create(struct ls_arp_record *ls_arp_record,
>          for (size_t i = 0; i < lrnat_rec->n_nat_entries; i++) {
>              const struct ovn_nat *nat_entry = &lrnat_rec->nat_entries[i];
>  
> -            if (is_nat_dgp_connected(nat_entry)) {
> +            if (is_centralized_nat_record(nat_entry)) {
>                  hmapx_add(&ls_arp_record->nat_records,
>                            (struct lrnat_rec *) lrnat_rec);
> -                continue;
>              }
>          }
>      }
> @@ -277,7 +277,7 @@ nat_odmap_create(struct lr_nat_record *lrnat_rec,
>      for (size_t i = 0; i < lrnat_rec->n_nat_entries; i++) {
>          const struct ovn_nat *nat_entry = &lrnat_rec->nat_entries[i];
>  
> -        if (is_nat_dgp_connected(nat_entry)) {
> +        if (is_centralized_nat_record(nat_entry)) {
>              hmapx_add(odmap, nat_entry->l3dgw_port->peer->od);
>          }
>      }
> diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
> index 24a891fd0..a57c3bad8 100644
> --- a/tests/ovn-northd.at
> +++ b/tests/ovn-northd.at
> @@ -20039,76 +20039,6 @@ OVN_CLEANUP_NORTHD
>  AT_CLEANUP
>  ])
>  
> -OVN_FOR_EACH_NORTHD_NO_HV([
> -AT_SETUP([Logical Switch ARP filtering - only distributed NATs])
> -ovn_start
> -
> -check ovn-sbctl chassis-add ch1 geneve 127.0.0.1
> -
> -check ovn-nbctl ls-add sw0
> -check ovn-nbctl lsp-add sw0 sw0-port1
> -check ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:03 10.0.0.3"
> -check ovn-nbctl lsp-add sw0 sw0-port2
> -check ovn-nbctl lsp-set-addresses sw0-port2 "50:54:00:00:00:04 10.0.0.4"
> -
> -# Create a logical router and attach both logical switches
> -check ovn-nbctl lr-add lr0
> -check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 1000::a/64
> -check ovn-nbctl lsp-add-router-port sw0 sw0-lr0 lr0-sw0
> -
> -
> -check ovn-nbctl ls-add public
> -check ovn-nbctl lrp-add lr0 lr0-public 00:00:20:20:12:13 172.168.0.100/24
> -check ovn-nbctl lsp-add public public-lr0 -- set Logical_Switch_Port 
> public-lr0 \
> -    type=router options:router-port=lr0-public \
> -    -- lsp-set-addresses public-lr0 router
> -
> -check ovn-nbctl lrp-set-gateway-chassis lr0-public hv1
> -
> -# localnet port
> -check ovn-nbctl lsp-add-localnet-port public ln-public public
> -
> -check ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.168.0.50 10.0.0.3 sw0-port1 
> f0:00:00:00:00:03
> -
> -check ovn-nbctl --wait=sb sync
> -
> -AT_CHECK([ovn-sbctl lflow-list public | grep ls_in_apply_port_sec | 
> ovn_strip_lflows], [0], [dnl
> -  table=??(ls_in_apply_port_sec), priority=0    , match=(1), action=(next;)
> -  table=??(ls_in_apply_port_sec), priority=50   , match=(reg0[[15]] == 1), 
> action=(drop;)
> -  table=??(ls_in_apply_port_sec), priority=70   , match=(reg0[[22]] == 1), 
> action=(drop;)
> -  table=??(ls_in_apply_port_sec), priority=75   , match=(reg0[[22]] == 1 && 
> is_chassis_resident("cr-lr0-public")), action=(next;)
> -  table=??(ls_in_apply_port_sec), priority=75   , match=(reg0[[22]] == 1 && 
> is_chassis_resident("sw0-port1")), action=(next;)
> -])
> -
> -ovn-nbctl show
> -ovn-sbctl show
> -
> -check ovn-nbctl clear logical_router_port lr0-public gateway_chassis
> -check ovn-nbctl --wait=sb sync
> -
> -AT_CHECK([ovn-sbctl lflow-list public | grep ls_in_apply_port_sec | 
> ovn_strip_lflows], [0], [dnl
> -  table=??(ls_in_apply_port_sec), priority=0    , match=(1), action=(next;)
> -  table=??(ls_in_apply_port_sec), priority=50   , match=(reg0[[15]] == 1), 
> action=(drop;)
> -])
> -
> -check ovn-nbctl --wait=sb ha-chassis-group-add hagrp1
> -check ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 ch1 30
> -hagrp1_uuid=$(fetch_column nb:ha_chassis_group _uuid name=hagrp1)
> -check ovn-nbctl --wait=sb set logical_router_port lr0-public 
> ha_chassis_group=$hagrp1_uuid
> -check ovn-nbctl --wait=sb sync
> -
> -AT_CHECK([ovn-sbctl lflow-list public | grep ls_in_apply_port_sec | 
> ovn_strip_lflows], [0], [dnl
> -  table=??(ls_in_apply_port_sec), priority=0    , match=(1), action=(next;)
> -  table=??(ls_in_apply_port_sec), priority=50   , match=(reg0[[15]] == 1), 
> action=(drop;)
> -  table=??(ls_in_apply_port_sec), priority=70   , match=(reg0[[22]] == 1), 
> action=(drop;)
> -  table=??(ls_in_apply_port_sec), priority=75   , match=(reg0[[22]] == 1 && 
> is_chassis_resident("cr-lr0-public")), action=(next;)
> -  table=??(ls_in_apply_port_sec), priority=75   , match=(reg0[[22]] == 1 && 
> is_chassis_resident("sw0-port1")), action=(next;)
> -])
> -
> -OVN_CLEANUP_NORTHD
> -AT_CLEANUP
> -])
> -
>  OVN_FOR_EACH_NORTHD_NO_HV([
>  AT_SETUP([IGMP northd crash])
>  ovn_start
> diff --git a/tests/system-ovn.at b/tests/system-ovn.at
> index 1b7dd6ddb..be859ea7d 100644
> --- a/tests/system-ovn.at
> +++ b/tests/system-ovn.at
> @@ -21053,68 +21053,6 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/.*error receiving.*/d
>  AT_CLEANUP
>  ])
>  
> -OVN_FOR_EACH_NORTHD([
> -AT_SETUP([NAT with only dnat_and_snat NAT configured: IPv4])

Instead of removing this test we should actually include it in the last
patch of the series.  I'll move it there.

> -AT_KEYWORDS([ovnnat])
> -
> -ovn_start
> -OVS_TRAFFIC_VSWITCHD_START()
> -
> -ADD_BR([br-int])
> -ADD_BR([br-ext])
> -
> -ovs-ofctl add-flow br-ext action=normal
> -# Set external-ids in br-int needed for ovn-controller
> -ovs-vsctl \
> -        -- set Open_vSwitch . external-ids:system-id=hv1 \
> -        -- set Open_vSwitch . 
> external-ids:ovn-remote=unix:$ovs_base/ovn-sb/ovn-sb.sock \
> -        -- set Open_vSwitch . external-ids:ovn-encap-type=geneve \
> -        -- set Open_vSwitch . external-ids:ovn-encap-ip=169.0.0.1 \
> -        -- set Open_vSwitch . external-ids:ovn-bridge-mappings=phynet:br-ext
> -        -- set bridge br-int fail-mode=secure 
> other-config:disable-in-band=true
> -
> -# Start ovn-controller
> -start_daemon ovn-controller
> -
> -check ovn-nbctl lr-add lr1
> -check ovn-nbctl ls-add sw0
> -check ovn-nbctl ls-add public
> -
> -check ovn-nbctl lrp-add lr1 rp-sw0 00:00:01:01:02:03 192.168.1.1/24
> -check ovn-nbctl lrp-add lr1 rp-public 00:00:02:01:02:03 172.16.1.1/24
> -
> -check ovn-nbctl lsp-add-router-port sw0 sw0-rp rp-sw0
> -check ovn-nbctl lsp-add-router-port public public-rp rp-public
> -
> -check ovn-nbctl lsp-add-localnet-port public localnet phynet
> -
> -ADD_NAMESPACES(sw01-x)
> -ADD_VETH(sw01-x, sw01-x, br-int, "192.168.1.2/24", "f0:00:00:01:02:03", \
> -         "192.168.1.1")
> -check ovn-nbctl lsp-add sw0 sw01-x \
> -    -- lsp-set-addresses sw01-x "f0:00:00:01:02:03 192.168.1.2"
> -
> -ADD_NAMESPACES(ext-foo)
> -ADD_VETH(ext-foo, ext-foo, br-ext, "172.16.1.100/24", "00:10:10:01:02:13", \
> -         "172.16.1.1")
> -
> -# Create distributed nat and set gw chassis to non-exisrting
> -# one - to check distributed NAT on non gw-chassis.
> -check ovn-nbctl lrp-set-gateway-chassis rp-public hv2
> -check ovn-nbctl lr-nat-del lr1
> -check ovn-nbctl lr-nat-add lr1 dnat_and_snat 172.16.0.1 192.168.1.2 sw01-x 
> 00:00:04:00:00:01
> -
> -NS_EXEC([ext-foo], [ip r add 172.16.0.1/32 dev ext-foo])
> -NS_CHECK_CONNECTIVITY([ext-foo], [sw01-x], 172.16.0.1)
> -
> -OVN_CLEANUP_CONTROLLER([hv1])
> -OVN_CLEANUP_NORTHD
> -as
> -OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
> -/connection dropped.*/d"])
> -AT_CLEANUP
> -])
> -
>  OVN_FOR_EACH_NORTHD([
>  AT_SETUP([ACL CT translation - UDP fragmentation])
>  AT_KEYWORDS([acl_ct_translation_udp_fragmentation])

Applied to main and 26.03.

Regards,
Dumitru

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

Reply via email to