[v2,2/2] bus/vdev: build on Windows

Message ID 20200707084823.28160-3-talshn@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series Windows bus/vdev support |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

Tal Shnaiderman July 7, 2020, 8:48 a.m. UTC
  From: Tal Shnaiderman <talshn@mellanox.com>

current support will build vdev with empty MP functions
currently unsupported for Windows.

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
 drivers/bus/vdev/meson.build       | 6 ------
 lib/librte_eal/rte_eal_exports.def | 5 +++++
 2 files changed, 5 insertions(+), 6 deletions(-)
  

Comments

Narcisa Ana Maria Vasile July 16, 2020, 8:53 p.m. UTC | #1
On Tue, Jul 07, 2020 at 11:48:23AM +0300, talshn@mellanox.com wrote:
> From: Tal Shnaiderman <talshn@mellanox.com>
> 
> current support will build vdev with empty MP functions
> currently unsupported for Windows.
> 
> Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> ---
>  drivers/bus/vdev/meson.build       | 6 ------
>  lib/librte_eal/rte_eal_exports.def | 5 +++++
>  2 files changed, 5 insertions(+), 6 deletions(-)

Tested-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>

Thanks for the instructions on system configuration, Tal.
Compiled with mingw and clang 9.0.0. VDEV is compiled and registered successfully.
C:\Users\User\hw> .\dpdk-helloworld.exe -l 1
EAL: Registered [vdev] bus.
EAL: Registered [pci] bus.
EAL: Detected 20 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process support is requested, but not available.
EAL: Cannot access virt2phys driver, PA will not be available
EAL: WARNING: TSC frequency estimated roughly - clock timings may be less accurate.
hello from core 1

With clang I first got a linker error, that goes away if the symbol is added in the .def file:
bus_vdev_vdev.c.obj : error LNK2019: unresolved external symbol per_lcore__thread_id referenced in function __vdev_logtype_bus
drivers\librte_bus_vdev-20.0.dll : fatal error LNK1120: 1 unresolved externals
  

Patch

diff --git a/drivers/bus/vdev/meson.build b/drivers/bus/vdev/meson.build
index 3a662b1075..967d54e4f8 100644
--- a/drivers/bus/vdev/meson.build
+++ b/drivers/bus/vdev/meson.build
@@ -1,12 +1,6 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-if is_windows
-	build = false
-	reason = 'not supported on Windows'
-	subdir_done()
-endif
-
 sources = files('vdev.c',
 	'vdev_params.c')
 install_headers('rte_bus_vdev.h')
diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 69204a92c6..f54ed74a58 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -11,6 +11,7 @@  EXPORTS
 	rte_calloc_socket
 	rte_bus_register
 	rte_dev_is_probed
+	rte_devargs_insert
 	rte_devargs_next
 	rte_devargs_remove
 	rte_eal_get_configuration
@@ -29,6 +30,9 @@  EXPORTS
 	rte_eal_using_phys_addrs
 	rte_free
 	rte_hexdump
+	rte_log_register
+	rte_log_register_type_and_pick_level
+	rte_log_set_level
 	rte_malloc
 	rte_malloc_dump_stats
 	rte_malloc_get_socket_stats
@@ -62,6 +66,7 @@  EXPORTS
 	rte_memzone_walk
 	rte_strerror
 	rte_strsplit
+	rte_sys_gettid
 	rte_vfio_container_dma_map
 	rte_vfio_container_dma_unmap
 	rte_vlog