net/mlx5: fix incorrect meter table define
PATCH 1/1 net/mlx5: fix incorrect meter table define
As metering and metadata features were developed at the same time. The metering and metadata tables are defined conflicted.
This cauese the meter suffix flow jump to the same metadata table and cause flow deadloop.
Adjust the metering table define to fix that issue.
--- drivers/net/mlx5/mlx5.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5.h +2 -2
@@ -503,14 +503,14 @@ struct mlx5_flow_tbl_resource { };#define MLX5_MAX_TABLES UINT16_MAX -#define MLX5_FLOW_TABLE_LEVEL_METER (UINT16_MAX - 3) -#define MLX5_FLOW_TABLE_LEVEL_SUFFIX (UINT16_MAX - 2)#define MLX5_HAIRPIN_TX_TABLE (UINT16_MAX - 1)/* Reserve the last two tables for metadata register copy. */ #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_MAX_TABLES_FDB UINT16_MAX/* ID generation structure. */
Signature · 1 line
1.8.3.1
Hi,
Quoted 48 lines
-----Original Message-----
From: Suanming Mou <[email protected]>
Sent: Wednesday, September 30, 2020 9:47 AM
To: Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Cc: Raslan Darawsheh <[email protected]>; [email protected]; [email protected]
Subject: [PATCH] net/mlx5: fix incorrect meter table defineAs metering and metadata features were developed at the same time. The metering and metadata tables are defined conflicted.
This cauese the meter suffix flow jump to the same metadata table and cause flow deadloop.
Adjust the metering table define to fix that issue.
Fixes 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables")Signed-off-by Suanming Mou <[email protected]>--- drivers/net/mlx5/mlx5.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/mlx5/mlx5.h +2
-3@@ -503,14 +503,14 @@ struct mlx5_flow_tbl_resource { };#define MLX5_MAX_TABLES UINT16_MAX -#define MLX5_FLOW_TABLE_LEVEL_METER (UINT16_MAX - 3) -#define MLX5_FLOW_TABLE_LEVEL_SUFFIX (UINT16_MAX - 2)#define MLX5_HAIRPIN_TX_TABLE (UINT16_MAX - 1)/* Reserve the last two tables for metadata register copy. */ #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_MAX_TABLES_FDB UINT16_MAX/* ID generation structure. */ --
Quoted 1 line
1.8.3.1
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh