net/mlx5: fix meter hierarchy validation with yellow
authorBing Zhao <bingz@nvidia.com>
Thu, 29 Jul 2021 16:04:05 +0000 (19:04 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 29 Jul 2021 20:06:43 +0000 (22:06 +0200)
commitf8c42c53ce744180e1fb4203b2cf976054726360
tree0e7c730363998f95017074c82ba49773fa59afc0
parentd5bb76d5b0ef8e0a4680b60673602610516682b3
net/mlx5: fix meter hierarchy validation with yellow

In mlx5 PMD, the meter hierarchy only supports the green color. It
means that a meter action can only be in the green action list. In
the meanwhile, the yellow action list should be empty now. Any
action for the yellow color policy will be considered invalid if
the green color policy is a hierarchy.

Also, the error message printing of meter hierarchy validation is
fixed by removing an incorrect checking.

Fixes: 4b7bf3ffb473 ("net/mlx5: support yellow in meter policy validation")
Fixes: a3b7af90baba ("net/mlx5: validate meter action in policy")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c