Commit 898979c7 authored by Ido Schimmel's avatar Ido Schimmel Committed by Jakub Kicinski

mlxsw: spectrum_acl: Pass main driver structure to mlxsw_sp_acl_rulei_destroy()

The main driver structure will be needed in this function by a
subsequent patch, so pass it. No functional changes intended.
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Link: https://lore.kernel.org/r/24d96a4e21310e5de2951ace58263db35e44a0df.1689092769.git.petrm@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d65f24c9
...@@ -994,7 +994,8 @@ void mlxsw_sp_acl_ruleset_prio_get(struct mlxsw_sp_acl_ruleset *ruleset, ...@@ -994,7 +994,8 @@ void mlxsw_sp_acl_ruleset_prio_get(struct mlxsw_sp_acl_ruleset *ruleset,
struct mlxsw_sp_acl_rule_info * struct mlxsw_sp_acl_rule_info *
mlxsw_sp_acl_rulei_create(struct mlxsw_sp_acl *acl, mlxsw_sp_acl_rulei_create(struct mlxsw_sp_acl *acl,
struct mlxsw_afa_block *afa_block); struct mlxsw_afa_block *afa_block);
void mlxsw_sp_acl_rulei_destroy(struct mlxsw_sp_acl_rule_info *rulei); void mlxsw_sp_acl_rulei_destroy(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_acl_rule_info *rulei);
int mlxsw_sp_acl_rulei_commit(struct mlxsw_sp_acl_rule_info *rulei); int mlxsw_sp_acl_rulei_commit(struct mlxsw_sp_acl_rule_info *rulei);
void mlxsw_sp_acl_rulei_priority(struct mlxsw_sp_acl_rule_info *rulei, void mlxsw_sp_acl_rulei_priority(struct mlxsw_sp_acl_rule_info *rulei,
unsigned int priority); unsigned int priority);
......
...@@ -90,7 +90,7 @@ mlxsw_sp1_acl_ctcam_region_catchall_add(struct mlxsw_sp *mlxsw_sp, ...@@ -90,7 +90,7 @@ mlxsw_sp1_acl_ctcam_region_catchall_add(struct mlxsw_sp *mlxsw_sp,
err_entry_add: err_entry_add:
err_rulei_commit: err_rulei_commit:
err_rulei_act_continue: err_rulei_act_continue:
mlxsw_sp_acl_rulei_destroy(rulei); mlxsw_sp_acl_rulei_destroy(mlxsw_sp, rulei);
err_rulei_create: err_rulei_create:
mlxsw_sp_acl_ctcam_chunk_fini(&region->catchall.cchunk); mlxsw_sp_acl_ctcam_chunk_fini(&region->catchall.cchunk);
return err; return err;
...@@ -105,7 +105,7 @@ mlxsw_sp1_acl_ctcam_region_catchall_del(struct mlxsw_sp *mlxsw_sp, ...@@ -105,7 +105,7 @@ mlxsw_sp1_acl_ctcam_region_catchall_del(struct mlxsw_sp *mlxsw_sp,
mlxsw_sp_acl_ctcam_entry_del(mlxsw_sp, &region->cregion, mlxsw_sp_acl_ctcam_entry_del(mlxsw_sp, &region->cregion,
&region->catchall.cchunk, &region->catchall.cchunk,
&region->catchall.centry); &region->catchall.centry);
mlxsw_sp_acl_rulei_destroy(rulei); mlxsw_sp_acl_rulei_destroy(mlxsw_sp, rulei);
mlxsw_sp_acl_ctcam_chunk_fini(&region->catchall.cchunk); mlxsw_sp_acl_ctcam_chunk_fini(&region->catchall.cchunk);
} }
......
...@@ -339,7 +339,8 @@ mlxsw_sp_acl_rulei_create(struct mlxsw_sp_acl *acl, ...@@ -339,7 +339,8 @@ mlxsw_sp_acl_rulei_create(struct mlxsw_sp_acl *acl,
return ERR_PTR(err); return ERR_PTR(err);
} }
void mlxsw_sp_acl_rulei_destroy(struct mlxsw_sp_acl_rule_info *rulei) void mlxsw_sp_acl_rulei_destroy(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_acl_rule_info *rulei)
{ {
if (rulei->action_created) if (rulei->action_created)
mlxsw_afa_block_destroy(rulei->act_block); mlxsw_afa_block_destroy(rulei->act_block);
...@@ -834,7 +835,7 @@ void mlxsw_sp_acl_rule_destroy(struct mlxsw_sp *mlxsw_sp, ...@@ -834,7 +835,7 @@ void mlxsw_sp_acl_rule_destroy(struct mlxsw_sp *mlxsw_sp,
{ {
struct mlxsw_sp_acl_ruleset *ruleset = rule->ruleset; struct mlxsw_sp_acl_ruleset *ruleset = rule->ruleset;
mlxsw_sp_acl_rulei_destroy(rule->rulei); mlxsw_sp_acl_rulei_destroy(mlxsw_sp, rule->rulei);
kfree(rule); kfree(rule);
mlxsw_sp_acl_ruleset_ref_dec(mlxsw_sp, ruleset); mlxsw_sp_acl_ruleset_ref_dec(mlxsw_sp, ruleset);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment