Commit c4c2dc54 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

mlxsw: spectrum_acl: Split entry struct into entry and ventry

Do the split of entry struct so the new entry struct is related to the
actual HW entry, whereas ventry struct is a SW abstration of that.
This split prepares possibility for ventry to hold 2 HW entries which
is needed for region ERP rehash flow.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b2d6b4d2
...@@ -640,7 +640,7 @@ mlxsw_sp_acl_rule_create(struct mlxsw_sp *mlxsw_sp, ...@@ -640,7 +640,7 @@ mlxsw_sp_acl_rule_create(struct mlxsw_sp *mlxsw_sp,
int err; int err;
mlxsw_sp_acl_ruleset_ref_inc(ruleset); mlxsw_sp_acl_ruleset_ref_inc(ruleset);
rule = kzalloc(sizeof(*rule) + ops->rule_priv_size(mlxsw_sp), rule = kzalloc(sizeof(*rule) + ops->rule_priv_size,
GFP_KERNEL); GFP_KERNEL);
if (!rule) { if (!rule) {
err = -ENOMEM; err = -ENOMEM;
......
...@@ -43,7 +43,7 @@ struct mlxsw_sp_acl_profile_ops { ...@@ -43,7 +43,7 @@ struct mlxsw_sp_acl_profile_ops {
struct mlxsw_sp_port *mlxsw_sp_port, struct mlxsw_sp_port *mlxsw_sp_port,
bool ingress); bool ingress);
u16 (*ruleset_group_id)(void *ruleset_priv); u16 (*ruleset_group_id)(void *ruleset_priv);
size_t (*rule_priv_size)(struct mlxsw_sp *mlxsw_sp); size_t rule_priv_size;
int (*rule_add)(struct mlxsw_sp *mlxsw_sp, int (*rule_add)(struct mlxsw_sp *mlxsw_sp,
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);
......
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