diff mbox series

net/mlx5: fix meter packet missing

Message ID 1604392108-8337-1-git-send-email-xuemingl@nvidia.com (mailing list archive)
State New, archived
Delegated to: Raslan Darawsheh
Headers show
Series net/mlx5: fix meter packet missing | expand

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing fail Testing issues
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch warning coding style issues

Commit Message

Xueming Li Nov. 3, 2020, 8:28 a.m. UTC
For transfer flow with meter, packet was passed without applying flow
action. The group level was multipled by 10 for group level 65531.

This patch fixes this issue by correcting suffix table group level
calculation.

Fixes: 3e8f3e51fd93 ("net/mlx5: fix meter table definitions")
Cc: suanmingm@nvidia.com
Cc: stable@dpdk.org

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
---
 drivers/net/mlx5/mlx5.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Matan Azrad Nov. 10, 2020, 8:50 a.m. UTC | #1
From: Xueming Li
> For transfer flow with meter, packet was passed without applying flow action.
> The group level was multipled by 10 for group level 65531.
> 
> This patch fixes this issue by correcting suffix table group level calculation.
> 
> Fixes: 3e8f3e51fd93 ("net/mlx5: fix meter table definitions")
> Cc: suanmingm@nvidia.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
diff mbox series

Patch

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 63d263384b..a28f30a5ab 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -610,9 +610,9 @@  struct mlx5_flow_tbl_resource {
 #define MLX5_FLOW_MREG_ACT_TABLE_GROUP (MLX5_MAX_TABLES - 1)
 #define MLX5_FLOW_MREG_CP_TABLE_GROUP (MLX5_MAX_TABLES - 2)
 /* Tables for metering splits should be added here. */
-#define MLX5_MAX_TABLES_EXTERNAL (MLX5_MAX_TABLES - 3)
-#define MLX5_FLOW_TABLE_LEVEL_METER (MLX5_MAX_TABLES - 4)
 #define MLX5_FLOW_TABLE_LEVEL_SUFFIX (MLX5_MAX_TABLES - 3)
+#define MLX5_FLOW_TABLE_LEVEL_METER (MLX5_MAX_TABLES - 4)
+#define MLX5_MAX_TABLES_EXTERNAL MLX5_FLOW_TABLE_LEVEL_METER
 #define MLX5_MAX_TABLES_FDB UINT16_MAX
 #define MLX5_FLOW_TABLE_FACTOR 10