[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0168781-19a0-724b-09a4-f08dfa05e044@nvidia.com>
Date: Fri, 2 Jul 2021 18:25:38 +0300
From: Nikolay Aleksandrov <nikolay@...dia.com>
To: Wolfgang Bumiller <w.bumiller@...xmox.com>, netdev@...r.kernel.org
Cc: bridge@...ts.linux-foundation.org,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Roopa Prabhu <roopa@...dia.com>,
Vlad Yasevich <vyasevic@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Thomas Lamprecht <t.lamprecht@...xmox.com>
Subject: Re: [PATCH v3] net: bridge: sync fdb to new unicast-filtering ports
On 02/07/2021 15:07, Wolfgang Bumiller wrote:
> Since commit 2796d0c648c9 ("bridge: Automatically manage
> port promiscuous mode.")
> bridges with `vlan_filtering 1` and only 1 auto-port don't
> set IFF_PROMISC for unicast-filtering-capable ports.
>
> Normally on port changes `br_manage_promisc` is called to
> update the promisc flags and unicast filters if necessary,
> but it cannot distinguish between *new* ports and ones
> losing their promisc flag, and new ports end up not
> receiving the MAC address list.
>
> Fix this by calling `br_fdb_sync_static` in `br_add_if`
> after the port promisc flags are updated and the unicast
> filter was supposed to have been filled.
>
> Fixes: 2796d0c648c9 ("bridge: Automatically manage port promiscuous mode.")
> Signed-off-by: Wolfgang Bumiller <w.bumiller@...xmox.com>
> ---
> Changes to v2:
> * Added 'fdb_synced' boolean to only unsync on error if it was
> actually synced.
> `br_fdb_sync_static()` already unrolls changes if it encounters an
> error in the middle, so only a successful call will trigger the
> unsync.
> I opted for the explicit error handling as I felt that avoiding the
> error cleanup by moving the code down might be more easily missed in
> future changes (I just felt safer this way), plus, it's closer to
> the call which would normally be responsible for doing this which
> felt more natural to me.
>
> I hope this is fine, otherwise I can still move it :-)
>
> net/bridge/br_if.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
Looks good to me, thanks!
Acked-by: Nikolay Aleksandrov <nikolay@...dia.com>
Powered by blists - more mailing lists