[dpdk-stable] patch 'net/mlx5: fix RoCE LAG bond device probing' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 26 15:52:55 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.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 07/28/21. 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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3fd282e728767285e9e80fddaaff2aba167e5dce

Thanks.

Luca Boccassi

---
>From 3fd282e728767285e9e80fddaaff2aba167e5dce Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Date: Wed, 21 Jul 2021 11:31:40 +0300
Subject: [PATCH] net/mlx5: fix RoCE LAG bond device probing

[ upstream commit 9f430dd75107d47fb9b67ab756503397b59b8955 ]

The RoCE LAG bond device requires neither E-Switch nor SR-IOV
configurations. It means the RoCE LAG bond device might be
presented as a single port Infiniband device.

The mlx5 PMD wrongly recognized standalone RoCE LAG bond device
as E-Switch configuration, this triggered the calls of E-Switch
ports related API and the latter failed (over the new OFED kernel
driver, starting since 5.4.1), causing the overall device probe
failure.

If there is a single port Infiniband bond device found the
E-Switch related flags must be cleared indicating standalone
configuration.

Also, it is not true anymore the bond device can exist
over E-Switch configurations only (as it was claimed for VF LAG
bond devices). The related checks are not relevant anymore
and removed.

Fixes: 790164ce1d2d ("net/mlx5: check kernel support for VF LAG bonding")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 56e2bf64f4..e25d6ffe22 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1889,19 +1889,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 			goto exit;
 		}
 	}
-#ifndef HAVE_MLX5DV_DR_DEVX_PORT
-	if (bd >= 0) {
-		/*
-		 * This may happen if there is VF LAG kernel support and
-		 * application is compiled with older rdma_core library.
-		 */
-		DRV_LOG(ERR,
-			"No kernel/verbs support for VF LAG bonding found.");
-		rte_errno = ENOTSUP;
-		ret = -rte_errno;
-		goto exit;
-	}
-#endif
 	/*
 	 * Now we can determine the maximal
 	 * amount of devices to be spawned.
@@ -1964,10 +1951,18 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 						(list[ns].ifindex,
 						 &list[ns].info);
 			}
-#ifdef HAVE_MLX5DV_DR_DEVX_PORT
 			if (!ret && bd >= 0) {
 				switch (list[ns].info.name_type) {
 				case MLX5_PHYS_PORT_NAME_TYPE_UPLINK:
+					if (np == 1) {
+						/*
+						 * Force standalone bonding
+						 * device for ROCE LAG
+						 * confgiurations.
+						 */
+						list[ns].info.master = 0;
+						list[ns].info.representor = 0;
+					}
 					if (list[ns].info.port_name == bd)
 						ns++;
 					break;
@@ -1982,7 +1977,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 				}
 				continue;
 			}
-#endif
 			if (!ret && (list[ns].info.representor ^
 				     list[ns].info.master))
 				ns++;
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-26 13:53:17.529268106 +0100
+++ 0032-net-mlx5-fix-RoCE-LAG-bond-device-probing.patch	2021-07-26 13:53:15.865292959 +0100
@@ -1 +1 @@
-From 9f430dd75107d47fb9b67ab756503397b59b8955 Mon Sep 17 00:00:00 2001
+From 3fd282e728767285e9e80fddaaff2aba167e5dce Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9f430dd75107d47fb9b67ab756503397b59b8955 ]
+
@@ -26 +27,0 @@
-Cc: stable at dpdk.org
@@ -35 +36 @@
-index 81fbed2872..4712bd6f9b 100644
+index 56e2bf64f4..e25d6ffe22 100644
@@ -38 +39 @@
-@@ -2238,19 +2238,6 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
+@@ -1889,19 +1889,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -58 +59 @@
-@@ -2314,10 +2301,18 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
+@@ -1964,10 +1951,18 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -78 +79 @@
-@@ -2334,7 +2329,6 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
+@@ -1982,7 +1977,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,


More information about the stable mailing list