mlxsw: spectrum_acl: Remove unnecessary arg on action_replace call path
No need to pass ruleset/group and chunk pointers on action_replace call path, nobody uses them. Signed-off-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
889865cf54
commit
42d704e018
|
@ -721,8 +721,7 @@ struct mlxsw_sp_acl_tcam_ops {
|
||||||
void *region_priv, void *chunk_priv,
|
void *region_priv, void *chunk_priv,
|
||||||
void *entry_priv);
|
void *entry_priv);
|
||||||
int (*entry_action_replace)(struct mlxsw_sp *mlxsw_sp,
|
int (*entry_action_replace)(struct mlxsw_sp *mlxsw_sp,
|
||||||
void *region_priv, void *chunk_priv,
|
void *region_priv, void *entry_priv,
|
||||||
void *entry_priv,
|
|
||||||
struct mlxsw_sp_acl_rule_info *rulei);
|
struct mlxsw_sp_acl_rule_info *rulei);
|
||||||
int (*entry_activity_get)(struct mlxsw_sp *mlxsw_sp,
|
int (*entry_activity_get)(struct mlxsw_sp *mlxsw_sp,
|
||||||
void *region_priv, void *entry_priv,
|
void *region_priv, void *entry_priv,
|
||||||
|
|
|
@ -194,8 +194,7 @@ static void mlxsw_sp1_acl_tcam_entry_del(struct mlxsw_sp *mlxsw_sp,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mlxsw_sp1_acl_tcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
mlxsw_sp1_acl_tcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
void *region_priv, void *chunk_priv,
|
void *region_priv, void *entry_priv,
|
||||||
void *entry_priv,
|
|
||||||
struct mlxsw_sp_acl_rule_info *rulei)
|
struct mlxsw_sp_acl_rule_info *rulei)
|
||||||
{
|
{
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
|
@ -212,18 +212,15 @@ static void mlxsw_sp2_acl_tcam_entry_del(struct mlxsw_sp *mlxsw_sp,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mlxsw_sp2_acl_tcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
mlxsw_sp2_acl_tcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
void *region_priv, void *chunk_priv,
|
void *region_priv, void *entry_priv,
|
||||||
void *entry_priv,
|
|
||||||
struct mlxsw_sp_acl_rule_info *rulei)
|
struct mlxsw_sp_acl_rule_info *rulei)
|
||||||
{
|
{
|
||||||
struct mlxsw_sp2_acl_tcam_region *region = region_priv;
|
struct mlxsw_sp2_acl_tcam_region *region = region_priv;
|
||||||
struct mlxsw_sp2_acl_tcam_chunk *chunk = chunk_priv;
|
|
||||||
struct mlxsw_sp2_acl_tcam_entry *entry = entry_priv;
|
struct mlxsw_sp2_acl_tcam_entry *entry = entry_priv;
|
||||||
|
|
||||||
entry->act_block = rulei->act_block;
|
entry->act_block = rulei->act_block;
|
||||||
return mlxsw_sp_acl_atcam_entry_action_replace(mlxsw_sp,
|
return mlxsw_sp_acl_atcam_entry_action_replace(mlxsw_sp,
|
||||||
®ion->aregion,
|
®ion->aregion,
|
||||||
&chunk->achunk,
|
|
||||||
&entry->aentry, rulei);
|
&entry->aentry, rulei);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -742,8 +742,7 @@ int mlxsw_sp_acl_rule_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
rulei = mlxsw_sp_acl_rule_rulei(rule);
|
rulei = mlxsw_sp_acl_rule_rulei(rule);
|
||||||
rulei->act_block = afa_block;
|
rulei->act_block = afa_block;
|
||||||
|
|
||||||
return ops->rule_action_replace(mlxsw_sp, ruleset->priv, rule->priv,
|
return ops->rule_action_replace(mlxsw_sp, rule->priv, rule->rulei);
|
||||||
rule->rulei);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct mlxsw_sp_acl_rule *
|
struct mlxsw_sp_acl_rule *
|
||||||
|
|
|
@ -603,7 +603,6 @@ void mlxsw_sp_acl_atcam_entry_del(struct mlxsw_sp *mlxsw_sp,
|
||||||
int
|
int
|
||||||
mlxsw_sp_acl_atcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
mlxsw_sp_acl_atcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
struct mlxsw_sp_acl_atcam_region *aregion,
|
struct mlxsw_sp_acl_atcam_region *aregion,
|
||||||
struct mlxsw_sp_acl_atcam_chunk *achunk,
|
|
||||||
struct mlxsw_sp_acl_atcam_entry *aentry,
|
struct mlxsw_sp_acl_atcam_entry *aentry,
|
||||||
struct mlxsw_sp_acl_rule_info *rulei)
|
struct mlxsw_sp_acl_rule_info *rulei)
|
||||||
{
|
{
|
||||||
|
@ -612,7 +611,6 @@ mlxsw_sp_acl_atcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
if (mlxsw_sp_acl_atcam_is_centry(aentry))
|
if (mlxsw_sp_acl_atcam_is_centry(aentry))
|
||||||
err = mlxsw_sp_acl_ctcam_entry_action_replace(mlxsw_sp,
|
err = mlxsw_sp_acl_ctcam_entry_action_replace(mlxsw_sp,
|
||||||
&aregion->cregion,
|
&aregion->cregion,
|
||||||
&achunk->cchunk,
|
|
||||||
&aentry->centry,
|
&aentry->centry,
|
||||||
rulei);
|
rulei);
|
||||||
else
|
else
|
||||||
|
|
|
@ -223,7 +223,6 @@ void mlxsw_sp_acl_ctcam_entry_del(struct mlxsw_sp *mlxsw_sp,
|
||||||
|
|
||||||
int mlxsw_sp_acl_ctcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
int mlxsw_sp_acl_ctcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
struct mlxsw_sp_acl_ctcam_region *cregion,
|
struct mlxsw_sp_acl_ctcam_region *cregion,
|
||||||
struct mlxsw_sp_acl_ctcam_chunk *cchunk,
|
|
||||||
struct mlxsw_sp_acl_ctcam_entry *centry,
|
struct mlxsw_sp_acl_ctcam_entry *centry,
|
||||||
struct mlxsw_sp_acl_rule_info *rulei)
|
struct mlxsw_sp_acl_rule_info *rulei)
|
||||||
{
|
{
|
||||||
|
|
|
@ -781,7 +781,6 @@ static void mlxsw_sp_acl_tcam_entry_del(struct mlxsw_sp *mlxsw_sp,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mlxsw_sp_acl_tcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
mlxsw_sp_acl_tcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
struct mlxsw_sp_acl_tcam_group *group,
|
|
||||||
struct mlxsw_sp_acl_tcam_entry *entry,
|
struct mlxsw_sp_acl_tcam_entry *entry,
|
||||||
struct mlxsw_sp_acl_rule_info *rulei)
|
struct mlxsw_sp_acl_rule_info *rulei)
|
||||||
{
|
{
|
||||||
|
@ -789,7 +788,7 @@ mlxsw_sp_acl_tcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
struct mlxsw_sp_acl_tcam_chunk *chunk = entry->chunk;
|
struct mlxsw_sp_acl_tcam_chunk *chunk = entry->chunk;
|
||||||
struct mlxsw_sp_acl_tcam_region *region = chunk->region;
|
struct mlxsw_sp_acl_tcam_region *region = chunk->region;
|
||||||
|
|
||||||
return ops->entry_action_replace(mlxsw_sp, region->priv, chunk->priv,
|
return ops->entry_action_replace(mlxsw_sp, region->priv,
|
||||||
entry->priv, rulei);
|
entry->priv, rulei);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -955,7 +954,6 @@ mlxsw_sp_acl_tcam_flower_rule_del(struct mlxsw_sp *mlxsw_sp, void *rule_priv)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mlxsw_sp_acl_tcam_flower_rule_action_replace(struct mlxsw_sp *mlxsw_sp,
|
mlxsw_sp_acl_tcam_flower_rule_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
void *ruleset_priv,
|
|
||||||
void *rule_priv,
|
void *rule_priv,
|
||||||
struct mlxsw_sp_acl_rule_info *rulei)
|
struct mlxsw_sp_acl_rule_info *rulei)
|
||||||
{
|
{
|
||||||
|
@ -1084,14 +1082,13 @@ mlxsw_sp_acl_tcam_mr_rule_del(struct mlxsw_sp *mlxsw_sp, void *rule_priv)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mlxsw_sp_acl_tcam_mr_rule_action_replace(struct mlxsw_sp *mlxsw_sp,
|
mlxsw_sp_acl_tcam_mr_rule_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
void *ruleset_priv, void *rule_priv,
|
void *rule_priv,
|
||||||
struct mlxsw_sp_acl_rule_info *rulei)
|
struct mlxsw_sp_acl_rule_info *rulei)
|
||||||
{
|
{
|
||||||
struct mlxsw_sp_acl_tcam_mr_ruleset *ruleset = ruleset_priv;
|
|
||||||
struct mlxsw_sp_acl_tcam_mr_rule *rule = rule_priv;
|
struct mlxsw_sp_acl_tcam_mr_rule *rule = rule_priv;
|
||||||
|
|
||||||
return mlxsw_sp_acl_tcam_entry_action_replace(mlxsw_sp, &ruleset->group,
|
return mlxsw_sp_acl_tcam_entry_action_replace(mlxsw_sp, &rule->entry,
|
||||||
&rule->entry, rulei);
|
rulei);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -48,8 +48,7 @@ struct mlxsw_sp_acl_profile_ops {
|
||||||
void *ruleset_priv, void *rule_priv,
|
void *ruleset_priv, void *rule_priv,
|
||||||
struct mlxsw_sp_acl_rule_info *rulei);
|
struct mlxsw_sp_acl_rule_info *rulei);
|
||||||
void (*rule_del)(struct mlxsw_sp *mlxsw_sp, void *rule_priv);
|
void (*rule_del)(struct mlxsw_sp *mlxsw_sp, void *rule_priv);
|
||||||
int (*rule_action_replace)(struct mlxsw_sp *mlxsw_sp,
|
int (*rule_action_replace)(struct mlxsw_sp *mlxsw_sp, void *rule_priv,
|
||||||
void *ruleset_priv, void *rule_priv,
|
|
||||||
struct mlxsw_sp_acl_rule_info *rulei);
|
struct mlxsw_sp_acl_rule_info *rulei);
|
||||||
int (*rule_activity_get)(struct mlxsw_sp *mlxsw_sp, void *rule_priv,
|
int (*rule_activity_get)(struct mlxsw_sp *mlxsw_sp, void *rule_priv,
|
||||||
bool *activity);
|
bool *activity);
|
||||||
|
@ -126,7 +125,6 @@ void mlxsw_sp_acl_ctcam_entry_del(struct mlxsw_sp *mlxsw_sp,
|
||||||
struct mlxsw_sp_acl_ctcam_entry *centry);
|
struct mlxsw_sp_acl_ctcam_entry *centry);
|
||||||
int mlxsw_sp_acl_ctcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
int mlxsw_sp_acl_ctcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
struct mlxsw_sp_acl_ctcam_region *cregion,
|
struct mlxsw_sp_acl_ctcam_region *cregion,
|
||||||
struct mlxsw_sp_acl_ctcam_chunk *cchunk,
|
|
||||||
struct mlxsw_sp_acl_ctcam_entry *centry,
|
struct mlxsw_sp_acl_ctcam_entry *centry,
|
||||||
struct mlxsw_sp_acl_rule_info *rulei);
|
struct mlxsw_sp_acl_rule_info *rulei);
|
||||||
static inline unsigned int
|
static inline unsigned int
|
||||||
|
@ -224,7 +222,6 @@ void mlxsw_sp_acl_atcam_entry_del(struct mlxsw_sp *mlxsw_sp,
|
||||||
struct mlxsw_sp_acl_atcam_entry *aentry);
|
struct mlxsw_sp_acl_atcam_entry *aentry);
|
||||||
int mlxsw_sp_acl_atcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
int mlxsw_sp_acl_atcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
|
||||||
struct mlxsw_sp_acl_atcam_region *aregion,
|
struct mlxsw_sp_acl_atcam_region *aregion,
|
||||||
struct mlxsw_sp_acl_atcam_chunk *achunk,
|
|
||||||
struct mlxsw_sp_acl_atcam_entry *aentry,
|
struct mlxsw_sp_acl_atcam_entry *aentry,
|
||||||
struct mlxsw_sp_acl_rule_info *rulei);
|
struct mlxsw_sp_acl_rule_info *rulei);
|
||||||
int mlxsw_sp_acl_atcam_init(struct mlxsw_sp *mlxsw_sp,
|
int mlxsw_sp_acl_atcam_init(struct mlxsw_sp *mlxsw_sp,
|
||||||
|
|
Loading…
Reference in New Issue