patch 'net/netvsc: retry full probe when IB device not ready' has been queued to stable release 24.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Jun 11 15:19:39 CEST 2026


Hi,

FYI, your patch has been queued to stable release 24.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 06/13/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/bbc637bce3fd0cbb9adb27bcdde226ae6663a448

Thanks.

Luca Boccassi

---
>From bbc637bce3fd0cbb9adb27bcdde226ae6663a448 Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Fri, 15 May 2026 12:28:37 -0700
Subject: [PATCH] net/netvsc: retry full probe when IB device not ready

[ upstream commit ea38951f92e4f5d3c7d097a3477370116b2da233 ]

When rte_eal_hotplug_add returns -ENODEV during VF hot-add, it means the
MANA IB/verbs device is not yet registered by the mana_ib kernel module.
This happens because the mana_ib auxiliary driver probes asynchronously
after the MANA net driver creates the network interface.

On Azure VMs, the gap between netdev registration and IB device
registration can be several seconds. Previously, netvsc would log the
error and give up after finding the matching MAC address.

Now, on -ENODEV, restart the full retry loop from the PCI device
existence check. This re-scans the net directory to pick up any
interface renames (e.g. eth1 -> ens1) and retries until the IB device
is ready.

The -EEXIST return (device already probed by another netvsc port on the
same PCI device) is handled silently, as hn_vf_add will find the
already-probed VF port.

Fixes: a2a23a794b3a ("net/netvsc: support VF device hot add/remove")

Signed-off-by: Long Li <longli at microsoft.com>
---
 drivers/net/netvsc/hn_ethdev.c | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 223ad92ad8..efa83726e4 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -686,15 +686,34 @@ static void netvsc_hotplug_retry(void *args)
 			ret = rte_eal_hotplug_add(d->bus->name, d->name,
 						  hv->vf_devargs ?
 						  hv->vf_devargs : "");
-			if (ret) {
-				PMD_DRV_LOG(ERR,
-					    "Failed to add PCI device %s",
+			if (ret == -ENODEV) {
+				/* IB device not ready yet (mana_ib not probed).
+				 * Restart the full retry from the PCI device
+				 * check so we re-verify the device exists and
+				 * get fresh interface names after any renames.
+				 * This retries indefinitely — the PCI sysfs
+				 * check at the top of this function ensures
+				 * we stop if the device disappears.
+				 */
+				PMD_DRV_LOG(NOTICE,
+					    "IB device not ready for %s, "
+					    "restarting probe in 1 second",
 					    d->name);
+				closedir(di);
+				rte_eal_alarm_set(NETVSC_HOTADD_RETRY_INTERVAL,
+						  netvsc_hotplug_retry,
+						  hot_ctx);
+				return;
 			}
 
+			if (ret && ret != -EEXIST)
+				PMD_DRV_LOG(ERR,
+					    "Failed to add PCI device %s (ret=%d)",
+					    d->name, ret);
+
 			ret = hn_vf_add(dev, hv);
 			if (ret)
-				PMD_DRV_LOG(ERR, "Failed to add VF in hotplug retry: %d", ret);
+				PMD_DRV_LOG(ERR, "Failed to add VF: %d", ret);
 			break;
 		}
 	}
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-06-11 14:20:02.542149234 +0100
+++ 0030-net-netvsc-retry-full-probe-when-IB-device-not-ready.patch	2026-06-11 14:20:01.198745593 +0100
@@ -1 +1 @@
-From ea38951f92e4f5d3c7d097a3477370116b2da233 Mon Sep 17 00:00:00 2001
+From bbc637bce3fd0cbb9adb27bcdde226ae6663a448 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ea38951f92e4f5d3c7d097a3477370116b2da233 ]
+
@@ -25 +26,0 @@
-Cc: stable at dpdk.org
@@ -29,2 +30,2 @@
- drivers/net/netvsc/hn_ethdev.c | 33 ++++++++++++++++++++++++++-------
- 1 file changed, 26 insertions(+), 7 deletions(-)
+ drivers/net/netvsc/hn_ethdev.c | 27 +++++++++++++++++++++++----
+ 1 file changed, 23 insertions(+), 4 deletions(-)
@@ -33 +34 @@
-index 096489d66d..9e4fc33949 100644
+index 223ad92ad8..efa83726e4 100644
@@ -36,4 +37,4 @@
-@@ -717,17 +717,36 @@ static void netvsc_hotplug_retry(void *args)
- 			 * parent device, restore its args.
- 			 */
- 			ret = rte_eal_hotplug_add(d->bus->name, d->name, drv_str ? drv_str : "");
+@@ -686,15 +686,34 @@ static void netvsc_hotplug_retry(void *args)
+ 			ret = rte_eal_hotplug_add(d->bus->name, d->name,
+ 						  hv->vf_devargs ?
+ 						  hv->vf_devargs : "");
@@ -43,5 +43,0 @@
--					    d->name);
--			}
--
- 			free(drv_str);
- 
@@ -60 +56 @@
-+					    d->name);
+ 					    d->name);
@@ -66,2 +62,2 @@
-+			}
-+
+ 			}
+ 


More information about the stable mailing list