net: bridge: mcast: destroy all entries via gc
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Mon, 7 Sep 2020 09:56:19 +0000 (12:56 +0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 7 Sep 2020 20:16:36 +0000 (13:16 -0700)
commite12cec65b5546f19217e26aafb8add6e2fadca18
treea23abc847500aee38959cbcf556b0392da42adc0
parent23550b8313331dca297ffea07c2250e95ccca121
net: bridge: mcast: destroy all entries via gc

Since each entry type has timers that can be running simultaneously we need
to make sure that entries are not freed before their timers have finished.
In order to do that generalize the src gc work to mcast gc work and use a
callback to free the entries (mdb, port group or src).

v3: add IPv6 support
v2: force mcast gc on port del to make sure all port group timers have
    finished before freeing the bridge port

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/bridge/br_multicast.c
net/bridge/br_private.h