]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc83b7bc59d861bbecf11cb08cfd3795af2cb0130
treebcf3bc571ae4c491f434b7bfe52c7e6c21fd4a4b
parentff5adab28ce35643e6c08211a440cb6d5a4c8865
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