]> git.droids-corp.org - dpdk.git/commit
net/mlx5: fix counter in non-termination meter
authorShun Hao <shunh@nvidia.com>
Wed, 6 Apr 2022 08:54:01 +0000 (11:54 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 21 Apr 2022 10:47:39 +0000 (12:47 +0200)
commit4fa1452bcaa452f7fa0214b78a2e0e2032deed40
tree626ee4ded1347029039f08041b20b37dffc1f371
parentf956d3d4c33cdfac5e352f457050029bd5c9b8a8
net/mlx5: fix counter in non-termination meter

In rte_flow, if a counter action is before a meter which has
non-termination policy, the counter value only includes packets not
being dropped.

This patch fixes this issue by differentiating the order of counter and
non-termination meter:
1. counter + meter, counts all packets hitting this flow.
2. meter + counter, only counts packets not being dropped.

Fixes: 51ec04dc7bcf ("net/mlx5: connect meter policy to created flows")
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