net/mlx5: fix flow indirect action reference counting
authorDmitry Kozlyuk <dkozlyuk@nvidia.com>
Wed, 1 Sep 2021 08:19:58 +0000 (11:19 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 21 Sep 2021 07:57:02 +0000 (09:57 +0200)
commitb09c65fa4f8bb55880b6b36c849e4ed1bb815227
treecfa68effdab25e7a8cbb969d867b07eec7211d3e
parent4ec1f971cd78d3dd63fdd6de23cde6fd322bcca2
net/mlx5: fix flow indirect action reference counting

When an indirect action is used in a flow rule with a pattern that
causes RSS expansion, each device flow generated by the expansion
incremented the reference counter of the action. When such a flow was
destroyed, its action reference counter had been decremented only once.
The action remained marked as being used and could not be destroyed.
COUNT, AGE, and CONNTRACK indirect actions have been affected
(for AGE the error was not immediately observable).
Increment action counter only once for the original flow rule.

Fixes: 81073e1f8ce1 ("net/mlx5: support shared age action")
Fixes: 2d084f69aa26 ("net/mlx5: add translation of connection tracking action")
Fixes: f3191849f2c2 ("net/mlx5: support flow count action handle")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c