net/mlx5: use mask for meter register setting
authorShun Hao <shunh@nvidia.com>
Tue, 20 Apr 2021 10:55:12 +0000 (13:55 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 21 Apr 2021 06:27:52 +0000 (08:27 +0200)
commita597ef336f001237f58ea93f073a9ebd9bd31ade
tree5f418b91aa53c2146b0b0d519d5448aec7a32e93
parent5df35867d97f95d07de042dff1b215526313820c
net/mlx5: use mask for meter register setting

ASO (Advanced Steering Operation) meter feature may require
to locate the flow context tag action after the ASO action.
When color register is shared by meter_id/flow_id, it's like:
Bits[0-7] A meter color value set by the HW.
Bits[8-31] A flow id and meter id set by SW.

Currently the tag action for meter writes all the bits
of the meter register, so it will potentially overwrite
meter color when ASO meter action is before the tag action.

Set only 24-MSB-bits of meter register in the meter tag action.

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c