Hi Ales,
On 12/2/25 12:12 PM, Ales Musil via dev wrote:
> The IGMP group could be accidentaly learned on LR datapath instead
> of LS. While the IGMP Group would be removed by northd if it was the
> case this still creates some churn in SB database. This could happen
> under the following conditions:
>
> 1) pinctrl thread will receive packet and stored IGMP group candidate
> in hmap, with datapath tunnel_key as key.
> 2) The LS datapath tunnel_key is reused by LR.
> 3) ovn-controller will proccess those changes and will run
> ip_mcast_sync().
> 4) The ip_mcast_sync() will walk through IGMP group candidates
> retreiving datapath for given tunnel_key being LR at this point.
> 5) The IGMP group is stored in SB with a reference to LR.
>
> There is one more condition, the pinctrl thread can't run after
> 2) otherwise it would update the in memory ip_mcast_snoop map.
>
> To prevent that make sure we check if the retreived datapath
> is LS and skip the processing if that's not the case.
>
Thanks for the fix!
Nit: there are some typos in the commit log: accidentaly,
proccess, retreiving, retreived.
Fixes: 70ff8243040f ("OVN: Add IGMP SB definitions and ovn-controller support")
Sorry for this old bug. :)
While there's still a chance that ovn-controller creates IGMP_Group
records for switches that don't have snooping enabled _anymore_,
that's transient and northd will properly clean things up.
With the typos addressed, looks good to me:
Acked-by: Dumitru Ceara <[email protected]>
> Signed-off-by: Ales Musil <[email protected]>
> ---
> controller/pinctrl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> index fdb1527c1..eb9dd64d9 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -5769,7 +5769,7 @@ ip_mcast_sync(struct ovsdb_idl_txn *ovnsb_idl_txn,
> struct local_datapath *local_dp =
> get_local_datapath(local_datapaths, ip_ms->dp_key);
>
> - if (!local_dp) {
> + if (!local_dp || !local_dp->is_switch) {
> continue;
> }
>
Regards,
Dumitru
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev