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)
commit04d075b7aa8433dc3c98e14c571705effc318cd8
treeb4dd3b8aa91761b364a5aed22376efbb83016ec4
parentff0db43cd6c530ff944773ccf48ece55d32d0c22
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: cf7221a4f5a5 ("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