[dpdk-dev] [PATCH 1/2] eal/windows: Add needed calls to detect vdev PMD
talshn at mellanox.com
talshn at mellanox.com
Wed Jun 24 16:56:20 CEST 2020
From: Tal Shnaiderman <talshn at mellanox.com>
Add needed function calls in rte_eal_init to detect vdev PMD.
eal_option_device_parse()
rte_service_init()
rte_bus_probe()
Signed-off-by: Tal Shnaiderman <talshn at mellanox.com>
---
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/windows/eal.c | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
index dc9b1d2feb..a38b66a2d0 100644
--- a/lib/librte_eal/common/meson.build
+++ b/lib/librte_eal/common/meson.build
@@ -30,6 +30,7 @@ if is_windows
'malloc_heap.c',
'rte_malloc.c',
'eal_common_timer.c',
+ 'rte_service.c',
)
subdir_done()
endif
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index d8cfe5cc4d..8e89560aba 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -270,6 +270,11 @@ rte_eal_init(int argc, char **argv)
if (fctret < 0)
exit(1);
+ if (eal_option_device_parse()) {
+ rte_errno = ENODEV;
+ return -1;
+ }
+
/* Prevent creation of shared memory files. */
if (internal_conf->in_memory == 0) {
RTE_LOG(WARNING, EAL, "Multi-process support is requested, "
@@ -359,6 +364,20 @@ rte_eal_init(int argc, char **argv)
rte_panic("Cannot create thread\n");
}
+ /* initialize services so vdevs register service during bus_probe. */
+ if (rte_service_init()) {
+ rte_eal_init_alert("rte_service_init() failed");
+ rte_errno = ENOEXEC;
+ return -1;
+ }
+
+ /* Probe all the buses and devices/drivers on them */
+ if (rte_bus_probe()) {
+ rte_eal_init_alert("Cannot probe devices");
+ rte_errno = ENOTSUP;
+ return -1;
+ }
+
/*
* Launch a dummy function on all slave lcores, so that master lcore
* knows they are all ready when this function returns.
--
2.16.1.windows.4
More information about the dev
mailing list