net/mlx5: fix RSS validation with meter policy
authorBing Zhao <bingz@nvidia.com>
Mon, 15 Nov 2021 14:51:21 +0000 (16:51 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 16 Nov 2021 09:23:31 +0000 (10:23 +0100)
commit1ce19ab1f43b9895fe6c3d5000578cb227f6bcec
treeefe2bfcc89b355b32922f3c7e7b6d5ea48f69266
parentbe26e81bfc1cb681d3ee0764aa6733000869984a
net/mlx5: fix RSS validation with meter policy

The RSS can be one of the fate actions when creating a meter with
policy. In the previous implementation, the RSS validation was missed
when creating a flow rule with such meter due to the fact that a
policy meter was created firstly and then used in the rule. In the
stage of meter creation, no rte_flow_item* information was provided.

A unnecessary RSS expansion might be called since the validation was
missed and would cause an unexpected error of the rule creation. Even
though the rule should be rejected from the very beginning, it would
cause confusion. There might be some other errors when the validation
was missed.

Adding the RSS validation inside the meter action validation will
prevent the code from continuing when there is a conflict between the
items, other actions and the policy meter RSS action.

Fixes: 444320186393 ("net/mlx5: support meter creation with policy")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Reviewed-by: Li Zhang <lizh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c