net/mlx5: fix metering with flow ID 0
authorShun Hao <shunh@nvidia.com>
Wed, 12 May 2021 10:20:59 +0000 (13:20 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 12 May 2021 12:49:28 +0000 (14:49 +0200)
commitc751be10272168119ea6ab50a197e5c4e9927d02
tree2753ba6fa71714ecf959b796228f047781d4c260
parentf11f70ae1a69ae14eee905e8391dd8ba93756a8e
net/mlx5: fix metering with flow ID 0

When getting meter flow_id bits, there's an issue that not handling
correctly if flow_id is 0.

This fix this issue that when flow_id is 0, treat it as 1 bit.

Fixes: 83306d6c465a ("net/mlx5: fix meter statistics")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow.c