patch 'net/mlx5: fix error in VLAN actions creation' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Thu Aug 10 01:58:57 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=cd3b1b95407047a472742bf6606c71cbe34015a1

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From cd3b1b95407047a472742bf6606c71cbe34015a1 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz at nvidia.com>
Date: Fri, 30 Jun 2023 14:02:05 +0300
Subject: [PATCH] net/mlx5: fix error in VLAN actions creation
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 90923d80e22a80a2f97a1f11b340b15991a7c86a ]

When a failure occurs during the VLAN actions creating, the value
of "rte_errno" is already set by the mlx5dr_action_create*. The
value can be returned directly to reflect the actual reason.

In the meanwhile, the "rte_flow_error" structure should also be set
with clear message explicitly.

Fixes: 773ca0e91ba1 ("net/mlx5: support VLAN push/pop/modify with HWS")

Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Ori Kam <orika at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 5fe4cfa071..a3fd87b16f 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -6447,27 +6447,28 @@ flow_hw_create_vlan(struct rte_eth_dev *dev)
 		MLX5DR_ACTION_FLAG_HWS_FDB
 	};
 
+	/* rte_errno is set in the mlx5dr_action* functions. */
 	for (i = MLX5DR_TABLE_TYPE_NIC_RX; i <= MLX5DR_TABLE_TYPE_NIC_TX; i++) {
 		priv->hw_pop_vlan[i] =
 			mlx5dr_action_create_pop_vlan(priv->dr_ctx, flags[i]);
 		if (!priv->hw_pop_vlan[i])
-			return -ENOENT;
+			return -rte_errno;
 		priv->hw_push_vlan[i] =
 			mlx5dr_action_create_push_vlan(priv->dr_ctx, flags[i]);
 		if (!priv->hw_pop_vlan[i])
-			return -ENOENT;
+			return -rte_errno;
 	}
 	if (priv->sh->config.dv_esw_en && priv->master) {
 		priv->hw_pop_vlan[MLX5DR_TABLE_TYPE_FDB] =
 			mlx5dr_action_create_pop_vlan
 				(priv->dr_ctx, MLX5DR_ACTION_FLAG_HWS_FDB);
 		if (!priv->hw_pop_vlan[MLX5DR_TABLE_TYPE_FDB])
-			return -ENOENT;
+			return -rte_errno;
 		priv->hw_push_vlan[MLX5DR_TABLE_TYPE_FDB] =
 			mlx5dr_action_create_push_vlan
 				(priv->dr_ctx, MLX5DR_ACTION_FLAG_HWS_FDB);
 		if (!priv->hw_pop_vlan[MLX5DR_TABLE_TYPE_FDB])
-			return -ENOENT;
+			return -rte_errno;
 	}
 	return 0;
 }
@@ -7079,8 +7080,11 @@ flow_hw_configure(struct rte_eth_dev *dev,
 		}
 	}
 	ret = flow_hw_create_vlan(dev);
-	if (ret)
+	if (ret) {
+		rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+				   NULL, "Failed to VLAN actions.");
 		goto err;
+	}
 	if (_queue_attr)
 		mlx5_free(_queue_attr);
 	if (port_attr->flags & RTE_FLOW_PORT_FLAG_STRICT_QUEUE)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.166302900 +0800
+++ 0078-net-mlx5-fix-error-in-VLAN-actions-creation.patch	2023-08-09 21:51:18.234352000 +0800
@@ -1 +1 @@
-From 90923d80e22a80a2f97a1f11b340b15991a7c86a Mon Sep 17 00:00:00 2001
+From cd3b1b95407047a472742bf6606c71cbe34015a1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 90923d80e22a80a2f97a1f11b340b15991a7c86a ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 0c72324617..cbdac2996c 100644
+index 5fe4cfa071..a3fd87b16f 100644
@@ -26 +28 @@
-@@ -7129,27 +7129,28 @@ flow_hw_create_vlan(struct rte_eth_dev *dev)
+@@ -6447,27 +6447,28 @@ flow_hw_create_vlan(struct rte_eth_dev *dev)
@@ -59 +61 @@
-@@ -7921,8 +7922,11 @@ flow_hw_configure(struct rte_eth_dev *dev,
+@@ -7079,8 +7080,11 @@ flow_hw_configure(struct rte_eth_dev *dev,


More information about the stable mailing list