patch 'net/mlx5: fix bonding check' has been queued to stable release 23.11.7

Shani Peretz shperetz at nvidia.com
Wed Apr 15 11:59:20 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

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/19/26. 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/shanipr/dpdk-stable

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/cca75ab5dfe3942813ade191e9b2bc492d5595b6

Thanks.

Shani

---
>From cca75ab5dfe3942813ade191e9b2bc492d5595b6 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski at nvidia.com>
Date: Wed, 4 Mar 2026 11:57:17 +0100
Subject: [PATCH] net/mlx5: fix bonding check

[ upstream commit f6e478d5557a8d8c1407b35620fd7a32b8211a91 ]

mlx5 networking PMD supports probing ethdev ports based
on LAG configured on Linux kernel level.
In such cases, a single IB device is created in the kernel
and mlx5 PMD configured the device through this IB device.
In order to recognize whether PMD will run over LAG device or not,
mlx5 PMD relied on IB device name.

This patch fixes mlx5 networking PMD logic to rely on
mlx5_os_is_device_bond() introduced in previous commit,
instead of relying solely on IB device name.

Fixes: 2e569a370395 ("net/mlx5: add VF LAG mode bonding device recognition")

Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index f18234c9ee..8831186418 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1856,8 +1856,8 @@ mlx5_dev_spawn_data_cmp(const void *a, const void *b)
 /**
  * Match PCI information for possible slaves of bonding device.
  *
- * @param[in] ibdev_name
- *   Name of Infiniband device.
+ * @param[in] ibdev
+ *   Pointer to IB device.
  * @param[in] pci_dev
  *   Pointer to primary PCI address structure to match.
  * @param[in] nl_rdma
@@ -1872,7 +1872,7 @@ mlx5_dev_spawn_data_cmp(const void *a, const void *b)
  *   positive index of slave PF in bonding.
  */
 static int
-mlx5_device_bond_pci_match(const char *ibdev_name,
+mlx5_device_bond_pci_match(const struct ibv_device *ibdev,
 			   const struct rte_pci_addr *pci_dev,
 			   int nl_rdma, uint16_t owner,
 			   struct mlx5_bond_info *bond_info)
@@ -1893,9 +1893,9 @@ mlx5_device_bond_pci_match(const char *ibdev_name,
 	memset(bond_info, 0, sizeof(*bond_info));
 	if (nl_rdma < 0)
 		return -1;
-	if (!strstr(ibdev_name, "bond"))
+	if (!mlx5_os_is_device_bond(ibdev))
 		return -1;
-	np = mlx5_nl_portnum(nl_rdma, ibdev_name);
+	np = mlx5_nl_portnum(nl_rdma, ibdev->name);
 	if (!np)
 		return -1;
 	if (mlx5_get_device_guid(pci_dev, cur_guid, sizeof(cur_guid)) < 0)
@@ -1907,7 +1907,7 @@ mlx5_device_bond_pci_match(const char *ibdev_name,
 	 */
 	for (i = 1; i <= np; ++i) {
 		/* Check whether Infiniband port is populated. */
-		ifindex = mlx5_nl_ifindex(nl_rdma, ibdev_name, i);
+		ifindex = mlx5_nl_ifindex(nl_rdma, ibdev->name, i);
 		if (!ifindex)
 			continue;
 		if (!if_indextoname(ifindex, ifname))
@@ -2296,7 +2296,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
 		struct rte_pci_addr pci_addr;
 
 		DRV_LOG(DEBUG, "Checking device \"%s\"", ibv_list[ret]->name);
-		bd = mlx5_device_bond_pci_match(ibv_list[ret]->name, &owner_pci,
+		bd = mlx5_device_bond_pci_match(ibv_list[ret], &owner_pci,
 						nl_rdma, owner_id, &bond_info);
 		if (bd >= 0) {
 			/*
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-04-14 14:44:30.825086338 +0300
+++ 0019-net-mlx5-fix-bonding-check.patch	2026-04-14 14:44:28.486511000 +0300
@@ -1 +1 @@
-From f6e478d5557a8d8c1407b35620fd7a32b8211a91 Mon Sep 17 00:00:00 2001
+From cca75ab5dfe3942813ade191e9b2bc492d5595b6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f6e478d5557a8d8c1407b35620fd7a32b8211a91 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index 76edd19c70..405aa9799c 100644
+index f18234c9ee..8831186418 100644
@@ -30 +31 @@
-@@ -1928,8 +1928,8 @@ mlx5_dev_spawn_data_cmp(const void *a, const void *b)
+@@ -1856,8 +1856,8 @@ mlx5_dev_spawn_data_cmp(const void *a, const void *b)
@@ -41 +42 @@
-@@ -1946,7 +1946,7 @@ mlx5_dev_spawn_data_cmp(const void *a, const void *b)
+@@ -1872,7 +1872,7 @@ mlx5_dev_spawn_data_cmp(const void *a, const void *b)
@@ -49,2 +50,2 @@
- 			   struct mlx5_dev_info *dev_info,
-@@ -1968,9 +1968,9 @@ mlx5_device_bond_pci_match(const char *ibdev_name,
+ 			   struct mlx5_bond_info *bond_info)
+@@ -1893,9 +1893,9 @@ mlx5_device_bond_pci_match(const char *ibdev_name,
@@ -57,2 +58,2 @@
--	np = mlx5_nl_portnum(nl_rdma, ibdev_name, dev_info);
-+	np = mlx5_nl_portnum(nl_rdma, ibdev->name, dev_info);
+-	np = mlx5_nl_portnum(nl_rdma, ibdev_name);
++	np = mlx5_nl_portnum(nl_rdma, ibdev->name);
@@ -62 +63 @@
-@@ -1982,7 +1982,7 @@ mlx5_device_bond_pci_match(const char *ibdev_name,
+@@ -1907,7 +1907,7 @@ mlx5_device_bond_pci_match(const char *ibdev_name,
@@ -66,2 +67,2 @@
--		ifindex = mlx5_nl_ifindex(nl_rdma, ibdev_name, i, dev_info);
-+		ifindex = mlx5_nl_ifindex(nl_rdma, ibdev->name, i, dev_info);
+-		ifindex = mlx5_nl_ifindex(nl_rdma, ibdev_name, i);
++		ifindex = mlx5_nl_ifindex(nl_rdma, ibdev->name, i);
@@ -71,3 +72,3 @@
-@@ -2396,7 +2396,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
- 			info = &tmp_info[ret];
- 		}
+@@ -2296,7 +2296,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
+ 		struct rte_pci_addr pci_addr;
+ 
@@ -77,3 +78,3 @@
- 						nl_rdma, owner_id,
- 						info,
- 						&bond_info);
+ 						nl_rdma, owner_id, &bond_info);
+ 		if (bd >= 0) {
+ 			/*


More information about the stable mailing list