[ovs-dev] [PATCH ovn] northd: Fix multicast table full comparison.

Numan Siddique numans at ovn.org
Tue Jul 13 16:11:40 UTC 2021


On Thu, Jul 8, 2021 at 1:48 PM Dumitru Ceara <dceara at redhat.com> wrote:
>
> atomic_compare_exchange_strong(src, exp, dst) returns false if
> *exp != src and stores src in *exp.
>
> This was overwriting mcast_sw_info->table_size with 0 every time the
> first igmp group was processed, causing all others to be skipped.
>
> Fixes: 74daa0607c7f ("ovn-northd: Introduce parallel lflow build")
> Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1979870
> Signed-off-by: Dumitru Ceara <dceara at redhat.com>

Thanks for the fix.  I applied to the main branch and branch-21.06.

Numan

> ---
>  northd/ovn-northd.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 570c6a3ef..952b664df 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -7439,6 +7439,7 @@ build_lswitch_ip_mcast_igmp_mld(struct ovn_igmp_group *igmp_group,
>
>          struct mcast_switch_info *mcast_sw_info =
>              &igmp_group->datapath->mcast_info.sw;
> +        uint64_t table_size = mcast_sw_info->table_size;
>
>          if (IN6_IS_ADDR_V4MAPPED(&igmp_group->address)) {
>              /* RFC 4541, section 2.1.2, item 2: Skip groups in the 224.0.0.X
> @@ -7449,10 +7450,8 @@ build_lswitch_ip_mcast_igmp_mld(struct ovn_igmp_group *igmp_group,
>              if (ip_is_local_multicast(group_address)) {
>                  return;
>              }
> -
>              if (atomic_compare_exchange_strong(
> -                        &mcast_sw_info->active_v4_flows,
> -                        (uint64_t *) &mcast_sw_info->table_size,
> +                        &mcast_sw_info->active_v4_flows, &table_size,
>                          mcast_sw_info->table_size)) {
>                  return;
>              }
> @@ -7467,8 +7466,7 @@ build_lswitch_ip_mcast_igmp_mld(struct ovn_igmp_group *igmp_group,
>                  return;
>              }
>              if (atomic_compare_exchange_strong(
> -                        &mcast_sw_info->active_v6_flows,
> -                        (uint64_t *) &mcast_sw_info->table_size,
> +                        &mcast_sw_info->active_v6_flows, &table_size,
>                          mcast_sw_info->table_size)) {
>                  return;
>              }
> --
> 2.27.0
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list