]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: core_acl_flex_actions: Remove redundant counter destruction
authorNir Dotan <nird@mellanox.com>
Fri, 3 Aug 2018 12:57:43 +0000 (15:57 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Aug 2018 19:28:01 +0000 (12:28 -0700)
commitfe155754c51eafa36e875f9d5907cc6c39a6f3a8
tree13c068a377aac30214c2c1512f4c2a1135ba370a
parent746790238eaeb98ba9a46210a72844e3283ccd75
mlxsw: core_acl_flex_actions: Remove redundant counter destruction

Each tc flower rule uses a hidden count action. As counter resource may
not be available due to limited HW resources, update _counter_create()
and _counter_destroy() pair to follow previously introduced symmetric
error condition handling, add a call to mlxsw_afa_resource_del() as part
of the counter resource destruction.

Fixes: c83b7bc59d86 ("mlxsw: core: Make counter index allocated inside the action append")
Signed-off-by: Nir Dotan <nird@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-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