mlxsw: core: Make counter index allocated inside the action append
authorJiri Pirko <jiri@mellanox.com>
Fri, 19 Jan 2018 08:24:48 +0000 (09:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Jan 2018 23:21:30 +0000 (18:21 -0500)
commitc18c1e186ba872da73e944d9c54f027ea3899d39
treebcf3bc571ae4c491f434b7bfe52c7e6c21fd4a4b
parent140ce421217e99f68a0108382e0789c1b1a15547
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>
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c