patch 'net/mlx5: fix condition of LACP miss flow' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Sat Apr 13 14:48:52 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/15/24. 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=23.11-staging

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From a5d0545e5d9d61716e1c22598db5ecf7f1bc0d3f Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz at nvidia.com>
Date: Wed, 21 Feb 2024 08:49:48 +0200
Subject: [PATCH] net/mlx5: fix condition of LACP miss flow
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 87e4384d2662f520bfae28ae14dbff2429c6923d ]

The LACP traffic is only related to the bond interface. The default
miss flow to redirect the LACP traffic with ethertype 0x8809 to the
kernel driver should only be created on the bond device.

This commit will:
  1. remove the incorrect assertion of the port role.
  2. skip the resource allocation and flow rule creation on the
     representor port.

Fixes: 0f0ae73a3287 ("net/mlx5: add parameter for LACP packets control")
Fixes: 49dffadf4b0c ("net/mlx5: fix LACP redirection in Rx domain")

Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Suanming Mou <suanmingm at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 +--
 drivers/net/mlx5/mlx5_trigger.c | 8 ++++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 25fef8c086..c748e48e31 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -8529,7 +8529,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
 		}
 	}
 	/* Create LACP default miss table. */
-	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0) {
+	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master) {
 		lacp_rx_items_tmpl = flow_hw_create_lacp_rx_pattern_template(dev, error);
 		if (!lacp_rx_items_tmpl) {
 			DRV_LOG(ERR, "port %u failed to create pattern template"
@@ -12222,7 +12222,6 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev)
 		.type = MLX5_HW_CTRL_FLOW_TYPE_LACP_RX,
 	};
 
-	MLX5_ASSERT(priv->master);
 	if (!priv->dr_ctx || !priv->hw_lacp_rx_tbl)
 		return 0;
 	return flow_hw_create_ctrl_flow(dev, dev, priv->hw_lacp_rx_tbl, eth_lacp, 0,
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 5ac25d7e2d..f8d67282ce 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1524,7 +1524,7 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
 	}
 	if (priv->isolated)
 		return 0;
-	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0)
+	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master)
 		if (mlx5_flow_hw_lacp_rx_flow(dev))
 			goto error;
 	if (dev->data->promiscuous)
@@ -1632,14 +1632,14 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
 		DRV_LOG(INFO, "port %u FDB default rule is disabled",
 			dev->data->port_id);
 	}
-	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0) {
+	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master) {
 		ret = mlx5_flow_lacp_miss(dev);
 		if (ret)
 			DRV_LOG(INFO, "port %u LACP rule cannot be created - "
 				"forward LACP to kernel.", dev->data->port_id);
 		else
-			DRV_LOG(INFO, "LACP traffic will be missed in port %u."
-				, dev->data->port_id);
+			DRV_LOG(INFO, "LACP traffic will be missed in port %u.",
+				dev->data->port_id);
 	}
 	if (priv->isolated)
 		return 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-13 20:43:06.641871884 +0800
+++ 0052-net-mlx5-fix-condition-of-LACP-miss-flow.patch	2024-04-13 20:43:04.977753958 +0800
@@ -1 +1 @@
-From 87e4384d2662f520bfae28ae14dbff2429c6923d Mon Sep 17 00:00:00 2001
+From a5d0545e5d9d61716e1c22598db5ecf7f1bc0d3f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 87e4384d2662f520bfae28ae14dbff2429c6923d ]
@@ -17 +19,0 @@
-Cc: stable at dpdk.org
@@ -27 +29 @@
-index 91d1c59fbd..e7f1b5f551 100644
+index 25fef8c086..c748e48e31 100644
@@ -30 +32 @@
-@@ -8934,7 +8934,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
+@@ -8529,7 +8529,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
@@ -39 +41 @@
-@@ -12761,7 +12761,6 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev)
+@@ -12222,7 +12222,6 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev)


More information about the stable mailing list