Skip to content

Commit 254cec1

Browse files
nirdotandavem330
authored andcommitted
mlxsw: spectrum: Change stage of ACL initialization
In Spectrum-2, MC routing is implemented using ACL block explicitly, so router initialization should take place after ACL initialization. Set the initialization of the ACL block before IP router initizalization takes place, so multicast router will be able to allocate ACL data structures and create its required chains. Signed-off-by: Nir Dotan <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a75e41d commit 254cec1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4002,6 +4002,12 @@ static int mlxsw_sp_init(struct mlxsw_core *mlxsw_core,
40024002
goto err_nve_init;
40034003
}
40044004

4005+
err = mlxsw_sp_acl_init(mlxsw_sp);
4006+
if (err) {
4007+
dev_err(mlxsw_sp->bus_info->dev, "Failed to initialize ACL\n");
4008+
goto err_acl_init;
4009+
}
4010+
40054011
err = mlxsw_sp_router_init(mlxsw_sp);
40064012
if (err) {
40074013
dev_err(mlxsw_sp->bus_info->dev, "Failed to initialize router\n");
@@ -4019,12 +4025,6 @@ static int mlxsw_sp_init(struct mlxsw_core *mlxsw_core,
40194025
goto err_netdev_notifier;
40204026
}
40214027

4022-
err = mlxsw_sp_acl_init(mlxsw_sp);
4023-
if (err) {
4024-
dev_err(mlxsw_sp->bus_info->dev, "Failed to initialize ACL\n");
4025-
goto err_acl_init;
4026-
}
4027-
40284028
err = mlxsw_sp_dpipe_init(mlxsw_sp);
40294029
if (err) {
40304030
dev_err(mlxsw_sp->bus_info->dev, "Failed to init pipeline debug\n");
@@ -4042,12 +4042,12 @@ static int mlxsw_sp_init(struct mlxsw_core *mlxsw_core,
40424042
err_ports_create:
40434043
mlxsw_sp_dpipe_fini(mlxsw_sp);
40444044
err_dpipe_init:
4045-
mlxsw_sp_acl_fini(mlxsw_sp);
4046-
err_acl_init:
40474045
unregister_netdevice_notifier(&mlxsw_sp->netdevice_nb);
40484046
err_netdev_notifier:
40494047
mlxsw_sp_router_fini(mlxsw_sp);
40504048
err_router_init:
4049+
mlxsw_sp_acl_fini(mlxsw_sp);
4050+
err_acl_init:
40514051
mlxsw_sp_nve_fini(mlxsw_sp);
40524052
err_nve_init:
40534053
mlxsw_sp_afa_fini(mlxsw_sp);
@@ -4108,9 +4108,9 @@ static void mlxsw_sp_fini(struct mlxsw_core *mlxsw_core)
41084108

41094109
mlxsw_sp_ports_remove(mlxsw_sp);
41104110
mlxsw_sp_dpipe_fini(mlxsw_sp);
4111-
mlxsw_sp_acl_fini(mlxsw_sp);
41124111
unregister_netdevice_notifier(&mlxsw_sp->netdevice_nb);
41134112
mlxsw_sp_router_fini(mlxsw_sp);
4113+
mlxsw_sp_acl_fini(mlxsw_sp);
41144114
mlxsw_sp_nve_fini(mlxsw_sp);
41154115
mlxsw_sp_afa_fini(mlxsw_sp);
41164116
mlxsw_sp_counter_pool_fini(mlxsw_sp);

0 commit comments

Comments
 (0)