diff options
author | Jiri Pirko <jiri@mellanox.com> | 2018-01-19 09:24:48 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-21 18:21:30 -0500 |
commit | c18c1e186ba872da73e944d9c54f027ea3899d39 (patch) | |
tree | bcf3bc571ae4c491f434b7bfe52c7e6c21fd4a4b /drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h | |
parent | mlxsw: core: Convert fwd_entry_ref list to be generic per-block resource list (diff) | |
download | linux-dev-c18c1e186ba872da73e944d9c54f027ea3899d39.tar.xz linux-dev-c18c1e186ba872da73e944d9c54f027ea3899d39.zip |
mlxsw: core: Make counter index allocated inside the action append
So far, the caller of mlxsw_afa_block_append_counter needed to allocate
counter index by hand. Benefit from the previously introduced resource
infra and counter_index_get/put callbacks, and allocate the counter
index in place where it is needed, inside the action append function.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h index 89f977996ae2..a48c3d10688c 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h +++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h @@ -69,8 +69,10 @@ int mlxsw_afa_block_append_fwd(struct mlxsw_afa_block *block, u8 local_port, bool in_port); int mlxsw_afa_block_append_vlan_modify(struct mlxsw_afa_block *block, u16 vid, u8 pcp, u8 et); +int mlxsw_afa_block_append_allocated_counter(struct mlxsw_afa_block *block, + u32 counter_index); int mlxsw_afa_block_append_counter(struct mlxsw_afa_block *block, - u32 counter_index); + u32 *p_counter_index); int mlxsw_afa_block_append_fid_set(struct mlxsw_afa_block *block, u16 fid); int mlxsw_afa_block_append_mcrouter(struct mlxsw_afa_block *block, u16 expected_irif, u16 min_mtu, |