net/vdev_netvsc: disable auto-detection by default
RFC 1/1 net/vdev_netvsc: disable auto-detection by default
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.
--- 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(-)
config/rte_config.h +3 -0
@@ -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_ */
doc/guides/nics/vdev_netvsc.rst +6 -5
@@ -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.
doc/guides/rel_notes/release_26_03.rst +8 -0
@@ -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 -------------
drivers/net/vdev_netvsc/vdev_netvsc.c +18 -2
@@ -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_AUTOVDEV_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 */
Signature · 1 line
2.51.0
Quoted 11 lines · Stephen Hemminger
The
vdev_netvscdriver auto-injects itself on Hyper-V via anRTE_INITconstructor. 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 <[email protected]>
The failure in GHA can be avoided with a simpler:
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
Signature · 1 line
David Marchand
Quoted 9 lines · David Marchand
Quoted 6 lines · Stephen Hemminger
The
vdev_netvscdriver auto-injects itself on Hyper-V via anRTE_INITconstructor. This interferes with tests on github actions which uses Azure where the driver probes in forked subprocesses and crashes on uninitialized interrupt instances.
Quoted 8 lines
Quoted 5 lines
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 <[email protected]>The failure in GHA can be avoided with a simpler:
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
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 -1VMBUS_BUS: rte_vmbus_map_device(): Not managed by UIO driver, skippedVDEV_BUS: vdev_probe_all_drivers(): Search driver to probe device net_ring0VDEV_BUS: vdev_probe_all_drivers(): Search driver to probe device net_vdev_netvscDPAA2_BUS: fslmc_vfio_close_group: Get fd by name((null)) failed(-19)DPAA2_BUS: Unable to close devices -19DPAA_BUS: dpaa_bus_cleanup(): >>DPAA_BUS: Portal already cleanedDPAA_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>>
Signature · 1 line
David Marchand
Quoted 31 lines · On Tue, 24 Feb 2026 08:58:45 +0100 David Marchand <[email protected]>…
Quoted 9 lines · David Marchand
Quoted 6 lines · Stephen Hemminger
The
vdev_netvscdriver auto-injects itself on Hyper-V via anRTE_INITconstructor. This interferes with tests on github actions which uses Azure where the driver probes in forked subprocesses and crashes on uninitialized interrupt instances.Quoted 8 lines
Quoted 5 lines
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 <[email protected]>The failure in GHA can be avoided with a simpler:
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/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 -1VMBUS_BUS:rte_vmbus_map_device(): Not managed by UIO driver, skippedVDEV_BUS:vdev_probe_all_drivers(): Search driver to probe devicenet_ring0VDEV_BUS:vdev_probe_all_drivers(): Search driver to probe devicenet_vdev_netvscDPAA2_BUS:fslmc_vfio_close_group: Get fd by name((null)) failed(-19)DPAA2_BUS: Unable to close devices -19DPAA_BUS:dpaa_bus_cleanup(): >>
Quoted 8 lines
DPAA_BUS: Portal already cleanedDPAA_BUS:dpaa_bus_cleanup(): Bus cleanup done
Calling recursive action fortest_invalid_vdev_flag
Returned from recursive action fortest_invalid_vdev_flagwith 0 Cleaning up/home/runner/work/dpdk/dpdk/build/app/dpdk-testrecursive instance/home/runner/work/dpdk/dpdk/build/app/dpdk-testrecursive 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?
Quoted 44 lines · Stephen Hemminger
Quoted 31 lines · On Tue, 24 Feb 2026 08:58:45 +0100 David Marchand <[email protected]>…
Quoted 9 lines · David Marchand
Quoted 6 lines · Stephen Hemminger
The
vdev_netvscdriver auto-injects itself on Hyper-V via anRTE_INITconstructor. This interferes with tests on github actions which uses Azure where the driver probes in forked subprocesses and crashes on uninitialized interrupt instances.Quoted 8 lines
Quoted 5 lines
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 <[email protected]>The failure in GHA can be avoided with a simpler:
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/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 -1VMBUS_BUS:rte_vmbus_map_device(): Not managed by UIO driver, skippedVDEV_BUS:vdev_probe_all_drivers(): Search driver to probe devicenet_ring0VDEV_BUS:vdev_probe_all_drivers(): Search driver to probe devicenet_vdev_netvscDPAA2_BUS:fslmc_vfio_close_group: Get fd by name((null)) failed(-19)DPAA2_BUS: Unable to close devices -19DPAA_BUS:dpaa_bus_cleanup(): >>Quoted 8 lines
DPAA_BUS: Portal already cleanedDPAA_BUS:dpaa_bus_cleanup(): Bus cleanup done
Calling recursive action fortest_invalid_vdev_flag
Returned from recursive action fortest_invalid_vdev_flagwith 0 Cleaning up/home/runner/work/dpdk/dpdk/build/app/dpdk-testrecursive instance/home/runner/work/dpdk/dpdk/build/app/dpdk-testrecursive instance returning 0 Test OK
RTE>>
Quoted 4 lines
The
DPAA_BUSlooks 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.
Signature · 1 line
David Marchand