]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_acl: Remove ASSERT_RTNL()s in module removal flow
authorNir Dotan <nird@mellanox.com>
Tue, 8 Jan 2019 16:48:04 +0000 (16:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jan 2019 21:53:53 +0000 (16:53 -0500)
commitc7e5198c8d3801b5a65af72cfbb0837ca93872bc
treeb4dd3b8aa91761b364a5aed22376efbb83016ec4
parentda904bc02e96e0ae4691dc11c6671626a5fb69ff
mlxsw: spectrum_acl: Remove ASSERT_RTNL()s in module removal flow

Removal of the mlxsw driver on Spectrum-2 platforms hits an ASSERT_RTNL()
in Spectrum-2 ACL Bloom filter and in ERP removal paths. This happens
because the multicast router implementation in Spectrum-2 relies on ACLs.
Taking the RTNL lock upon driver removal is useless since the driver first
removes its ports and unregisters from notifiers so concurrent writes
cannot happen at that time. The assertions were originally put as a
reminder for future work involving ERP background optimization, but having
these assertions only during addition serves this purpose as well.

Therefore remove the ASSERT_RTNL() in both places related to ERP and Bloom
filter removal.

Fixes: e2734a9b5f81 ("mlxsw: spectrum_router: Add Multicast routing support for Spectrum-2")
Signed-off-by: Nir Dotan <nird@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c