net: bridge: multicast: notify switchdev driver whenever MC processing gets disabled
authorOleksandr Mazur <oleksandr.mazur@plvision.eu>
Tue, 15 Feb 2022 16:53:03 +0000 (18:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:13 +0000 (12:03 +0100)
commite8ba5b039eeaa4e7c601b650c6f5e0b1657a38f6
tree592846065f1fd357d782b88f04d789ccc7d4c67e
parent6b1c9f99c2e67a6671ad5f9f0a16881c630414e0
net: bridge: multicast: notify switchdev driver whenever MC processing gets disabled

commit c832962ac972082b3a1f89775c9d4274c8cb5670 upstream.

Whenever bridge driver hits the max capacity of MDBs, it disables
the MC processing (by setting corresponding bridge option), but never
notifies switchdev about such change (the notifiers are called only upon
explicit setting of this option, through the registered netlink interface).

This could lead to situation when Software MDB processing gets disabled,
but this event never gets offloaded to the underlying Hardware.

Fix this by adding a notify message in such case.

Fixes: 147c1e9b902c ("switchdev: bridge: Offload multicast disabled")
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Link: https://lore.kernel.org/r/20220215165303.31908-1-oleksandr.mazur@plvision.eu
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bridge/br_multicast.c