mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 06:34:11 +08:00
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: cf7221a4f5
("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>
This commit is contained in:
parent
ff0db43cd6
commit
04d075b7aa
@ -1022,7 +1022,6 @@ void mlxsw_sp_acl_erp_mask_put(struct mlxsw_sp_acl_atcam_region *aregion,
|
|||||||
{
|
{
|
||||||
struct objagg_obj *objagg_obj = (struct objagg_obj *) erp_mask;
|
struct objagg_obj *objagg_obj = (struct objagg_obj *) erp_mask;
|
||||||
|
|
||||||
ASSERT_RTNL();
|
|
||||||
objagg_obj_put(aregion->erp_table->objagg, objagg_obj);
|
objagg_obj_put(aregion->erp_table->objagg, objagg_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1054,7 +1053,6 @@ void mlxsw_sp_acl_erp_bf_remove(struct mlxsw_sp *mlxsw_sp,
|
|||||||
const struct mlxsw_sp_acl_erp *erp = objagg_obj_root_priv(objagg_obj);
|
const struct mlxsw_sp_acl_erp *erp = objagg_obj_root_priv(objagg_obj);
|
||||||
unsigned int erp_bank;
|
unsigned int erp_bank;
|
||||||
|
|
||||||
ASSERT_RTNL();
|
|
||||||
if (!mlxsw_sp_acl_erp_table_is_used(erp->erp_table))
|
if (!mlxsw_sp_acl_erp_table_is_used(erp->erp_table))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user