* [RFC] net/vdev_netvsc: disable auto-detection by default
@ 2026-02-24 1:42 Stephen Hemminger
2026-02-24 7:41 ` David Marchand
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2026-02-24 1:42 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson, Matan Azrad
The vdev_netvsc driver auto-injects itself on Hyper-V via an
RTE_INIT constructor. This interferes with tests on github actions
which uses Azure where the driver probes in forked subprocesses
and crashes on uninitialized interrupt instances.
Guard the auto-detection behind RTE_LIBRTE_VDEV_NETVSC_AUTO
(disabled by default). The driver must now be explicitly
requested with --vdev=net_vdev_netvsc.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
config/rte_config.h | 3 +++
doc/guides/nics/vdev_netvsc.rst | 11 ++++++-----
doc/guides/rel_notes/release_26_03.rst | 8 ++++++++
drivers/net/vdev_netvsc/vdev_netvsc.c | 20 ++++++++++++++++++--
4 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/config/rte_config.h b/config/rte_config.h
index a2609fa403..e1977081e6 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -153,4 +153,7 @@
/* DLB2 defines */
// RTE_LIBRTE_PMD_DLB2_QUELL_STATS is not set
+/* vdev_netvsc defines */
+// RTE_LIBRTE_VDEV_NETVSC_AUTO is not set
+
#endif /* _RTE_CONFIG_H_ */
diff --git a/doc/guides/nics/vdev_netvsc.rst b/doc/guides/nics/vdev_netvsc.rst
index 8dd5981947..4a3049ef42 100644
--- a/doc/guides/nics/vdev_netvsc.rst
+++ b/doc/guides/nics/vdev_netvsc.rst
@@ -65,8 +65,9 @@ a new NetVSC driver will be integrated.
Runtime Configuration
---------------------
-This driver is invoked automatically in Hyper-V VM systems unless the user
-invoked it by command line using ``--vdev=net_vdev_netvsc`` EAL option.
+This driver can be invoked automatically if ``RTE_LIBRTE_VDEV_NETVSC_AUTO``
+is defined in the build configuration. Otherwise, it must be enabled
+using the ``--vdev=net_vdev_netvsc`` EAL command line option.
The following device parameters are supported:
@@ -87,12 +88,12 @@ The following device parameters are supported:
- ``ignore`` [int]
- If nonzero, ignores the driver running (actually used to disable the
- auto-detection in Hyper-V VM).
+ If auto-detection is enabled in the build, this parameter disables the
+ auto-detection of network interfaces.
.. note::
Not specifying either ``iface`` or ``mac`` makes this driver attach itself to
all unrouted NetVSC interfaces found on the system.
Specifying the device makes this driver attach itself to the device
- regardless the device routes.
+ regardless of the device routes.
diff --git a/doc/guides/rel_notes/release_26_03.rst b/doc/guides/rel_notes/release_26_03.rst
index b4499ec066..43d5b89695 100644
--- a/doc/guides/rel_notes/release_26_03.rst
+++ b/doc/guides/rel_notes/release_26_03.rst
@@ -106,6 +106,14 @@ New Features
Added handling of the key combination Control+L
to clear the screen before redisplaying the prompt.
+* **Updated Microsoft vdev_netvsc driver.**
+
+ * Disabled automatic detection on Hyper-V/Azure by default.
+ The driver must now be explicitly requested with ``--vdev=net_vdev_netvsc``.
+ The previous auto-detection behavior can be restored by building with
+ ``RTE_LIBRTE_VDEV_NETVSC_AUTO`` defined.
+
+
Removed Items
-------------
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index f4a84783ce..a0d9d2aea9 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -42,7 +42,9 @@
#define VDEV_NETVSC_ARG_IFACE "iface"
#define VDEV_NETVSC_ARG_MAC "mac"
#define VDEV_NETVSC_ARG_FORCE "force"
+#ifdef RTE_LIBRTE_VDEV_NETVSC_AUTO
#define VDEV_NETVSC_ARG_IGNORE "ignore"
+#endif
#define VDEV_NETVSC_PROBE_MS 1000
#define NETVSC_CLASS_ID "{f8615163-df3e-46c5-913f-f2d2f965ed0e}"
@@ -653,7 +655,9 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
VDEV_NETVSC_ARG_IFACE,
VDEV_NETVSC_ARG_MAC,
VDEV_NETVSC_ARG_FORCE,
+#ifdef RTE_LIBRTE_VDEV_NETVSC_AUTO
VDEV_NETVSC_ARG_IGNORE,
+#endif
NULL,
};
const char *name = rte_vdev_device_name(dev);
@@ -663,7 +667,9 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
unsigned int specified = 0;
unsigned int matched = 0;
int force = 0;
+#ifdef RTE_LIBRTE_VDEV_NETVSC_AUTO
int ignore = 0;
+#endif
unsigned int i;
int ret;
@@ -678,14 +684,18 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
if (!strcmp(pair->key, VDEV_NETVSC_ARG_FORCE))
force = !!atoi(pair->value);
+#ifdef RTE_LIBRTE_VDEV_NETVSC_AUTO
else if (!strcmp(pair->key, VDEV_NETVSC_ARG_IGNORE))
ignore = !!atoi(pair->value);
+#endif
else if (!strcmp(pair->key, VDEV_NETVSC_ARG_IFACE) ||
!strcmp(pair->key, VDEV_NETVSC_ARG_MAC))
++specified;
}
+#ifdef RTE_LIBRTE_VDEV_NETVSC_AUTO
if (ignore)
goto ignore;
+#endif
if (specified > 1) {
DRV_LOG(ERR, "More than one way used to specify the netvsc"
" device.");
@@ -713,7 +723,9 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
}
error:
++vdev_netvsc_ctx_inst;
+#ifdef RTE_LIBRTE_VDEV_NETVSC_AUTO
ignore:
+#endif
rte_kvargs_free(kvargs);
/* Reset alarm if there are device context created */
if (vdev_netvsc_ctx_count) {
@@ -765,9 +777,12 @@ RTE_PMD_REGISTER_ALIAS(VDEV_NETVSC_DRIVER, eth_vdev_netvsc);
RTE_PMD_REGISTER_PARAM_STRING(net_vdev_netvsc,
VDEV_NETVSC_ARG_IFACE "=<string> "
VDEV_NETVSC_ARG_MAC "=<string> "
- VDEV_NETVSC_ARG_FORCE "=<int> "
- VDEV_NETVSC_ARG_IGNORE "=<int>");
+#ifdef RTE_LIBRTE_VDEV_NETVSC_AUTO
+ VDEV_NETVSC_ARG_IGNORE "=<int> ");
+#endif
+ VDEV_NETVSC_ARG_FORCE "=<int>");
+#ifdef RTE_LIBRTE_VDEV_NETVSC_AUTO
/** Compare function for vdev find device operation. */
static int
vdev_netvsc_cmp_rte_device(const struct rte_device *dev1,
@@ -808,3 +823,4 @@ RTE_INIT(vdev_netvsc_custom_scan_add)
if (rte_hypervisor_get() == RTE_HYPERVISOR_HYPERV)
rte_vdev_add_custom_scan(vdev_netvsc_scan_callback, NULL);
}
+#endif /* RTE_LIBRTE_VDEV_NETVSC_AUTO */
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC] net/vdev_netvsc: disable auto-detection by default
2026-02-24 1:42 [RFC] net/vdev_netvsc: disable auto-detection by default Stephen Hemminger
@ 2026-02-24 7:41 ` David Marchand
2026-02-24 7:58 ` David Marchand
0 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2026-02-24 7:41 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev, Bruce Richardson, Matan Azrad
On Tue, 24 Feb 2026 at 02:43, Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> The vdev_netvsc driver auto-injects itself on Hyper-V via an
> RTE_INIT constructor. This interferes with tests on github actions
> which uses Azure where the driver probes in forked subprocesses
> and crashes on uninitialized interrupt instances.
>
> Guard the auto-detection behind RTE_LIBRTE_VDEV_NETVSC_AUTO
> (disabled by default). The driver must now be explicitly
> requested with --vdev=net_vdev_netvsc.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
The failure in GHA can be avoided with a simpler:
https://patchwork.dpdk.org/project/dpdk/patch/20260223155603.3651641-1-david.marchand@redhat.com/
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] net/vdev_netvsc: disable auto-detection by default
2026-02-24 7:41 ` David Marchand
@ 2026-02-24 7:58 ` David Marchand
2026-02-24 14:41 ` Stephen Hemminger
0 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2026-02-24 7:58 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev, Bruce Richardson, Matan Azrad
On Tue, 24 Feb 2026 at 08:41, David Marchand <david.marchand@redhat.com> wrote:
>
> On Tue, 24 Feb 2026 at 02:43, Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> >
> > The vdev_netvsc driver auto-injects itself on Hyper-V via an
> > RTE_INIT constructor. This interferes with tests on github actions
> > which uses Azure where the driver probes in forked subprocesses
> > and crashes on uninitialized interrupt instances.
> >
> > Guard the auto-detection behind RTE_LIBRTE_VDEV_NETVSC_AUTO
> > (disabled by default). The driver must now be explicitly
> > requested with --vdev=net_vdev_netvsc.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
> The failure in GHA can be avoided with a simpler:
> https://patchwork.dpdk.org/project/dpdk/patch/20260223155603.3651641-1-david.marchand@redhat.com/
After rerunning with debug, the vdev netvsc is still probed, but is
not at fault for the recent failures we saw.
VMBUS_BUS: vmbus_probe_one_driver(): VMBUS device
7c1e52d8-3f86-7c1e-52d8-3f867c1e52d8 on NUMA socket -1
VMBUS_BUS: rte_vmbus_map_device(): Not managed by UIO driver, skipped
VDEV_BUS: vdev_probe_all_drivers(): Search driver to probe device net_ring0
VDEV_BUS: vdev_probe_all_drivers(): Search driver to probe device
net_vdev_netvsc
DPAA2_BUS: fslmc_vfio_close_group: Get fd by name((null)) failed(-19)
DPAA2_BUS: Unable to close devices -19
DPAA_BUS: dpaa_bus_cleanup(): >>
DPAA_BUS: Portal already cleaned
DPAA_BUS: dpaa_bus_cleanup(): Bus cleanup done
Calling recursive action for test_invalid_vdev_flag
Returned from recursive action for test_invalid_vdev_flag with 0
Cleaning up /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance
/home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance returning 0
Test OK
RTE>>
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] net/vdev_netvsc: disable auto-detection by default
2026-02-24 7:58 ` David Marchand
@ 2026-02-24 14:41 ` Stephen Hemminger
2026-02-24 14:44 ` David Marchand
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2026-02-24 14:41 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Bruce Richardson, Matan Azrad
On Tue, 24 Feb 2026 08:58:45 +0100
David Marchand <david.marchand@redhat.com> wrote:
> On Tue, 24 Feb 2026 at 08:41, David Marchand <david.marchand@redhat.com> wrote:
> >
> > On Tue, 24 Feb 2026 at 02:43, Stephen Hemminger
> > <stephen@networkplumber.org> wrote:
> > >
> > > The vdev_netvsc driver auto-injects itself on Hyper-V via an
> > > RTE_INIT constructor. This interferes with tests on github actions
> > > which uses Azure where the driver probes in forked subprocesses
> > > and crashes on uninitialized interrupt instances.
> > >
> > > Guard the auto-detection behind RTE_LIBRTE_VDEV_NETVSC_AUTO
> > > (disabled by default). The driver must now be explicitly
> > > requested with --vdev=net_vdev_netvsc.
> > >
> > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >
> > The failure in GHA can be avoided with a simpler:
> > https://patchwork.dpdk.org/project/dpdk/patch/20260223155603.3651641-1-david.marchand@redhat.com/
>
> After rerunning with debug, the vdev netvsc is still probed, but is
> not at fault for the recent failures we saw.
>
> VMBUS_BUS: vmbus_probe_one_driver(): VMBUS device
> 7c1e52d8-3f86-7c1e-52d8-3f867c1e52d8 on NUMA socket -1
> VMBUS_BUS: rte_vmbus_map_device(): Not managed by UIO driver, skipped
> VDEV_BUS: vdev_probe_all_drivers(): Search driver to probe device net_ring0
> VDEV_BUS: vdev_probe_all_drivers(): Search driver to probe device
> net_vdev_netvsc
> DPAA2_BUS: fslmc_vfio_close_group: Get fd by name((null)) failed(-19)
> DPAA2_BUS: Unable to close devices -19
> DPAA_BUS: dpaa_bus_cleanup(): >>
> DPAA_BUS: Portal already cleaned
> DPAA_BUS: dpaa_bus_cleanup(): Bus cleanup done
> Calling recursive action for test_invalid_vdev_flag
> Returned from recursive action for test_invalid_vdev_flag with 0
> Cleaning up /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance
> /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance returning 0
> Test OK
> RTE>>
The DPAA_BUS looks like noise.
And also VMBUS.
Maybe we need a --no-bus flag that shuts off all buses?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] net/vdev_netvsc: disable auto-detection by default
2026-02-24 14:41 ` Stephen Hemminger
@ 2026-02-24 14:44 ` David Marchand
0 siblings, 0 replies; 5+ messages in thread
From: David Marchand @ 2026-02-24 14:44 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev, Bruce Richardson, Matan Azrad
On Tue, 24 Feb 2026 at 15:41, Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> On Tue, 24 Feb 2026 08:58:45 +0100
> David Marchand <david.marchand@redhat.com> wrote:
>
> > On Tue, 24 Feb 2026 at 08:41, David Marchand <david.marchand@redhat.com> wrote:
> > >
> > > On Tue, 24 Feb 2026 at 02:43, Stephen Hemminger
> > > <stephen@networkplumber.org> wrote:
> > > >
> > > > The vdev_netvsc driver auto-injects itself on Hyper-V via an
> > > > RTE_INIT constructor. This interferes with tests on github actions
> > > > which uses Azure where the driver probes in forked subprocesses
> > > > and crashes on uninitialized interrupt instances.
> > > >
> > > > Guard the auto-detection behind RTE_LIBRTE_VDEV_NETVSC_AUTO
> > > > (disabled by default). The driver must now be explicitly
> > > > requested with --vdev=net_vdev_netvsc.
> > > >
> > > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > >
> > > The failure in GHA can be avoided with a simpler:
> > > https://patchwork.dpdk.org/project/dpdk/patch/20260223155603.3651641-1-david.marchand@redhat.com/
> >
> > After rerunning with debug, the vdev netvsc is still probed, but is
> > not at fault for the recent failures we saw.
> >
> > VMBUS_BUS: vmbus_probe_one_driver(): VMBUS device
> > 7c1e52d8-3f86-7c1e-52d8-3f867c1e52d8 on NUMA socket -1
> > VMBUS_BUS: rte_vmbus_map_device(): Not managed by UIO driver, skipped
> > VDEV_BUS: vdev_probe_all_drivers(): Search driver to probe device net_ring0
> > VDEV_BUS: vdev_probe_all_drivers(): Search driver to probe device
> > net_vdev_netvsc
> > DPAA2_BUS: fslmc_vfio_close_group: Get fd by name((null)) failed(-19)
> > DPAA2_BUS: Unable to close devices -19
> > DPAA_BUS: dpaa_bus_cleanup(): >>
> > DPAA_BUS: Portal already cleaned
> > DPAA_BUS: dpaa_bus_cleanup(): Bus cleanup done
> > Calling recursive action for test_invalid_vdev_flag
> > Returned from recursive action for test_invalid_vdev_flag with 0
> > Cleaning up /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance
> > /home/runner/work/dpdk/dpdk/build/app/dpdk-test recursive instance returning 0
> > Test OK
> > RTE>>
>
> The DPAA_BUS looks like noise.
> And also VMBUS.
>
> Maybe we need a --no-bus flag that shuts off all buses?
I have this patch in store :-) since I also need this for OVS, I'll
send it soon.
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-24 14:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 1:42 [RFC] net/vdev_netvsc: disable auto-detection by default Stephen Hemminger
2026-02-24 7:41 ` David Marchand
2026-02-24 7:58 ` David Marchand
2026-02-24 14:41 ` Stephen Hemminger
2026-02-24 14:44 ` David Marchand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox