patch 'net/mlx5: fix bonding check' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Mar 19 23:02:15 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/21/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/da53a34519080665ad1a7b3b17cd92dbbf725784
Thanks.
Luca Boccassi
---
>From da53a34519080665ad1a7b3b17cd92dbbf725784 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 d0ce4c9a17..3907409fe1 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1914,8 +1914,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
@@ -1930,7 +1930,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)
@@ -1951,9 +1951,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)
@@ -1965,7 +1965,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))
@@ -2354,7 +2354,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.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-19 22:00:48.660765544 +0000
+++ 0023-net-mlx5-fix-bonding-check.patch 2026-03-19 22:00:47.802359368 +0000
@@ -1 +1 @@
-From f6e478d5557a8d8c1407b35620fd7a32b8211a91 Mon Sep 17 00:00:00 2001
+From da53a34519080665ad1a7b3b17cd92dbbf725784 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 d0ce4c9a17..3907409fe1 100644
@@ -30 +31 @@
-@@ -1928,8 +1928,8 @@ mlx5_dev_spawn_data_cmp(const void *a, const void *b)
+@@ -1914,8 +1914,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)
+@@ -1930,7 +1930,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)
+@@ -1951,9 +1951,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,
+@@ -1965,7 +1965,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];
- }
+@@ -2354,7 +2354,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