[v5,3/8] pci: build on Windows

Message ID 20200609103139.22168-4-talshn@mellanox.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Windows bus/pci support |

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/checkpatch success coding style OK

Commit Message

Tal Shnaiderman June 9, 2020, 10:31 a.m. UTC
  From: Tal Shnaiderman <talshn@mellanox.com>

Added <sys/types.h> in Windows header file includes
to include off_t type since it is needed by PCI.

export per_lcore__rte_errno from eal since it is needed by PCI.

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
 lib/librte_eal/rte_eal_exports.def      | 1 +
 lib/librte_eal/rte_eal_version.map      | 3 +++
 lib/librte_eal/windows/include/rte_os.h | 1 +
 lib/meson.build                         | 5 ++++-
 4 files changed, 9 insertions(+), 1 deletion(-)
  

Comments

Thomas Monjalon June 16, 2020, 8:22 a.m. UTC | #1
09/06/2020 12:31, talshn@mellanox.com:
> From: Tal Shnaiderman <talshn@mellanox.com>
> 
> Added <sys/types.h> in Windows header file includes
> to include off_t type since it is needed by PCI.

Why is it added in rte_os.h and not in the file using off_t?


> export per_lcore__rte_errno from eal since it is needed by PCI.
[...]
> --- a/lib/librte_eal/rte_eal_version.map
> +++ b/lib/librte_eal/rte_eal_version.map
> @@ -386,6 +386,9 @@ EXPERIMENTAL {
> +	# added in 20.08
> +	__emutls_v.per_lcore__rte_errno;

I think it is not needed.
  

Patch

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index e2eb24f01b..8ed5fad987 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -1,5 +1,6 @@ 
 EXPORTS
 	__rte_panic
+	per_lcore__rte_errno
 	rte_calloc
 	rte_calloc_socket
 	rte_eal_get_configuration
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 196eef5afa..fc0579c19a 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -386,6 +386,9 @@  EXPERIMENTAL {
 	rte_trace_point_lookup;
 	rte_trace_regexp;
 	rte_trace_save;
+
+	# added in 20.08
+	__emutls_v.per_lcore__rte_errno;
 };
 
 INTERNAL {
diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
index cb10d6494f..bab011a5c8 100644
--- a/lib/librte_eal/windows/include/rte_os.h
+++ b/lib/librte_eal/windows/include/rte_os.h
@@ -15,6 +15,7 @@ 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/types.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/meson.build b/lib/meson.build
index d190d84eff..a8fd317a18 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -36,7 +36,10 @@  libraries = [
 	'flow_classify', 'bpf', 'graph', 'node']
 
 if is_windows
-	libraries = ['kvargs','eal'] # only supported libraries for windows
+	libraries = [
+		'kvargs','eal',
+		'pci',
+	] # only supported libraries for windows
 endif
 
 default_cflags = machine_args