Skip to contentSkip to conversation

net/mlx5e: Correctly use the namespace type when allocating pedit action

PATCH In review [email protected] 4 participants 5 messages Feb 27, 2019 – Mar 14, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5e: Correctly use the namespace type when allocating pedit action

From: Tonghao Zhang <[email protected]>

The capacity of FDB offloading and NIC offloading table are different, and when allocating the pedit actions, we should use the correct namespace type.

Fixes c500c86b0c75d ("net/mlx5e: support for two independent packet edit actions")
Cc Pablo Neira Ayuso <[email protected]>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +1 -1
index 3a02b22..467ef9e 100644
@@ -2635,7 +2635,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
 
 	if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits ||
 	    hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) {
-		err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_KERNEL,
+		err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_FDB,
 					    parse_attr, hdrs, extack);
 		if (err)
 			return err;
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · On 26/02/2019 14:28, [email protected] wrote:

From: Tonghao Zhang <[email protected]>

The capacity of FDB offloading and NIC offloading table are different, and when allocating the pedit actions, we should use the correct namespace type.

Fixes c500c86b0c75d ("net/mlx5e: support for two independent packet edit actions")
Cc Pablo Neira Ayuso <[email protected]>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +0 -0
index 3a02b22..467ef9e 100644

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c static int parse_tc_fdb_actions(struct mlx5e_priv *priv, · line 2641

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +1 -1
@@ -2635,7 +2635,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
 
 	if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits ||
 	    hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) {
-		err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_KERNEL,
+		err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_FDB,
 					    parse_attr, hdrs, extack);
 		if (err)
 			return err;
#2 lore raw
Quoted 22 lines · Roi Dayan
Quoted 19 lines · On 26/02/2019 14:28, [email protected] wrote:

From: Tonghao Zhang <[email protected]>

The capacity of FDB offloading and NIC offloading table are different, and when allocating the pedit actions, we should use the correct namespace type.

Fixes c500c86b0c75d ("net/mlx5e: support for two independent packet edit actions")
Cc Pablo Neira Ayuso <[email protected]>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +0 -0
index 3a02b22..467ef9e 100644
@@ -2635,7 +2635,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
 
Quoted 10 lines

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c static int parse_tc_fdb_actions(struct mlx5e_priv *priv, · line 2641

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +1 -1
 	if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits ||
 	    hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) {
-		err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_KERNEL,
+		err = alloc_tc_pedit_action(priv, MLX5_FLOW_NAMESPACE_FDB,
 					    parse_attr, hdrs, extack);
 		if (err)
 			return err;
#3 lore raw
Quoted 38 lines · Pablo Neira Ayuso
Quoted 24 lines · Roi Dayan
Quoted 22 lines · On 26/02/2019 14:28, [email protected] wrote:

From: Tonghao Zhang <[email protected]>

The capacity of FDB offloading and NIC offloading table are different, and when allocating the pedit actions, we should use the correct namespace type.

Fixes c500c86b0c75d ("net/mlx5e: support for two independent

packet edit actions")

Cc Pablo Neira Ayuso <[email protected]>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +0 -0
index 3a02b22..467ef9e 100644
@@ -2635,7 +2635,7 @@ static int parse_tc_fdb_actions(struct
 mlx5e_priv *priv,
 
Quoted 12 lines

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c static int parse_tc_fdb_actions(struct mlx5e_priv *priv, · line 2641

Quoted 10 lines
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +1 -1
 	if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits ||
 	    hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) {
-		err = alloc_tc_pedit_action(priv,
 MLX5_FLOW_NAMESPACE_KERNEL,
+		err = alloc_tc_pedit_action(priv,
 MLX5_FLOW_NAMESPACE_FDB,
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +0 -0
 					    parse_attr, hdrs, extack);
 		if (err)
 			return err;
Quoted 1 line

Dave, can you please apply this directly to net-next ?

Thanks,
Saeed.

#4 lore raw
Quoted 40 lines · Saeed Mahameed
Quoted 38 lines · Pablo Neira Ayuso
Quoted 36 lines · Roi Dayan
Quoted 28 lines · On 26/02/2019 14:28, [email protected] wrote:

From: Tonghao Zhang <[email protected]>

The capacity of FDB offloading and NIC offloading table are different, and when allocating the pedit actions, we should use the correct namespace type.

Fixes c500c86b0c75d ("net/mlx5e: support for two independent

packet edit actions")

Cc Pablo Neira Ayuso <[email protected]>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +1 -1
index 3a02b22..467ef9e 100644
@@ -2635,7 +2635,7 @@ static int parse_tc_fdb_actions(struct
 mlx5e_priv *priv,
 
  if (hdrs[TCA_PEDIT_KEY_EX_CMD_SET].pedits ||
      hdrs[TCA_PEDIT_KEY_EX_CMD_ADD].pedits) {
-         err = alloc_tc_pedit_action(priv,
 MLX5_FLOW_NAMESPACE_KERNEL,
+         err = alloc_tc_pedit_action(priv,
 MLX5_FLOW_NAMESPACE_FDB,
Quoted 4 lines
                                      parse_attr, hdrs, extack);
          if (err)
                  return err;
Quoted 5 lines
Quoted 1 line

Dave, can you please apply this directly to net-next ?

will be applied to net-next, or net ? this patch is a bugfix.

Quoted 2 lines

Thanks,
Saeed.