On 1/29/26 5:39 PM, Anton Arefiev wrote:
> From: Vasyl Saienko <[email protected]>
> 

Hi Anton, Vasyl,

Sorry for the long delay in reviewing this.

> Ignore external ports when building Ucast_Macs_Remote table as
> such ports are not hosted on bound chassis, they usually bound
> to gateway nodes to provide DHCP/Metadata services. Actual location
> will be learned from Ucast_Macs_Local database.
> 
> Signed-Off-By: Vasyl Saienko <[email protected]>
> ---
>  controller-vtep/vtep.c       |  8 ++++++++
>  tests/ovn-controller-vtep.at | 13 +++++++++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/controller-vtep/vtep.c b/controller-vtep/vtep.c
> index cfe1456b1..cfb2b2585 100644
> --- a/controller-vtep/vtep.c
> +++ b/controller-vtep/vtep.c
> @@ -352,6 +352,14 @@ vtep_macs_run(struct ovsdb_idl_txn *vtep_idl_txn, struct 
> shash *ucast_macs_rmts,
>                  continue;
>              }
>              tnl_key = peer_pb->datapath->tunnel_key;
> +        } else if (!strcmp(port_binding_rec->type, "external")){

Nit: missing space before "{".

> +            /* External ports not bound on specific chassis, they
> +             * may sit on some of VTEP endpoints, but port itself
> +             * is bound to one of gateway nodes to provide DHCP/Metadata.
> +             * Skip port_binding information for such ports, as its does

Nit: "as it does".

> +             * not specify real node location.
> +             */
> +            continue;
>          } else {
>              tnl_key = port_binding_rec->datapath->tunnel_key;
>          }
> diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
> index 2d20886e9..ae734fb1f 100644
> --- a/tests/ovn-controller-vtep.at
> +++ b/tests/ovn-controller-vtep.at
> @@ -375,12 +375,25 @@ AT_CHECK([ovn-nbctl --wait=sb sync])
>  AT_CHECK([ovn-sbctl chassis-add ch1 vxlan 1.2.3.6])
>  AT_CHECK([ovn-sbctl lsp-bind vif1 ch1])
>  
> +# adds external port to chassis
> +AT_CHECK([ovn-nbctl ha-chassis-group-add ext-group1])
> +AT_CHECK([ovn-nbctl ha-chassis-group-add-chassis ext-group1 ch1 7268])
> +AT_CHECK([ovn-sbctl set chassis ch0 
> other_config:ovn-cms-options=enable-chassis-as-gw])
> +AT_CHECK([ovn-nbctl lsp-add br-test ext1])
> +AT_CHECK([ovn-nbctl lsp-set-type ext1 external])
> +AT_CHECK([ovn-nbctl lsp-set-addresses ext1 aa:bb:cc:dd:01:02])
> +AT_CHECK([ovn-nbctl --wait=sb sync])
> +AT_CHECK([ovn-sbctl lsp-bind ext1 ch1])
> +
>  # checks Ucast_Macs_Remote creation.
>  OVS_WAIT_UNTIL([test -n "`vtep-ctl list Ucast_Macs_Remote | grep _uuid`"])
>  AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | 
> tr -d ' '], [0], [dnl
>  "f0:ab:cd:ef:01:02"
>  ])
>  
> +# check that `external` ports i not in Ucast_Macs_Remote

Typo: "ports i not in"

> +AT_CHECK([test -z "`vtep-ctl list Ucast_Macs_Remote | grep 
> aa:bb:cc:dd:01:02`"])
> +
>  # checks physical locator creation.
>  OVS_WAIT_UNTIL([test -n "`vtep-ctl list Physical_Locator | grep _uuid`"])
>  AT_CHECK([vtep-ctl --columns=dst_ip list Physical_Locator | cut -d ':' -f2 | 
> tr -d ' ' | grep -v 1.2.3.4 | sed '/^$/d'], [0], [dnl

As most of these were minor things to fix, I took care of the changes
and applied this to main.

Regards,
Dumitru

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

Reply via email to