net/mlx5: enable meter bucket overflow for yellow color
authorBing Zhao <bingz@nvidia.com>
Wed, 21 Jul 2021 08:54:16 +0000 (11:54 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 22 Jul 2021 11:28:43 +0000 (13:28 +0200)
commit9b5463df5d581258c25f1153a5ad8e6eb78ee696
tree324e766a70670970c89af17a50d59f52d2b5923e
parent363db9b00f10a1ea64acd076533e8872ad08d61a
net/mlx5: enable meter bucket overflow for yellow color

To support the meter policy for yellow action, the prerequisite is
that the hardware needs to support the EBS, as defined in the
RFC2697.
  https://datatracker.ietf.org/doc/html/rfc2697
Then some of the packets can be marked as yellow if the tokens of C
bucket is not enough but enough in E bucket. The color could be used
for the further steering of the packets.

In the current implementation EBS and overflow were ignored when
creating a meter profile. With this commit, if EBS is set by the
application, the generation of yellow color will be enabled in the
hardware for flow rules steering of packets.

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