net/mlx5: fix meter yellow policy with RSS action
authorBing Zhao <bingz@nvidia.com>
Mon, 18 Oct 2021 13:53:05 +0000 (16:53 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 21 Oct 2021 07:31:15 +0000 (09:31 +0200)
commit273b09376c224c4efeafc77371bf706a386d2ae0
tree357a7d4822c28173c828839a7627bf123614518f
parent614966c2faf97915817f28d132757534f4b1b5ba
net/mlx5: fix meter yellow policy with RSS action

The RSS configuration in a policy action container was a pointer
inside a union, and the pointer area could be used as other fate
action. In the current implementation, the RSS of the green color
was prior to that of the yellow color. There was a high possibility
the pointer was considered as the RSS and result in a error flow
expansion when only the yellow color had the RSS action.

The check of the fate action type should also be done to get rid of
the misjudgment.

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