net/mlx5: fix RSS validation for meter hierarchy
authorBing Zhao <bingz@nvidia.com>
Tue, 23 Nov 2021 16:05:19 +0000 (18:05 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 23 Nov 2021 16:57:13 +0000 (17:57 +0100)
commitdb3ec06e7ab1d3226c13bac002f65a688239cb27
treeb559569c0811a71bc7a25e61959c23317a15444d
parent693c7d4b1e12024cd429ef563e9df5cc2c477aee
net/mlx5: fix RSS validation for meter hierarchy

In a meter hierarchy, all the meters are marked with having RSS if
the final meter's termination action is RSS.

When validating a flow rule with meter hierarchy, the RSS action
should not be fetched from the current meter if it is not the final
one.

The fate action union is next meter ID instead of the pointer to the
RSS action. By using the final meter in the hierarchy, the flow rule
validation will succeed without any crash caused by the invalid RSS
action pointer access.

Fixes: 1ce19ab1f43b ("net/mlx5: fix RSS validation with meter policy")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Reviewed-by: Li Zhang <lizh@nvidia.com>
Reviewed-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c