[ovs-dev] [PATCH ovn] controller: keep mcast_query_list list in sync with sb configuration

Mark Michelson mmichels at redhat.com
Wed Nov 17 18:26:02 UTC 2021


Thanks Lorenzo,

Acked-by: Mark Michelson <mmichels at redhat.com>

On 11/17/21 13:08, Lorenzo Bianconi wrote:
> In the current codebase mcast_query_list is updated only if IGMP
> snooping is enabled in ovn configuration. However querier configuration
> is always updated ending up having duplicated entries in
> mcast_query_list list. Fix the issue updating mcast_query_list list even
> if IGMP snoop is disabled.
> 
> Tested-by: Tim Rozet <trozet at redhat.com>
> Fixes: 70ff824304 ("OVN: Add IGMP SB definitions and ovn-controller support")
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi at redhat.com>
> ---
>   controller/pinctrl.c | 24 ++++++++++++------------
>   1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> index 19ef5fa2a..ae5320e09 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -4833,6 +4833,18 @@ static bool
>   ip_mcast_snoop_configure(struct ip_mcast_snoop *ip_ms,
>                            const struct ip_mcast_snoop_cfg *cfg)
>   {
> +    bool old_querier_enabled =
> +        (ip_ms->cfg.querier_v4_enabled || ip_ms->cfg.querier_v6_enabled);
> +
> +    bool querier_enabled =
> +        (cfg->querier_v4_enabled || cfg->querier_v6_enabled);
> +
> +    if (old_querier_enabled && !querier_enabled) {
> +        ovs_list_remove(&ip_ms->query_node);
> +    } else if (!old_querier_enabled && querier_enabled) {
> +        ovs_list_push_back(&mcast_query_list, &ip_ms->query_node);
> +    }
> +
>       if (cfg->enabled) {
>           if (!ip_mcast_snoop_enable(ip_ms)) {
>               return false;
> @@ -4840,18 +4852,6 @@ ip_mcast_snoop_configure(struct ip_mcast_snoop *ip_ms,
>           if (ip_ms->cfg.seq_no != cfg->seq_no) {
>               ip_mcast_snoop_flush(ip_ms);
>           }
> -
> -        bool old_querier_enabled =
> -            (ip_ms->cfg.querier_v4_enabled || ip_ms->cfg.querier_v6_enabled);
> -
> -        bool querier_enabled =
> -            (cfg->querier_v4_enabled || cfg->querier_v6_enabled);
> -
> -        if (old_querier_enabled && !querier_enabled) {
> -            ovs_list_remove(&ip_ms->query_node);
> -        } else if (!old_querier_enabled && querier_enabled) {
> -            ovs_list_push_back(&mcast_query_list, &ip_ms->query_node);
> -        }
>       } else {
>           ip_mcast_snoop_disable(ip_ms);
>           goto set_fields;
> 



More information about the dev mailing list