[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1b6cd3cf-0e01-2730-b8ad-d26e2355ce84@cumulusnetworks.com>
Date: Tue, 30 Jul 2019 17:00:27 +0300
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To: David Ahern <dsahern@...il.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net, roopa@...ulusnetworks.com,
bridge@...ts.linux-foundation.org
Subject: Re: [PATCH net] net: bridge: mcast: don't delete permanent entries
when fast leave is enabled
On 30/07/2019 16:58, David Ahern wrote:
> On 7/30/19 5:21 AM, Nikolay Aleksandrov wrote:
>> diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
>> index 3d8deac2353d..f8cac3702712 100644
>> --- a/net/bridge/br_multicast.c
>> +++ b/net/bridge/br_multicast.c
>> @@ -1388,6 +1388,9 @@ br_multicast_leave_group(struct net_bridge *br,
>> if (!br_port_group_equal(p, port, src))
>> continue;
>>
>> + if (p->flags & MDB_PG_FLAGS_PERMANENT)
>> + break;
>> +
>> rcu_assign_pointer(*pp, p->next);
>> hlist_del_init(&p->mglist);
>> del_timer(&p->timer);
>
> Why 'break' and not 'continue' like you have with
> if (!br_port_group_equal(p, port, src))
>
Because we'll hit the goto out after this hunk always, no point in continuing
if we matched a group and it's permanent, the break might as well be a goto out.
Powered by blists - more mailing lists