]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Flush FIB tables during fini
authorIdo Schimmel <idosch@mellanox.com>
Mon, 14 Nov 2016 10:26:32 +0000 (11:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Nov 2016 21:45:16 +0000 (16:45 -0500)
commitcf02958c08d546c743ffca160336e66c636aaba7
tree85afb4689162f0be63b92611c418b2bccdd90d22
parent093036c3a1ff6e1a7f50c704140686236bcb2007
mlxsw: spectrum_router: Flush FIB tables during fini

Since commit d3a93b4c07d9 ("mlxsw: spectrum_router: Use FIB notifications
instead of switchdev calls") we reflect to the device the entire FIB
table and not only FIBs that point to netdevs created by the driver.

During module removal, FIBs of the second type are removed following
NETDEV_UNREGISTER events sent. The other FIBs are still present in both
the driver's cache and the device's table.

Fix this by iterating over all the FIB tables in the device and flush
them. There's no need to take locks, as we're the only writer.

Fixes: d3a93b4c07d9 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c