net/mlx5: fix no-green metering with RSS
authorShun Hao <shunh@nvidia.com>
Thu, 14 Apr 2022 07:55:20 +0000 (10:55 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 11 May 2022 07:45:23 +0000 (09:45 +0200)
commitfc7211097d41957bd6e29d64fd42ce679b4147b8
treead0147752d17c3c7833a87548ca4e8c03caf0007
parentb758e00064a8650d21a37381b936106398d8a895
net/mlx5: fix no-green metering with RSS

When a meter with RSS action being used, there might be several
sub-flows using different sub-policies in the flow splitting stage.
If there's no green action, there's an error that will always use the
same sub-policy for all sub-flows, some resources will be
overwritten and cannot be released, leading assert during port close.

This patch fixes this issue by checking both green and yellow queue
index during getting a blank sub-policy, to avoid the incorrect
resource overwrite.

Fixes: b38a12272b3a ("net/mlx5: split meter color policy handling")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c