DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows
@ 2020-06-25 13:30 Fady Bader
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 1/5] eal: added interrupts empty stubs Fady Bader
                   ` (9 more replies)
  0 siblings, 10 replies; 61+ messages in thread
From: Fady Bader @ 2020-06-25 13:30 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko

Added needed changes in order to get ethdev compiling under windows.

Depends-on: series-10382 ("compile librte_net for windows")

Fady Bader (5):
  eal: added interrupts empty stubs
  eal: updated export list for Windows
  ethdev: remove structs from export list
  telemetry: implement empty stubs for Windows
  ethdev: compiling ethdev under Windows

 lib/librte_eal/rte_eal_exports.def       | 10 ++++++++
 lib/librte_eal/windows/eal_interrupts.c  | 17 +++++++++++++
 lib/librte_eal/windows/meson.build       |  1 +
 lib/librte_ethdev/rte_ethdev_version.map |  2 --
 lib/librte_telemetry/rte_telemetry.h     |  4 +++
 lib/librte_telemetry/telemetry.c         | 43 +++++++++++++++++++++++++++++++-
 lib/librte_telemetry/telemetry_legacy.c  | 26 ++++++++++++++++++-
 lib/meson.build                          |  7 ++++--
 8 files changed, 104 insertions(+), 6 deletions(-)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH 1/5] eal: added interrupts empty stubs
  2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
@ 2020-06-25 13:30 ` Fady Bader
  2020-06-28 10:58   ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 2/5] eal: updated export list for Windows Fady Bader
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 61+ messages in thread
From: Fady Bader @ 2020-06-25 13:30 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko

The ethdev lib uses interrupts. Interrupts are not implemented for Windows.
To solve this, empty interrupt stubs were added under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/windows/eal_interrupts.c | 17 +++++++++++++++++
 lib/librte_eal/windows/meson.build      |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
new file mode 100644
index 0000000000..1e3c6d20d2
--- /dev/null
+++ b/lib/librte_eal/windows/eal_interrupts.c
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+#include <rte_interrupts.h>
+
+int
+rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
+		int epfd, int op, unsigned int vec, void *data)
+{
+	RTE_SET_USED(intr_handle);
+	RTE_SET_USED(epfd);
+	RTE_SET_USED(op);
+	RTE_SET_USED(vec);
+	RTE_SET_USED(data);
+
+	return -ENOTSUP;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 08c888e018..c5a19648d6 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -17,6 +17,7 @@ sources += files(
 	'eal_timer.c',
 	'fnmatch.c',
 	'getopt.c',
+	'eal_interrupts.c',
 )
 
 dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH 2/5] eal: updated export list for Windows
  2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 1/5] eal: added interrupts empty stubs Fady Bader
@ 2020-06-25 13:30 ` Fady Bader
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 3/5] ethdev: remove structs from export list Fady Bader
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-06-25 13:30 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko

Added eal functions used by ethdev lib to the export list under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/rte_eal_exports.def | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 20f7346962..3b96bbc10d 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -29,6 +29,7 @@ EXPORTS
 	rte_eal_tailq_register
 	rte_eal_using_phys_addrs
 	rte_free
+	rte_get_tsc_hz
 	rte_hexdump
 	rte_log
 	rte_malloc
@@ -148,3 +149,12 @@ EXPORTS
 	rte_mem_page_size
 	rte_mem_unmap
 	rte_rand
+
+	rte_class_register
+	rte_devargs_parse
+	rte_class_find_by_name
+	rte_socket_id
+	rte_strerror
+	rte_intr_rx_ctl
+	rte_log_register
+	rte_log_set_level
\ No newline at end of file
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH 3/5] ethdev: remove structs from export list
  2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 1/5] eal: added interrupts empty stubs Fady Bader
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 2/5] eal: updated export list for Windows Fady Bader
@ 2020-06-25 13:30 ` Fady Bader
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 4/5] telemetry: implement empty stubs for Windows Fady Bader
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-06-25 13:30 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko

Some ethdev structs were present in ethdev export list.
There structs were removed from the export list.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 7155056045..eb36766dcd 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -89,7 +89,6 @@ DPDK_20.0 {
 	rte_eth_iterator_next;
 	rte_eth_led_off;
 	rte_eth_led_on;
-	rte_eth_link;
 	rte_eth_link_get;
 	rte_eth_link_get_nowait;
 	rte_eth_macaddr_get;
@@ -104,7 +103,6 @@ DPDK_20.0 {
 	rte_eth_rx_queue_setup;
 	rte_eth_set_queue_rate_limit;
 	rte_eth_speed_bitflag;
-	rte_eth_stats;
 	rte_eth_stats_get;
 	rte_eth_stats_reset;
 	rte_eth_timesync_adjust_time;
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH 4/5] telemetry: implement empty stubs for Windows
  2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
                   ` (2 preceding siblings ...)
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 3/5] ethdev: remove structs from export list Fady Bader
@ 2020-06-25 13:30 ` Fady Bader
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 5/5] ethdev: compiling ethdev under Windows Fady Bader
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-06-25 13:30 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko

Telemetry didn't compile under Windows.
Empty stubs implementation was added for Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_telemetry/rte_telemetry.h    |  4 +++
 lib/librte_telemetry/telemetry.c        | 43 ++++++++++++++++++++++++++++++++-
 lib/librte_telemetry/telemetry_legacy.c | 26 +++++++++++++++++++-
 3 files changed, 71 insertions(+), 2 deletions(-)

diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index eb7f2c917c..bad255c385 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -5,6 +5,10 @@
 #include <stdint.h>
 #include <rte_compat.h>
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <sched.h>
+#endif
+
 #ifndef _RTE_TELEMETRY_H_
 #define _RTE_TELEMETRY_H_
 
diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
index e7e3d861dd..3e202a089b 100644
--- a/lib/librte_telemetry/telemetry.c
+++ b/lib/librte_telemetry/telemetry.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2020 Intel Corporation
  */
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <pthread.h>
 #include <sys/socket.h>
@@ -20,6 +20,18 @@
 #include "telemetry_data.h"
 #include "rte_telemetry_legacy.h"
 
+#else
+
+#include <rte_common.h>
+
+#include "rte_telemetry.h"
+#include "telemetry_json.h"
+#include "telemetry_data.h"
+#include "rte_telemetry_legacy.h"
+
+#endif
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 #define MAX_CMD_LEN 56
 #define MAX_HELP_LEN 64
 #define MAX_OUTPUT_LEN (1024 * 16)
@@ -46,10 +58,13 @@ static struct cmd_callback callbacks[TELEMETRY_MAX_CALLBACKS];
 static int num_callbacks; /* How many commands are registered */
 /* Used when accessing or modifying list of command callbacks */
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
+#endif
 
 int
 rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	int i = 0;
 
 	if (strlen(cmd) >= MAX_CMD_LEN || fn == NULL || cmd[0] != '/'
@@ -73,8 +88,19 @@ rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 	rte_spinlock_unlock(&callback_sl);
 
 	return 0;
+
+#else
+
+	RTE_SET_USED(cmd);
+	RTE_SET_USED(fn);
+	RTE_SET_USED(help);
+
+	return 0;
+
+#endif
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 list_commands(const char *cmd __rte_unused, const char *params __rte_unused,
 		struct rte_tel_data *d)
@@ -396,11 +422,14 @@ telemetry_v2_init(const char *runtime_dir, rte_cpuset_t *cpuset)
 
 	return 0;
 }
+#endif
 
 int32_t
 rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		const char **err_str)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	if (telemetry_v2_init(runtime_dir, cpuset) != 0) {
 		*err_str = telemetry_log_error;
 		return -1;
@@ -409,4 +438,16 @@ rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		*err_str = telemetry_log_error;
 	}
 	return 0;
+
+#else
+
+	RTE_SET_USED(runtime_dir);
+	RTE_SET_USED(cpuset);
+	RTE_SET_USED(err_str);
+
+	RTE_LOG(WARNING, TELEMETRY, "Telemetry is not supported on Windows.\n");
+
+	return 0;
+
+#endif
 }
diff --git a/lib/librte_telemetry/telemetry_legacy.c b/lib/librte_telemetry/telemetry_legacy.c
index a341fe4ebd..674f9c40ef 100644
--- a/lib/librte_telemetry/telemetry_legacy.c
+++ b/lib/librte_telemetry/telemetry_legacy.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2020 Intel Corporation
  */
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -15,6 +15,15 @@
 
 #include "rte_telemetry_legacy.h"
 
+#else
+
+#include <rte_common.h>
+
+#include "rte_telemetry_legacy.h"
+
+#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #define MAX_LEN 128
 #define BUF_SIZE 1024
 #define CLIENTS_UNREG_ACTION "\"action\":2"
@@ -48,12 +57,15 @@ struct json_command callbacks[TELEMETRY_LEGACY_MAX_CALLBACKS] = {
 };
 int num_legacy_callbacks = 1;
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
+#endif
 
 int
 rte_telemetry_legacy_register(const char *cmd,
 		enum rte_telemetry_legacy_data_req data_req,
 		telemetry_legacy_cb fn)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	if (fn == NULL)
 		return -EINVAL;
 	if (num_legacy_callbacks >= (int) RTE_DIM(callbacks))
@@ -71,8 +83,19 @@ rte_telemetry_legacy_register(const char *cmd,
 	rte_spinlock_unlock(&callback_sl);
 
 	return 0;
+
+#else
+
+	RTE_SET_USED(cmd);
+	RTE_SET_USED(data_req);
+	RTE_SET_USED(fn);
+
+	return 0;
+
+#endif
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 register_client(const char *cmd __rte_unused, const char *params,
 		char *buffer __rte_unused, int buf_len __rte_unused)
@@ -239,3 +262,4 @@ legacy_client_handler(void *sock_id)
 	close(s);
 	return NULL;
 }
+#endif
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH 5/5] ethdev: compiling ethdev under Windows
  2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
                   ` (3 preceding siblings ...)
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 4/5] telemetry: implement empty stubs for Windows Fady Bader
@ 2020-06-25 13:30 ` Fady Bader
  2020-07-29  1:01 ` [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Narcisa Ana Maria Vasile
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-06-25 13:30 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko

Compiling needed libraries for ethdev under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/meson.build | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/meson.build b/lib/meson.build
index 6317309ecf..34366cd614 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -37,9 +37,12 @@ libraries = [
 
 if is_windows
 	libraries = [
-		'kvargs','eal',
+		'kvargs',
+		'telemetry', # basic info querying
+		'eal',
 		'ring',
-		'mempool','mbuf', 'net', 'pci',	] # only supported libraries for windows
+		'mempool','mbuf', 'net', 'meter', 'ethdev', 'pci',
+	] # only supported libraries for windows
 endif
 
 default_cflags = machine_args
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 1/5] eal: added interrupts empty stubs Fady Bader
@ 2020-06-28 10:58   ` Fady Bader
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 1/5] eal: added interrupts empty stubs Fady Bader
                       ` (5 more replies)
  0 siblings, 6 replies; 61+ messages in thread
From: Fady Bader @ 2020-06-28 10:58 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

Added needed changes in order to get ethdev compiling under windows.

Depends-on: series-10382 ("compile librte_net for windows")

v2: fixed logging issue in telemetry lib.

Fady Bader (5):
  eal: added interrupts empty stubs
  eal: updated export list for Windows
  ethdev: remove structs from export list
  telemetry: implement empty stubs for Windows
  ethdev: compiling ethdev under Windows

 lib/librte_eal/rte_eal_exports.def       | 10 +++++++
 lib/librte_eal/windows/eal_interrupts.c  | 17 +++++++++++
 lib/librte_eal/windows/meson.build       |  1 +
 lib/librte_ethdev/rte_ethdev_version.map |  2 --
 lib/librte_telemetry/rte_telemetry.h     |  4 +++
 lib/librte_telemetry/telemetry.c         | 51 +++++++++++++++++++++++++++++++-
 lib/librte_telemetry/telemetry_legacy.c  | 26 +++++++++++++++-
 lib/meson.build                          |  7 +++--
 8 files changed, 112 insertions(+), 6 deletions(-)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v2 1/5] eal: added interrupts empty stubs
  2020-06-28 10:58   ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
@ 2020-06-28 10:58     ` Fady Bader
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 2/5] eal: updated export list for Windows Fady Bader
                       ` (4 subsequent siblings)
  5 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-06-28 10:58 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

The ethdev lib uses interrupts. Interrupts are not implemented for Windows.
To solve this, empty interrupt stubs were added under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/windows/eal_interrupts.c | 17 +++++++++++++++++
 lib/librte_eal/windows/meson.build      |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
new file mode 100644
index 0000000000..1e3c6d20d2
--- /dev/null
+++ b/lib/librte_eal/windows/eal_interrupts.c
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+#include <rte_interrupts.h>
+
+int
+rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
+		int epfd, int op, unsigned int vec, void *data)
+{
+	RTE_SET_USED(intr_handle);
+	RTE_SET_USED(epfd);
+	RTE_SET_USED(op);
+	RTE_SET_USED(vec);
+	RTE_SET_USED(data);
+
+	return -ENOTSUP;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 08c888e018..c5a19648d6 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -17,6 +17,7 @@ sources += files(
 	'eal_timer.c',
 	'fnmatch.c',
 	'getopt.c',
+	'eal_interrupts.c',
 )
 
 dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v2 2/5] eal: updated export list for Windows
  2020-06-28 10:58   ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 1/5] eal: added interrupts empty stubs Fady Bader
@ 2020-06-28 10:58     ` Fady Bader
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 3/5] ethdev: remove structs from export list Fady Bader
                       ` (3 subsequent siblings)
  5 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-06-28 10:58 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

Added eal functions used by ethdev lib to the export list under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/rte_eal_exports.def | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 20f7346962..3b96bbc10d 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -29,6 +29,7 @@ EXPORTS
 	rte_eal_tailq_register
 	rte_eal_using_phys_addrs
 	rte_free
+	rte_get_tsc_hz
 	rte_hexdump
 	rte_log
 	rte_malloc
@@ -148,3 +149,12 @@ EXPORTS
 	rte_mem_page_size
 	rte_mem_unmap
 	rte_rand
+
+	rte_class_register
+	rte_devargs_parse
+	rte_class_find_by_name
+	rte_socket_id
+	rte_strerror
+	rte_intr_rx_ctl
+	rte_log_register
+	rte_log_set_level
\ No newline at end of file
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v2 3/5] ethdev: remove structs from export list
  2020-06-28 10:58   ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 1/5] eal: added interrupts empty stubs Fady Bader
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 2/5] eal: updated export list for Windows Fady Bader
@ 2020-06-28 10:58     ` Fady Bader
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 4/5] telemetry: implement empty stubs for Windows Fady Bader
                       ` (2 subsequent siblings)
  5 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-06-28 10:58 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

Some ethdev structs were present in ethdev export list.
There structs were removed from the export list.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 7155056045..eb36766dcd 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -89,7 +89,6 @@ DPDK_20.0 {
 	rte_eth_iterator_next;
 	rte_eth_led_off;
 	rte_eth_led_on;
-	rte_eth_link;
 	rte_eth_link_get;
 	rte_eth_link_get_nowait;
 	rte_eth_macaddr_get;
@@ -104,7 +103,6 @@ DPDK_20.0 {
 	rte_eth_rx_queue_setup;
 	rte_eth_set_queue_rate_limit;
 	rte_eth_speed_bitflag;
-	rte_eth_stats;
 	rte_eth_stats_get;
 	rte_eth_stats_reset;
 	rte_eth_timesync_adjust_time;
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v2 4/5] telemetry: implement empty stubs for Windows
  2020-06-28 10:58   ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
                       ` (2 preceding siblings ...)
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 3/5] ethdev: remove structs from export list Fady Bader
@ 2020-06-28 10:58     ` Fady Bader
  2020-06-28 18:04       ` Stephen Hemminger
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 5/5] ethdev: compiling ethdev under Windows Fady Bader
  2020-07-26  9:24     ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
  5 siblings, 1 reply; 61+ messages in thread
From: Fady Bader @ 2020-06-28 10:58 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

Telemetry didn't compile under Windows.
Empty stubs implementation was added for Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_telemetry/rte_telemetry.h    |  4 +++
 lib/librte_telemetry/telemetry.c        | 51 ++++++++++++++++++++++++++++++++-
 lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
 3 files changed, 79 insertions(+), 2 deletions(-)

diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index eb7f2c917c..bad255c385 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -5,6 +5,10 @@
 #include <stdint.h>
 #include <rte_compat.h>
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <sched.h>
+#endif
+
 #ifndef _RTE_TELEMETRY_H_
 #define _RTE_TELEMETRY_H_
 
diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
index e7e3d861dd..c5443193a9 100644
--- a/lib/librte_telemetry/telemetry.c
+++ b/lib/librte_telemetry/telemetry.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2020 Intel Corporation
  */
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <pthread.h>
 #include <sys/socket.h>
@@ -20,6 +20,20 @@
 #include "telemetry_data.h"
 #include "rte_telemetry_legacy.h"
 
+#else
+
+/* includes for Windows */
+#include <rte_common.h>
+#include <rte_log.h>
+
+#include "rte_telemetry.h"
+#include "telemetry_json.h"
+#include "telemetry_data.h"
+#include "rte_telemetry_legacy.h"
+
+#endif
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 #define MAX_CMD_LEN 56
 #define MAX_HELP_LEN 64
 #define MAX_OUTPUT_LEN (1024 * 16)
@@ -40,16 +54,23 @@ struct socket {
 };
 static struct socket v2_socket; /* socket for v2 telemetry */
 static struct socket v1_socket; /* socket for v1 telemetry */
+#endif
+
 static char telemetry_log_error[1024]; /* Will contain error on init failure */
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* list of command callbacks, with one command registered by default */
 static struct cmd_callback callbacks[TELEMETRY_MAX_CALLBACKS];
 static int num_callbacks; /* How many commands are registered */
 /* Used when accessing or modifying list of command callbacks */
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
+#endif
 
 int
 rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	int i = 0;
 
 	if (strlen(cmd) >= MAX_CMD_LEN || fn == NULL || cmd[0] != '/'
@@ -73,8 +94,19 @@ rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 	rte_spinlock_unlock(&callback_sl);
 
 	return 0;
+
+#else
+
+	RTE_SET_USED(cmd);
+	RTE_SET_USED(fn);
+	RTE_SET_USED(help);
+
+	return 0;
+
+#endif
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 list_commands(const char *cmd __rte_unused, const char *params __rte_unused,
 		struct rte_tel_data *d)
@@ -396,11 +428,14 @@ telemetry_v2_init(const char *runtime_dir, rte_cpuset_t *cpuset)
 
 	return 0;
 }
+#endif
 
 int32_t
 rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		const char **err_str)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	if (telemetry_v2_init(runtime_dir, cpuset) != 0) {
 		*err_str = telemetry_log_error;
 		return -1;
@@ -409,4 +444,18 @@ rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		*err_str = telemetry_log_error;
 	}
 	return 0;
+
+#else
+
+	RTE_SET_USED(runtime_dir);
+	RTE_SET_USED(cpuset);
+	RTE_SET_USED(err_str);
+
+	snprintf(telemetry_log_error, sizeof(telemetry_log_error),
+		"Telemetry is not supported on Windows.");
+
+	return 0;
+
+#endif
 }
+
diff --git a/lib/librte_telemetry/telemetry_legacy.c b/lib/librte_telemetry/telemetry_legacy.c
index a341fe4ebd..674f9c40ef 100644
--- a/lib/librte_telemetry/telemetry_legacy.c
+++ b/lib/librte_telemetry/telemetry_legacy.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2020 Intel Corporation
  */
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -15,6 +15,15 @@
 
 #include "rte_telemetry_legacy.h"
 
+#else
+
+#include <rte_common.h>
+
+#include "rte_telemetry_legacy.h"
+
+#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #define MAX_LEN 128
 #define BUF_SIZE 1024
 #define CLIENTS_UNREG_ACTION "\"action\":2"
@@ -48,12 +57,15 @@ struct json_command callbacks[TELEMETRY_LEGACY_MAX_CALLBACKS] = {
 };
 int num_legacy_callbacks = 1;
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
+#endif
 
 int
 rte_telemetry_legacy_register(const char *cmd,
 		enum rte_telemetry_legacy_data_req data_req,
 		telemetry_legacy_cb fn)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	if (fn == NULL)
 		return -EINVAL;
 	if (num_legacy_callbacks >= (int) RTE_DIM(callbacks))
@@ -71,8 +83,19 @@ rte_telemetry_legacy_register(const char *cmd,
 	rte_spinlock_unlock(&callback_sl);
 
 	return 0;
+
+#else
+
+	RTE_SET_USED(cmd);
+	RTE_SET_USED(data_req);
+	RTE_SET_USED(fn);
+
+	return 0;
+
+#endif
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 register_client(const char *cmd __rte_unused, const char *params,
 		char *buffer __rte_unused, int buf_len __rte_unused)
@@ -239,3 +262,4 @@ legacy_client_handler(void *sock_id)
 	close(s);
 	return NULL;
 }
+#endif
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v2 5/5] ethdev: compiling ethdev under Windows
  2020-06-28 10:58   ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
                       ` (3 preceding siblings ...)
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 4/5] telemetry: implement empty stubs for Windows Fady Bader
@ 2020-06-28 10:58     ` Fady Bader
  2020-07-26  9:24     ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
  5 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-06-28 10:58 UTC (permalink / raw)
  To: dev
  Cc: fady, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

Compiling needed libraries for ethdev under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/meson.build | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/meson.build b/lib/meson.build
index 6317309ecf..34366cd614 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -37,9 +37,12 @@ libraries = [
 
 if is_windows
 	libraries = [
-		'kvargs','eal',
+		'kvargs',
+		'telemetry', # basic info querying
+		'eal',
 		'ring',
-		'mempool','mbuf', 'net', 'pci',	] # only supported libraries for windows
+		'mempool','mbuf', 'net', 'meter', 'ethdev', 'pci',
+	] # only supported libraries for windows
 endif
 
 default_cflags = machine_args
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/5] telemetry: implement empty stubs for Windows
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 4/5] telemetry: implement empty stubs for Windows Fady Bader
@ 2020-06-28 18:04       ` Stephen Hemminger
  2020-06-29  7:59         ` Thomas Monjalon
  0 siblings, 1 reply; 61+ messages in thread
From: Stephen Hemminger @ 2020-06-28 18:04 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

On Sun, 28 Jun 2020 13:58:50 +0300
Fady Bader <fady@mellanox.com> wrote:

> Telemetry didn't compile under Windows.
> Empty stubs implementation was added for Windows.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>

Maybe ethdev could be modified to not depend on telemetry library directly.
The current way means every application gets the telemetry library (on Linux)
even though few use it.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/5] telemetry: implement empty stubs for Windows
  2020-06-28 18:04       ` Stephen Hemminger
@ 2020-06-29  7:59         ` Thomas Monjalon
  0 siblings, 0 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-06-29  7:59 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Fady Bader, dev, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power,
	bruce.richardson

28/06/2020 20:04, Stephen Hemminger:
> On Sun, 28 Jun 2020 13:58:50 +0300
> Fady Bader <fady@mellanox.com> wrote:
> 
> > Telemetry didn't compile under Windows.
> > Empty stubs implementation was added for Windows.
> > 
> > Signed-off-by: Fady Bader <fady@mellanox.com>
> 
> Maybe ethdev could be modified to not depend on telemetry library directly.
> The current way means every application gets the telemetry library (on Linux)
> even though few use it.

It was decided to have telemetry a basic dependency
during the rework in 20.05.



^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows
  2020-06-28 10:58   ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
                       ` (4 preceding siblings ...)
  2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 5/5] ethdev: compiling ethdev under Windows Fady Bader
@ 2020-07-26  9:24     ` Fady Bader
  2020-07-27 18:53       ` Narcisa Ana Maria Vasile
  5 siblings, 1 reply; 61+ messages in thread
From: Fady Bader @ 2020-07-26  9:24 UTC (permalink / raw)
  To: Fady Bader, dev, Narcisa Ana Maria Vasile
  Cc: Thomas Monjalon, Tasnim Bashar, Tal Shnaiderman, Yohad Tor,
	dmitry.kozliuk, harini.ramakrishnan, ocardona, ranjit.menon,
	pallavi.kadam, kevin.laatz, ferruh.yigit, arybchenko,
	ciara.power

Hi Narcisa,
I saw that the net patch was acked, can you also review this patch too to see if more work should be done.

Thanks,
Fady


> -----Original Message-----
> From: Fady Bader <fady@mellanox.com>
> Sent: Sunday, June 28, 2020 1:59 PM
> To: dev@dpdk.org
> Cc: Fady Bader <fady@mellanox.com>; Thomas Monjalon
> <thomas@monjalon.net>; Tasnim Bashar <tbashar@mellanox.com>; Tal
> Shnaiderman <talshn@mellanox.com>; Yohad Tor <yohadt@mellanox.com>;
> dmitry.kozliuk@gmail.com; harini.ramakrishnan@microsoft.com;
> ocardona@microsoft.com; ranjit.menon@intel.com; pallavi.kadam@intel.com;
> kevin.laatz@intel.com; ferruh.yigit@intel.com; arybchenko@solarflare.com;
> ciara.power@intel.com
> Subject: [PATCH v2 0/5] compiling ethdev lib under windows
> 
> Added needed changes in order to get ethdev compiling under windows.
> 
> Depends-on: series-10382 ("compile librte_net for windows")
> 
> v2: fixed logging issue in telemetry lib.
> 
> Fady Bader (5):
>   eal: added interrupts empty stubs
>   eal: updated export list for Windows
>   ethdev: remove structs from export list
>   telemetry: implement empty stubs for Windows
>   ethdev: compiling ethdev under Windows
> 
>  lib/librte_eal/rte_eal_exports.def       | 10 +++++++
>  lib/librte_eal/windows/eal_interrupts.c  | 17 +++++++++++
>  lib/librte_eal/windows/meson.build       |  1 +
>  lib/librte_ethdev/rte_ethdev_version.map |  2 --
>  lib/librte_telemetry/rte_telemetry.h     |  4 +++
>  lib/librte_telemetry/telemetry.c         | 51
> +++++++++++++++++++++++++++++++-
>  lib/librte_telemetry/telemetry_legacy.c  | 26 +++++++++++++++-
>  lib/meson.build                          |  7 +++--
>  8 files changed, 112 insertions(+), 6 deletions(-)  create mode 100644
> lib/librte_eal/windows/eal_interrupts.c
> 
> --
> 2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows
  2020-07-26  9:24     ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
@ 2020-07-27 18:53       ` Narcisa Ana Maria Vasile
  0 siblings, 0 replies; 61+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-07-27 18:53 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, Thomas Monjalon, Tasnim Bashar, Tal Shnaiderman, Yohad Tor,
	dmitry.kozliuk, harini.ramakrishnan, ocardona, ranjit.menon,
	pallavi.kadam, kevin.laatz, ferruh.yigit, arybchenko,
	ciara.power

On Sun, Jul 26, 2020 at 09:24:26AM +0000, Fady Bader wrote:
> Hi Narcisa,
> I saw that the net patch was acked, can you also review this patch too to see if more work should be done.
> 
Hi Fady,

Yes, I will look at it.

> Thanks,
> Fady
> 
> 
> > -----Original Message-----
> > From: Fady Bader <fady@mellanox.com>
> > Sent: Sunday, June 28, 2020 1:59 PM
> > To: dev@dpdk.org
> > Cc: Fady Bader <fady@mellanox.com>; Thomas Monjalon
> > <thomas@monjalon.net>; Tasnim Bashar <tbashar@mellanox.com>; Tal
> > Shnaiderman <talshn@mellanox.com>; Yohad Tor <yohadt@mellanox.com>;
> > dmitry.kozliuk@gmail.com; harini.ramakrishnan@microsoft.com;
> > ocardona@microsoft.com; ranjit.menon@intel.com; pallavi.kadam@intel.com;
> > kevin.laatz@intel.com; ferruh.yigit@intel.com; arybchenko@solarflare.com;
> > ciara.power@intel.com
> > Subject: [PATCH v2 0/5] compiling ethdev lib under windows
> > 
> > Added needed changes in order to get ethdev compiling under windows.
> > 
> > Depends-on: series-10382 ("compile librte_net for windows")
> > 
> > v2: fixed logging issue in telemetry lib.
> > 
> > Fady Bader (5):
> >   eal: added interrupts empty stubs
> >   eal: updated export list for Windows
> >   ethdev: remove structs from export list
> >   telemetry: implement empty stubs for Windows
> >   ethdev: compiling ethdev under Windows
> > 
> >  lib/librte_eal/rte_eal_exports.def       | 10 +++++++
> >  lib/librte_eal/windows/eal_interrupts.c  | 17 +++++++++++
> >  lib/librte_eal/windows/meson.build       |  1 +
> >  lib/librte_ethdev/rte_ethdev_version.map |  2 --
> >  lib/librte_telemetry/rte_telemetry.h     |  4 +++
> >  lib/librte_telemetry/telemetry.c         | 51
> > +++++++++++++++++++++++++++++++-
> >  lib/librte_telemetry/telemetry_legacy.c  | 26 +++++++++++++++-
> >  lib/meson.build                          |  7 +++--
> >  8 files changed, 112 insertions(+), 6 deletions(-)  create mode 100644
> > lib/librte_eal/windows/eal_interrupts.c
> > 
> > --
> > 2.16.1.windows.4

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows
  2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
                   ` (4 preceding siblings ...)
  2020-06-25 13:30 ` [dpdk-dev] [PATCH 5/5] ethdev: compiling ethdev under Windows Fady Bader
@ 2020-07-29  1:01 ` Narcisa Ana Maria Vasile
  2020-08-03  6:16   ` Fady Bader
  2020-08-03 10:38 ` [dpdk-dev] [PATCH v3 " Fady Bader
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 61+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-07-29  1:01 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, ranjit.menon, pallavi.kadam,
	kevin.laatz, ferruh.yigit, arybchenko

On Thu, Jun 25, 2020 at 04:30:33PM +0300, Fady Bader wrote:
> Added needed changes in order to get ethdev compiling under windows.
> 
> Depends-on: series-10382 ("compile librte_net for windows")
> 
> Fady Bader (5):
>   eal: added interrupts empty stubs
>   eal: updated export list for Windows
>   ethdev: remove structs from export list
>   telemetry: implement empty stubs for Windows
>   ethdev: compiling ethdev under Windows
> 
>  lib/librte_eal/rte_eal_exports.def       | 10 ++++++++
>  lib/librte_eal/windows/eal_interrupts.c  | 17 +++++++++++++
>  lib/librte_eal/windows/meson.build       |  1 +
>  lib/librte_ethdev/rte_ethdev_version.map |  2 --
>  lib/librte_telemetry/rte_telemetry.h     |  4 +++
>  lib/librte_telemetry/telemetry.c         | 43 +++++++++++++++++++++++++++++++-
>  lib/librte_telemetry/telemetry_legacy.c  | 26 ++++++++++++++++++-
>  lib/meson.build                          |  7 ++++--
>  8 files changed, 104 insertions(+), 6 deletions(-)
>  create mode 100644 lib/librte_eal/windows/eal_interrupts.c
> 
Tested-by: Narcisa Vasile <navasile@linux.microsoft.com>

Compiled successfully with mingw and clang. It does need a rebase, as more changes have been added in telemetry.
Also, there's a missing export that needs to be added as well 'rte_log_register_type_and_pick_level' 


> -- 
> 2.16.1.windows.4

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows
  2020-07-29  1:01 ` [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Narcisa Ana Maria Vasile
@ 2020-08-03  6:16   ` Fady Bader
  0 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-03  6:16 UTC (permalink / raw)
  To: Narcisa Ana Maria Vasile
  Cc: dev, Thomas Monjalon, Tasnim Bashar, Tal Shnaiderman, Yohad Tor,
	dmitry.kozliuk, harini.ramakrishnan, ocardona, ranjit.menon,
	pallavi.kadam, kevin.laatz, ferruh.yigit, arybchenko



> -----Original Message-----
> From: Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>
> Sent: Wednesday, July 29, 2020 4:02 AM
> To: Fady Bader <fady@mellanox.com>
> Cc: dev@dpdk.org; Thomas Monjalon <thomas@monjalon.net>; Tasnim Bashar
> <tbashar@mellanox.com>; Tal Shnaiderman <talshn@mellanox.com>; Yohad Tor
> <yohadt@mellanox.com>; dmitry.kozliuk@gmail.com;
> harini.ramakrishnan@microsoft.com; ocardona@microsoft.com;
> ranjit.menon@intel.com; pallavi.kadam@intel.com; kevin.laatz@intel.com;
> ferruh.yigit@intel.com; arybchenko@solarflare.com
> Subject: Re: [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows
> 
> On Thu, Jun 25, 2020 at 04:30:33PM +0300, Fady Bader wrote:
> > Added needed changes in order to get ethdev compiling under windows.
> >
> > Depends-on: series-10382 ("compile librte_net for windows")
> >
> > Fady Bader (5):
> >   eal: added interrupts empty stubs
> >   eal: updated export list for Windows
> >   ethdev: remove structs from export list
> >   telemetry: implement empty stubs for Windows
> >   ethdev: compiling ethdev under Windows
> >
> >  lib/librte_eal/rte_eal_exports.def       | 10 ++++++++
> >  lib/librte_eal/windows/eal_interrupts.c  | 17 +++++++++++++
> >  lib/librte_eal/windows/meson.build       |  1 +
> >  lib/librte_ethdev/rte_ethdev_version.map |  2 --
> >  lib/librte_telemetry/rte_telemetry.h     |  4 +++
> >  lib/librte_telemetry/telemetry.c         | 43
> +++++++++++++++++++++++++++++++-
> >  lib/librte_telemetry/telemetry_legacy.c  | 26 ++++++++++++++++++-
> >  lib/meson.build                          |  7 ++++--
> >  8 files changed, 104 insertions(+), 6 deletions(-)  create mode
> > 100644 lib/librte_eal/windows/eal_interrupts.c
> >
> Tested-by: Narcisa Vasile <navasile@linux.microsoft.com>
> 
> Compiled successfully with mingw and clang. It does need a rebase, as more
> changes have been added in telemetry.
> Also, there's a missing export that needs to be added as well
> 'rte_log_register_type_and_pick_level'

Thanks Narcisa, I'll send a rebased patch.

> 
> 
> > --
> > 2.16.1.windows.4

^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v3 0/5] compiling ethdev lib under windows
  2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
                   ` (5 preceding siblings ...)
  2020-07-29  1:01 ` [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Narcisa Ana Maria Vasile
@ 2020-08-03 10:38 ` Fady Bader
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 1/5] eal: added interrupts empty stubs Fady Bader
                     ` (4 more replies)
  2020-08-04  6:29 ` [dpdk-dev] [PATCH v4 0/5] compiling ethdev lib under windows Fady Bader
                   ` (2 subsequent siblings)
  9 siblings, 5 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-03 10:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Added needed changes in order to get ethdev compiling under windows.

Depends-on: series-10382 ("compile librte_net for windows")

v3: rebased on current master, added more exports to export list

v2: fixed logging issue in telemetry lib.

Fady Bader (5):
  eal: added interrupts empty stubs
  eal: updated export list for Windows
  ethdev: remove structs from export list
  telemetry: implement empty stubs for Windows
  ethdev: compiling ethdev under Windows

 lib/librte_eal/rte_eal_exports.def       | 11 +++++++
 lib/librte_eal/windows/eal_interrupts.c  | 17 +++++++++++
 lib/librte_eal/windows/meson.build       |  1 +
 lib/librte_ethdev/rte_ethdev_version.map |  2 --
 lib/librte_telemetry/rte_telemetry.h     |  4 +++
 lib/librte_telemetry/telemetry.c         | 52 +++++++++++++++++++++++++++++++-
 lib/librte_telemetry/telemetry_legacy.c  | 26 +++++++++++++++-
 lib/meson.build                          |  3 +-
 8 files changed, 111 insertions(+), 5 deletions(-)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v3 1/5] eal: added interrupts empty stubs
  2020-08-03 10:38 ` [dpdk-dev] [PATCH v3 " Fady Bader
@ 2020-08-03 10:38   ` Fady Bader
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 2/5] eal: updated export list for Windows Fady Bader
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-03 10:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

The ethdev lib uses interrupts. Interrupts are not implemented for Windows.
To solve this, empty interrupt stubs were added under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/windows/eal_interrupts.c | 17 +++++++++++++++++
 lib/librte_eal/windows/meson.build      |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
new file mode 100644
index 0000000000..1e3c6d20d2
--- /dev/null
+++ b/lib/librte_eal/windows/eal_interrupts.c
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+#include <rte_interrupts.h>
+
+int
+rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
+		int epfd, int op, unsigned int vec, void *data)
+{
+	RTE_SET_USED(intr_handle);
+	RTE_SET_USED(epfd);
+	RTE_SET_USED(op);
+	RTE_SET_USED(vec);
+	RTE_SET_USED(data);
+
+	return -ENOTSUP;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 08c888e018..c5a19648d6 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -17,6 +17,7 @@ sources += files(
 	'eal_timer.c',
 	'fnmatch.c',
 	'getopt.c',
+	'eal_interrupts.c',
 )
 
 dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v3 2/5] eal: updated export list for Windows
  2020-08-03 10:38 ` [dpdk-dev] [PATCH v3 " Fady Bader
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 1/5] eal: added interrupts empty stubs Fady Bader
@ 2020-08-03 10:38   ` Fady Bader
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 3/5] ethdev: remove structs from export list Fady Bader
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-03 10:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Added eal functions used by ethdev lib to the export list under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/rte_eal_exports.def | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 69204a92c6..782e6fc721 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -28,6 +28,7 @@ EXPORTS
 	rte_eal_tailq_register
 	rte_eal_using_phys_addrs
 	rte_free
+	rte_get_tsc_hz
 	rte_hexdump
 	rte_malloc
 	rte_malloc_dump_stats
@@ -145,3 +146,13 @@ EXPORTS
 	rte_mem_map
 	rte_mem_page_size
 	rte_mem_unmap
+
+	rte_class_register
+	rte_devargs_parse
+	rte_class_find_by_name
+	rte_socket_id
+	rte_strerror
+	rte_intr_rx_ctl
+	rte_log_register
+	rte_log_set_level
+	rte_log_register_type_and_pick_level
\ No newline at end of file
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v3 3/5] ethdev: remove structs from export list
  2020-08-03 10:38 ` [dpdk-dev] [PATCH v3 " Fady Bader
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 1/5] eal: added interrupts empty stubs Fady Bader
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 2/5] eal: updated export list for Windows Fady Bader
@ 2020-08-03 10:38   ` Fady Bader
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 4/5] telemetry: implement empty stubs for Windows Fady Bader
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 5/5] ethdev: compiling ethdev under Windows Fady Bader
  4 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-03 10:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Some ethdev structs were present in ethdev export list.
There structs were removed from the export list.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 1212a17d32..21a2177756 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -89,7 +89,6 @@ DPDK_20.0 {
 	rte_eth_iterator_next;
 	rte_eth_led_off;
 	rte_eth_led_on;
-	rte_eth_link;
 	rte_eth_link_get;
 	rte_eth_link_get_nowait;
 	rte_eth_macaddr_get;
@@ -104,7 +103,6 @@ DPDK_20.0 {
 	rte_eth_rx_queue_setup;
 	rte_eth_set_queue_rate_limit;
 	rte_eth_speed_bitflag;
-	rte_eth_stats;
 	rte_eth_stats_get;
 	rte_eth_stats_reset;
 	rte_eth_timesync_adjust_time;
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v3 4/5] telemetry: implement empty stubs for Windows
  2020-08-03 10:38 ` [dpdk-dev] [PATCH v3 " Fady Bader
                     ` (2 preceding siblings ...)
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 3/5] ethdev: remove structs from export list Fady Bader
@ 2020-08-03 10:38   ` Fady Bader
  2020-08-04  1:26     ` Narcisa Ana Maria Vasile
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 5/5] ethdev: compiling ethdev under Windows Fady Bader
  4 siblings, 1 reply; 61+ messages in thread
From: Fady Bader @ 2020-08-03 10:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Telemetry didn't compile under Windows.
Empty stubs implementation was added for Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_telemetry/rte_telemetry.h    |  4 +++
 lib/librte_telemetry/telemetry.c        | 52 ++++++++++++++++++++++++++++++++-
 lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
 3 files changed, 80 insertions(+), 2 deletions(-)

diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index d13010b8fb..c3c0e44599 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -5,6 +5,10 @@
 #include <stdint.h>
 #include <rte_compat.h>
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <sched.h>
+#endif
+
 #ifndef _RTE_TELEMETRY_H_
 #define _RTE_TELEMETRY_H_
 
diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
index 0252282735..51fc0de6ae 100644
--- a/lib/librte_telemetry/telemetry.c
+++ b/lib/librte_telemetry/telemetry.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2020 Intel Corporation
  */
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <pthread.h>
 #include <sys/socket.h>
@@ -20,6 +20,20 @@
 #include "telemetry_data.h"
 #include "rte_telemetry_legacy.h"
 
+#else
+
+/* includes for Windows */
+#include <rte_common.h>
+#include <rte_log.h>
+
+#include "rte_telemetry.h"
+#include "telemetry_json.h"
+#include "telemetry_data.h"
+#include "rte_telemetry_legacy.h"
+
+#endif
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 #define MAX_CMD_LEN 56
 #define MAX_HELP_LEN 64
 #define MAX_OUTPUT_LEN (1024 * 16)
@@ -42,17 +56,25 @@ struct socket {
 };
 static struct socket v2_socket; /* socket for v2 telemetry */
 static struct socket v1_socket; /* socket for v1 telemetry */
+#endif
+
 static char telemetry_log_error[1024]; /* Will contain error on init failure */
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* list of command callbacks, with one command registered by default */
 static struct cmd_callback callbacks[TELEMETRY_MAX_CALLBACKS];
 static int num_callbacks; /* How many commands are registered */
 /* Used when accessing or modifying list of command callbacks */
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
 static uint16_t v2_clients;
+int
+#endif
 
 int
 rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	int i = 0;
 
 	if (strlen(cmd) >= MAX_CMD_LEN || fn == NULL || cmd[0] != '/'
@@ -76,8 +98,19 @@ rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 	rte_spinlock_unlock(&callback_sl);
 
 	return 0;
+
+#else
+
+	RTE_SET_USED(cmd);
+	RTE_SET_USED(fn);
+	RTE_SET_USED(help);
+
+	return 0;
+
+#endif
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 list_commands(const char *cmd __rte_unused, const char *params __rte_unused,
 		struct rte_tel_data *d)
@@ -411,11 +444,14 @@ telemetry_v2_init(const char *runtime_dir, rte_cpuset_t *cpuset)
 
 	return 0;
 }
+#endif
 
 int32_t
 rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		const char **err_str)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	if (telemetry_v2_init(runtime_dir, cpuset) != 0) {
 		*err_str = telemetry_log_error;
 		return -1;
@@ -424,4 +460,18 @@ rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		*err_str = telemetry_log_error;
 	}
 	return 0;
+
+#else
+
+	RTE_SET_USED(runtime_dir);
+	RTE_SET_USED(cpuset);
+	RTE_SET_USED(err_str);
+
+	snprintf(telemetry_log_error, sizeof(telemetry_log_error),
+		"Telemetry is not supported on Windows.");
+
+	return 0;
+
+#endif
 }
+
diff --git a/lib/librte_telemetry/telemetry_legacy.c b/lib/librte_telemetry/telemetry_legacy.c
index a341fe4ebd..674f9c40ef 100644
--- a/lib/librte_telemetry/telemetry_legacy.c
+++ b/lib/librte_telemetry/telemetry_legacy.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2020 Intel Corporation
  */
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -15,6 +15,15 @@
 
 #include "rte_telemetry_legacy.h"
 
+#else
+
+#include <rte_common.h>
+
+#include "rte_telemetry_legacy.h"
+
+#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #define MAX_LEN 128
 #define BUF_SIZE 1024
 #define CLIENTS_UNREG_ACTION "\"action\":2"
@@ -48,12 +57,15 @@ struct json_command callbacks[TELEMETRY_LEGACY_MAX_CALLBACKS] = {
 };
 int num_legacy_callbacks = 1;
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
+#endif
 
 int
 rte_telemetry_legacy_register(const char *cmd,
 		enum rte_telemetry_legacy_data_req data_req,
 		telemetry_legacy_cb fn)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	if (fn == NULL)
 		return -EINVAL;
 	if (num_legacy_callbacks >= (int) RTE_DIM(callbacks))
@@ -71,8 +83,19 @@ rte_telemetry_legacy_register(const char *cmd,
 	rte_spinlock_unlock(&callback_sl);
 
 	return 0;
+
+#else
+
+	RTE_SET_USED(cmd);
+	RTE_SET_USED(data_req);
+	RTE_SET_USED(fn);
+
+	return 0;
+
+#endif
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 register_client(const char *cmd __rte_unused, const char *params,
 		char *buffer __rte_unused, int buf_len __rte_unused)
@@ -239,3 +262,4 @@ legacy_client_handler(void *sock_id)
 	close(s);
 	return NULL;
 }
+#endif
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v3 5/5] ethdev: compiling ethdev under Windows
  2020-08-03 10:38 ` [dpdk-dev] [PATCH v3 " Fady Bader
                     ` (3 preceding siblings ...)
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 4/5] telemetry: implement empty stubs for Windows Fady Bader
@ 2020-08-03 10:38   ` Fady Bader
  4 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-03 10:38 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Compiling needed libraries for ethdev under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/meson.build b/lib/meson.build
index 6bbaf242a9..c145240eb9 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -38,9 +38,10 @@ libraries = [
 if is_windows
 	libraries = [
 		'kvargs',
+		'telemetry',
 		'eal',
 		'ring',
-		'mempool', 'mbuf', 'pci', 'net',
+		'mempool', 'mbuf', 'net', 'meter', 'ethdev', 'pci', # core
 	] # only supported libraries for windows
 endif
 
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v3 4/5] telemetry: implement empty stubs for Windows
  2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 4/5] telemetry: implement empty stubs for Windows Fady Bader
@ 2020-08-04  1:26     ` Narcisa Ana Maria Vasile
  2020-08-04  6:05       ` Fady Bader
  0 siblings, 1 reply; 61+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-08-04  1:26 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

On Mon, Aug 03, 2020 at 01:38:42PM +0300, Fady Bader wrote:
> Telemetry didn't compile under Windows.
> Empty stubs implementation was added for Windows.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  lib/librte_telemetry/rte_telemetry.h    |  4 +++
>  lib/librte_telemetry/telemetry.c        | 52 ++++++++++++++++++++++++++++++++-
>  lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
>  3 files changed, 80 insertions(+), 2 deletions(-)
> 
> +
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  /* list of command callbacks, with one command registered by default */
>  static struct cmd_callback callbacks[TELEMETRY_MAX_CALLBACKS];
>  static int num_callbacks; /* How many commands are registered */
>  /* Used when accessing or modifying list of command callbacks */
>  static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
>  static uint16_t v2_clients;
> +int
Remove 'int'

> +#endif
>  
>  int
>  rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
>  {
> +#ifndef RTE_EXEC_ENV_WINDOWS
> +
>  	int i = 0;
>  
>  	if (strlen(cmd) >= MAX_CMD_LEN || fn == NULL || cmd[0] != '/'
> @@ -76,8 +98,19 @@ rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
>  	rte_spinlock_unlock(&callback_sl);
>  
>  	return 0;
> +
> +#else
> +
> +	RTE_SET_USED(cmd);
> +	RTE_SET_USED(fn);
> +	RTE_SET_USED(help);
> +
> +	return 0;
> +
> +#endif
Maybe add a comment like /* RTE_EXEC_ENV_WINDOWS */ next to each #else/#endif, to be easier to follow what's being guarded out. Your guards are rather small,
so it's easy to follow, but sometimes when big chunks of code are being guarded, it's harder to tell what the guard was for (e.g. line 446 it's the end of a big #ifdef/#endif). 
>  }
>  
> +#ifndef RTE_EXEC_ENV_WINDOWS

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v3 4/5] telemetry: implement empty stubs for Windows
  2020-08-04  1:26     ` Narcisa Ana Maria Vasile
@ 2020-08-04  6:05       ` Fady Bader
  0 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-04  6:05 UTC (permalink / raw)
  To: Narcisa Ana Maria Vasile
  Cc: dev, Thomas Monjalon, Tasnim Bashar, Tal Shnaiderman, Yohad Tor,
	dmitry.kozliuk, harini.ramakrishnan, ocardona, pallavi.kadam,
	ranjit.menon, kevin.laatz, ferruh.yigit, arybchenko, ciara.power



> -----Original Message-----
> From: Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>
> Sent: Tuesday, August 4, 2020 4:27 AM
> To: Fady Bader <fady@mellanox.com>
> Cc: dev@dpdk.org; Thomas Monjalon <thomas@monjalon.net>; Tasnim Bashar
> <tbashar@mellanox.com>; Tal Shnaiderman <talshn@mellanox.com>; Yohad Tor
> <yohadt@mellanox.com>; dmitry.kozliuk@gmail.com;
> harini.ramakrishnan@microsoft.com; ocardona@microsoft.com;
> pallavi.kadam@intel.com; ranjit.menon@intel.com; kevin.laatz@intel.com;
> ferruh.yigit@intel.com; arybchenko@solarflare.com; ciara.power@intel.com
> Subject: Re: [PATCH v3 4/5] telemetry: implement empty stubs for Windows
> 
> On Mon, Aug 03, 2020 at 01:38:42PM +0300, Fady Bader wrote:
> > Telemetry didn't compile under Windows.
> > Empty stubs implementation was added for Windows.
> >
> > Signed-off-by: Fady Bader <fady@mellanox.com>
> > ---
> >  lib/librte_telemetry/rte_telemetry.h    |  4 +++
> >  lib/librte_telemetry/telemetry.c        | 52
> ++++++++++++++++++++++++++++++++-
> >  lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
> >  3 files changed, 80 insertions(+), 2 deletions(-)
> >
> > +
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  /* list of command callbacks, with one command registered by default
> > */  static struct cmd_callback callbacks[TELEMETRY_MAX_CALLBACKS];
> >  static int num_callbacks; /* How many commands are registered */
> >  /* Used when accessing or modifying list of command callbacks */
> > static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;  static
> > uint16_t v2_clients;
> > +int
> Remove 'int'
> 

OK.

> > +#endif
> >
> >  int
> >  rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const
> > char *help)  {
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> > +
> >  	int i = 0;
> >
> >  	if (strlen(cmd) >= MAX_CMD_LEN || fn == NULL || cmd[0] != '/'
> > @@ -76,8 +98,19 @@ rte_telemetry_register_cmd(const char *cmd,
> telemetry_cb fn, const char *help)
> >  	rte_spinlock_unlock(&callback_sl);
> >
> >  	return 0;
> > +
> > +#else
> > +
> > +	RTE_SET_USED(cmd);
> > +	RTE_SET_USED(fn);
> > +	RTE_SET_USED(help);
> > +
> > +	return 0;
> > +
> > +#endif
> Maybe add a comment like /* RTE_EXEC_ENV_WINDOWS */ next to each
> #else/#endif, to be easier to follow what's being guarded out. Your guards are
> rather small, so it's easy to follow, but sometimes when big chunks of code are
> being guarded, it's harder to tell what the guard was for (e.g. line 446 it's the end
> of a big #ifdef/#endif).

Ok, I'll send a new patch soon.

> >  }
> >
> > +#ifndef RTE_EXEC_ENV_WINDOWS

^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v4 0/5] compiling ethdev lib under windows
  2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
                   ` (6 preceding siblings ...)
  2020-08-03 10:38 ` [dpdk-dev] [PATCH v3 " Fady Bader
@ 2020-08-04  6:29 ` Fady Bader
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 1/5] eal: added interrupts empty stubs Fady Bader
                     ` (4 more replies)
  2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
  2020-09-10 23:50 ` [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows Thomas Monjalon
  9 siblings, 5 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-04  6:29 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Added needed changes in order to get ethdev compiling under windows.

Depends-on: series-10382 ("compile librte_net for windows")

v4: added comments to #else and fixed code issue.

v3: rebased on current master, added more exports to export list

v2: fixed logging issue in telemetry lib.

Fady Bader (5):
  eal: added interrupts empty stubs
  eal: updated export list for Windows
  ethdev: remove structs from export list
  telemetry: implement empty stubs for Windows
  ethdev: compiling ethdev under Windows

 lib/librte_eal/rte_eal_exports.def       | 11 +++++++
 lib/librte_eal/windows/eal_interrupts.c  | 17 +++++++++++
 lib/librte_eal/windows/meson.build       |  1 +
 lib/librte_ethdev/rte_ethdev_version.map |  2 --
 lib/librte_telemetry/rte_telemetry.h     |  4 +++
 lib/librte_telemetry/telemetry.c         | 51 +++++++++++++++++++++++++++++++-
 lib/librte_telemetry/telemetry_legacy.c  | 26 +++++++++++++++-
 lib/meson.build                          |  3 +-
 8 files changed, 110 insertions(+), 5 deletions(-)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v4 1/5] eal: added interrupts empty stubs
  2020-08-04  6:29 ` [dpdk-dev] [PATCH v4 0/5] compiling ethdev lib under windows Fady Bader
@ 2020-08-04  6:29   ` Fady Bader
  2020-08-04 18:45     ` Narcisa Ana Maria Vasile
  2020-08-04 23:43     ` Dmitry Kozlyuk
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 2/5] eal: updated export list for Windows Fady Bader
                     ` (3 subsequent siblings)
  4 siblings, 2 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-04  6:29 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

The ethdev lib uses interrupts. Interrupts are not implemented for Windows.
To solve this, empty interrupt stubs were added under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/windows/eal_interrupts.c | 17 +++++++++++++++++
 lib/librte_eal/windows/meson.build      |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
new file mode 100644
index 0000000000..1e3c6d20d2
--- /dev/null
+++ b/lib/librte_eal/windows/eal_interrupts.c
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+#include <rte_interrupts.h>
+
+int
+rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
+		int epfd, int op, unsigned int vec, void *data)
+{
+	RTE_SET_USED(intr_handle);
+	RTE_SET_USED(epfd);
+	RTE_SET_USED(op);
+	RTE_SET_USED(vec);
+	RTE_SET_USED(data);
+
+	return -ENOTSUP;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 08c888e018..c5a19648d6 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -17,6 +17,7 @@ sources += files(
 	'eal_timer.c',
 	'fnmatch.c',
 	'getopt.c',
+	'eal_interrupts.c',
 )
 
 dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v4 2/5] eal: updated export list for Windows
  2020-08-04  6:29 ` [dpdk-dev] [PATCH v4 0/5] compiling ethdev lib under windows Fady Bader
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 1/5] eal: added interrupts empty stubs Fady Bader
@ 2020-08-04  6:29   ` Fady Bader
  2020-08-04 18:46     ` Narcisa Ana Maria Vasile
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 3/5] ethdev: remove structs from export list Fady Bader
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 61+ messages in thread
From: Fady Bader @ 2020-08-04  6:29 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Added eal functions used by ethdev lib to the export list under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/rte_eal_exports.def | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 69204a92c6..782e6fc721 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -28,6 +28,7 @@ EXPORTS
 	rte_eal_tailq_register
 	rte_eal_using_phys_addrs
 	rte_free
+	rte_get_tsc_hz
 	rte_hexdump
 	rte_malloc
 	rte_malloc_dump_stats
@@ -145,3 +146,13 @@ EXPORTS
 	rte_mem_map
 	rte_mem_page_size
 	rte_mem_unmap
+
+	rte_class_register
+	rte_devargs_parse
+	rte_class_find_by_name
+	rte_socket_id
+	rte_strerror
+	rte_intr_rx_ctl
+	rte_log_register
+	rte_log_set_level
+	rte_log_register_type_and_pick_level
\ No newline at end of file
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v4 3/5] ethdev: remove structs from export list
  2020-08-04  6:29 ` [dpdk-dev] [PATCH v4 0/5] compiling ethdev lib under windows Fady Bader
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 1/5] eal: added interrupts empty stubs Fady Bader
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 2/5] eal: updated export list for Windows Fady Bader
@ 2020-08-04  6:29   ` Fady Bader
  2020-08-04 18:47     ` Narcisa Ana Maria Vasile
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows Fady Bader
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 5/5] ethdev: compiling ethdev under Windows Fady Bader
  4 siblings, 1 reply; 61+ messages in thread
From: Fady Bader @ 2020-08-04  6:29 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Some ethdev structs were present in ethdev export list.
There structs were removed from the export list.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 1212a17d32..21a2177756 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -89,7 +89,6 @@ DPDK_20.0 {
 	rte_eth_iterator_next;
 	rte_eth_led_off;
 	rte_eth_led_on;
-	rte_eth_link;
 	rte_eth_link_get;
 	rte_eth_link_get_nowait;
 	rte_eth_macaddr_get;
@@ -104,7 +103,6 @@ DPDK_20.0 {
 	rte_eth_rx_queue_setup;
 	rte_eth_set_queue_rate_limit;
 	rte_eth_speed_bitflag;
-	rte_eth_stats;
 	rte_eth_stats_get;
 	rte_eth_stats_reset;
 	rte_eth_timesync_adjust_time;
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows
  2020-08-04  6:29 ` [dpdk-dev] [PATCH v4 0/5] compiling ethdev lib under windows Fady Bader
                     ` (2 preceding siblings ...)
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 3/5] ethdev: remove structs from export list Fady Bader
@ 2020-08-04  6:29   ` Fady Bader
  2020-08-04 18:47     ` Narcisa Ana Maria Vasile
                       ` (2 more replies)
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 5/5] ethdev: compiling ethdev under Windows Fady Bader
  4 siblings, 3 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-04  6:29 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Telemetry didn't compile under Windows.
Empty stubs implementation was added for Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_telemetry/rte_telemetry.h    |  4 +++
 lib/librte_telemetry/telemetry.c        | 51 ++++++++++++++++++++++++++++++++-
 lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
 3 files changed, 79 insertions(+), 2 deletions(-)

diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index d13010b8fb..c3c0e44599 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -5,6 +5,10 @@
 #include <stdint.h>
 #include <rte_compat.h>
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <sched.h>
+#endif
+
 #ifndef _RTE_TELEMETRY_H_
 #define _RTE_TELEMETRY_H_
 
diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
index 0252282735..d794e75e5e 100644
--- a/lib/librte_telemetry/telemetry.c
+++ b/lib/librte_telemetry/telemetry.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2020 Intel Corporation
  */
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <pthread.h>
 #include <sys/socket.h>
@@ -20,6 +20,20 @@
 #include "telemetry_data.h"
 #include "rte_telemetry_legacy.h"
 
+#else /* RTE_EXEC_ENV_WINDOWS */
+
+/* includes for Windows */
+#include <rte_common.h>
+#include <rte_log.h>
+
+#include "rte_telemetry.h"
+#include "telemetry_json.h"
+#include "telemetry_data.h"
+#include "rte_telemetry_legacy.h"
+
+#endif
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 #define MAX_CMD_LEN 56
 #define MAX_HELP_LEN 64
 #define MAX_OUTPUT_LEN (1024 * 16)
@@ -42,17 +56,24 @@ struct socket {
 };
 static struct socket v2_socket; /* socket for v2 telemetry */
 static struct socket v1_socket; /* socket for v1 telemetry */
+#endif
+
 static char telemetry_log_error[1024]; /* Will contain error on init failure */
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* list of command callbacks, with one command registered by default */
 static struct cmd_callback callbacks[TELEMETRY_MAX_CALLBACKS];
 static int num_callbacks; /* How many commands are registered */
 /* Used when accessing or modifying list of command callbacks */
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
 static uint16_t v2_clients;
+#endif
 
 int
 rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	int i = 0;
 
 	if (strlen(cmd) >= MAX_CMD_LEN || fn == NULL || cmd[0] != '/'
@@ -76,8 +97,19 @@ rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 	rte_spinlock_unlock(&callback_sl);
 
 	return 0;
+
+#else /* RTE_EXEC_ENV_WINDOWS */
+
+	RTE_SET_USED(cmd);
+	RTE_SET_USED(fn);
+	RTE_SET_USED(help);
+
+	return 0;
+
+#endif
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 list_commands(const char *cmd __rte_unused, const char *params __rte_unused,
 		struct rte_tel_data *d)
@@ -411,11 +443,14 @@ telemetry_v2_init(const char *runtime_dir, rte_cpuset_t *cpuset)
 
 	return 0;
 }
+#endif
 
 int32_t
 rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		const char **err_str)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	if (telemetry_v2_init(runtime_dir, cpuset) != 0) {
 		*err_str = telemetry_log_error;
 		return -1;
@@ -424,4 +459,18 @@ rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		*err_str = telemetry_log_error;
 	}
 	return 0;
+
+#else /* RTE_EXEC_ENV_WINDOWS */
+
+	RTE_SET_USED(runtime_dir);
+	RTE_SET_USED(cpuset);
+	RTE_SET_USED(err_str);
+
+	snprintf(telemetry_log_error, sizeof(telemetry_log_error),
+		"Telemetry is not supported on Windows.");
+
+	return 0;
+
+#endif
 }
+
diff --git a/lib/librte_telemetry/telemetry_legacy.c b/lib/librte_telemetry/telemetry_legacy.c
index a341fe4ebd..ed2c1cc428 100644
--- a/lib/librte_telemetry/telemetry_legacy.c
+++ b/lib/librte_telemetry/telemetry_legacy.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2020 Intel Corporation
  */
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -15,6 +15,15 @@
 
 #include "rte_telemetry_legacy.h"
 
+#else /* RTE_EXEC_ENV_WINDOWS */
+
+#include <rte_common.h>
+
+#include "rte_telemetry_legacy.h"
+
+#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #define MAX_LEN 128
 #define BUF_SIZE 1024
 #define CLIENTS_UNREG_ACTION "\"action\":2"
@@ -48,12 +57,15 @@ struct json_command callbacks[TELEMETRY_LEGACY_MAX_CALLBACKS] = {
 };
 int num_legacy_callbacks = 1;
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
+#endif
 
 int
 rte_telemetry_legacy_register(const char *cmd,
 		enum rte_telemetry_legacy_data_req data_req,
 		telemetry_legacy_cb fn)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	if (fn == NULL)
 		return -EINVAL;
 	if (num_legacy_callbacks >= (int) RTE_DIM(callbacks))
@@ -71,8 +83,19 @@ rte_telemetry_legacy_register(const char *cmd,
 	rte_spinlock_unlock(&callback_sl);
 
 	return 0;
+
+#else /* RTE_EXEC_ENV_WINDOWS */
+
+	RTE_SET_USED(cmd);
+	RTE_SET_USED(data_req);
+	RTE_SET_USED(fn);
+
+	return 0;
+
+#endif
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 register_client(const char *cmd __rte_unused, const char *params,
 		char *buffer __rte_unused, int buf_len __rte_unused)
@@ -239,3 +262,4 @@ legacy_client_handler(void *sock_id)
 	close(s);
 	return NULL;
 }
+#endif
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v4 5/5] ethdev: compiling ethdev under Windows
  2020-08-04  6:29 ` [dpdk-dev] [PATCH v4 0/5] compiling ethdev lib under windows Fady Bader
                     ` (3 preceding siblings ...)
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows Fady Bader
@ 2020-08-04  6:29   ` Fady Bader
  2020-08-04 18:51     ` Narcisa Ana Maria Vasile
  4 siblings, 1 reply; 61+ messages in thread
From: Fady Bader @ 2020-08-04  6:29 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Compiling needed libraries for ethdev under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/meson.build b/lib/meson.build
index 6bbaf242a9..c145240eb9 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -38,9 +38,10 @@ libraries = [
 if is_windows
 	libraries = [
 		'kvargs',
+		'telemetry',
 		'eal',
 		'ring',
-		'mempool', 'mbuf', 'pci', 'net',
+		'mempool', 'mbuf', 'net', 'meter', 'ethdev', 'pci', # core
 	] # only supported libraries for windows
 endif
 
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 1/5] eal: added interrupts empty stubs
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 1/5] eal: added interrupts empty stubs Fady Bader
@ 2020-08-04 18:45     ` Narcisa Ana Maria Vasile
  2020-08-04 23:43     ` Dmitry Kozlyuk
  1 sibling, 0 replies; 61+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-08-04 18:45 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

On Tue, Aug 04, 2020 at 09:29:43AM +0300, Fady Bader wrote:
> The ethdev lib uses interrupts. Interrupts are not implemented for Windows.
> To solve this, empty interrupt stubs were added under Windows.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  lib/librte_eal/windows/eal_interrupts.c | 17 +++++++++++++++++
>  lib/librte_eal/windows/meson.build      |  1 +
>  2 files changed, 18 insertions(+)
>  create mode 100644 lib/librte_eal/windows/eal_interrupts.c
> 
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 2/5] eal: updated export list for Windows
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 2/5] eal: updated export list for Windows Fady Bader
@ 2020-08-04 18:46     ` Narcisa Ana Maria Vasile
  0 siblings, 0 replies; 61+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-08-04 18:46 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

On Tue, Aug 04, 2020 at 09:29:44AM +0300, Fady Bader wrote:
> Added eal functions used by ethdev lib to the export list under Windows.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  lib/librte_eal/rte_eal_exports.def | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 3/5] ethdev: remove structs from export list
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 3/5] ethdev: remove structs from export list Fady Bader
@ 2020-08-04 18:47     ` Narcisa Ana Maria Vasile
  0 siblings, 0 replies; 61+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-08-04 18:47 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

On Tue, Aug 04, 2020 at 09:29:45AM +0300, Fady Bader wrote:
> Some ethdev structs were present in ethdev export list.
> There structs were removed from the export list.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  lib/librte_ethdev/rte_ethdev_version.map | 2 --
>  1 file changed, 2 deletions(-)
> 
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows Fady Bader
@ 2020-08-04 18:47     ` Narcisa Ana Maria Vasile
  2020-08-04 23:39     ` Dmitry Kozlyuk
  2020-08-05  8:28     ` Thomas Monjalon
  2 siblings, 0 replies; 61+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-08-04 18:47 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

On Tue, Aug 04, 2020 at 09:29:46AM +0300, Fady Bader wrote:
> Telemetry didn't compile under Windows.
> Empty stubs implementation was added for Windows.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  lib/librte_telemetry/rte_telemetry.h    |  4 +++
>  lib/librte_telemetry/telemetry.c        | 51 ++++++++++++++++++++++++++++++++-
>  lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
>  3 files changed, 79 insertions(+), 2 deletions(-)
> 
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 5/5] ethdev: compiling ethdev under Windows
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 5/5] ethdev: compiling ethdev under Windows Fady Bader
@ 2020-08-04 18:51     ` Narcisa Ana Maria Vasile
  0 siblings, 0 replies; 61+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-08-04 18:51 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power

On Tue, Aug 04, 2020 at 09:29:47AM +0300, Fady Bader wrote:
> Compiling needed libraries for ethdev under Windows.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  lib/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows Fady Bader
  2020-08-04 18:47     ` Narcisa Ana Maria Vasile
@ 2020-08-04 23:39     ` Dmitry Kozlyuk
  2020-08-05  8:27       ` Thomas Monjalon
  2020-08-05  8:28     ` Thomas Monjalon
  2 siblings, 1 reply; 61+ messages in thread
From: Dmitry Kozlyuk @ 2020-08-04 23:39 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, harini.ramakrishnan,
	ocardona, pallavi.kadam, ranjit.menon, kevin.laatz, ferruh.yigit,
	arybchenko, ciara.power, navasile

On Tue,  4 Aug 2020 09:29:46 +0300, Fady Bader wrote:
> Telemetry didn't compile under Windows.
> Empty stubs implementation was added for Windows.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  lib/librte_telemetry/rte_telemetry.h    |  4 +++
>  lib/librte_telemetry/telemetry.c        | 51 ++++++++++++++++++++++++++++++++-
>  lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
>  3 files changed, 79 insertions(+), 2 deletions(-)

You could #ifdef code in librte_ethdev that uses librte_telemetry and not
build librte_telemetry at all. This approach is already taken in
eal_common_options.c and it avoids spreading #ifdef throughout telemetry code.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 1/5] eal: added interrupts empty stubs
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 1/5] eal: added interrupts empty stubs Fady Bader
  2020-08-04 18:45     ` Narcisa Ana Maria Vasile
@ 2020-08-04 23:43     ` Dmitry Kozlyuk
  1 sibling, 0 replies; 61+ messages in thread
From: Dmitry Kozlyuk @ 2020-08-04 23:43 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, harini.ramakrishnan,
	ocardona, pallavi.kadam, ranjit.menon, kevin.laatz, ferruh.yigit,
	arybchenko, ciara.power, navasile

On Tue,  4 Aug 2020 09:29:43 +0300, Fady Bader wrote:
[snip]
> diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
> new file mode 100644
> index 0000000000..1e3c6d20d2
> --- /dev/null
> +++ b/lib/librte_eal/windows/eal_interrupts.c
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright 2020 Mellanox Technologies, Ltd
> + */

Blank line is needed here, like in other files.

> +#include <rte_interrupts.h>
[snip]
> diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
> index 08c888e018..c5a19648d6 100644
> --- a/lib/librte_eal/windows/meson.build
> +++ b/lib/librte_eal/windows/meson.build
> @@ -17,6 +17,7 @@ sources += files(
>  	'eal_timer.c',
>  	'fnmatch.c',
>  	'getopt.c',
> +	'eal_interrupts.c',
>  )

Please keep the list sorted.


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows
  2020-08-04 23:39     ` Dmitry Kozlyuk
@ 2020-08-05  8:27       ` Thomas Monjalon
  2020-08-05  8:40         ` Bruce Richardson
  0 siblings, 1 reply; 61+ messages in thread
From: Thomas Monjalon @ 2020-08-05  8:27 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: Fady Bader, dev, tbashar, talshn, yohadt, harini.ramakrishnan,
	ocardona, pallavi.kadam, ranjit.menon, kevin.laatz, ferruh.yigit,
	arybchenko, ciara.power, navasile

05/08/2020 01:39, Dmitry Kozlyuk:
> On Tue,  4 Aug 2020 09:29:46 +0300, Fady Bader wrote:
> > Telemetry didn't compile under Windows.
> > Empty stubs implementation was added for Windows.
> > 
> > Signed-off-by: Fady Bader <fady@mellanox.com>
> > ---
> >  lib/librte_telemetry/rte_telemetry.h    |  4 +++
> >  lib/librte_telemetry/telemetry.c        | 51 ++++++++++++++++++++++++++++++++-
> >  lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
> >  3 files changed, 79 insertions(+), 2 deletions(-)
> 
> You could #ifdef code in librte_ethdev that uses librte_telemetry and not
> build librte_telemetry at all. This approach is already taken in
> eal_common_options.c and it avoids spreading #ifdef throughout telemetry code.

The problem is that telemetry can be used anywhere, not only in ethdev.
I feel it is better to #ifdef telemetry than every telemetry calls.



^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows
  2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows Fady Bader
  2020-08-04 18:47     ` Narcisa Ana Maria Vasile
  2020-08-04 23:39     ` Dmitry Kozlyuk
@ 2020-08-05  8:28     ` Thomas Monjalon
  2 siblings, 0 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-08-05  8:28 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

04/08/2020 08:29, Fady Bader:
> Telemetry didn't compile under Windows.
> Empty stubs implementation was added for Windows.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  lib/librte_telemetry/rte_telemetry.h    |  4 +++
>  lib/librte_telemetry/telemetry.c        | 51 ++++++++++++++++++++++++++++++++-
>  lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
>  3 files changed, 79 insertions(+), 2 deletions(-)

The removed lines are blank lines which should remain.



^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows
  2020-08-05  8:27       ` Thomas Monjalon
@ 2020-08-05  8:40         ` Bruce Richardson
  2020-08-05  9:06           ` Thomas Monjalon
  0 siblings, 1 reply; 61+ messages in thread
From: Bruce Richardson @ 2020-08-05  8:40 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Dmitry Kozlyuk, Fady Bader, dev, tbashar, talshn, yohadt,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

On Wed, Aug 05, 2020 at 10:27:27AM +0200, Thomas Monjalon wrote:
> 05/08/2020 01:39, Dmitry Kozlyuk:
> > On Tue,  4 Aug 2020 09:29:46 +0300, Fady Bader wrote:
> > > Telemetry didn't compile under Windows.
> > > Empty stubs implementation was added for Windows.
> > > 
> > > Signed-off-by: Fady Bader <fady@mellanox.com>
> > > ---
> > >  lib/librte_telemetry/rte_telemetry.h    |  4 +++
> > >  lib/librte_telemetry/telemetry.c        | 51 ++++++++++++++++++++++++++++++++-
> > >  lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
> > >  3 files changed, 79 insertions(+), 2 deletions(-)
> > 
> > You could #ifdef code in librte_ethdev that uses librte_telemetry and not
> > build librte_telemetry at all. This approach is already taken in
> > eal_common_options.c and it avoids spreading #ifdef throughout telemetry code.
> 
> The problem is that telemetry can be used anywhere, not only in ethdev.
> I feel it is better to #ifdef telemetry than every telemetry calls.
> 
Given that the majority of telemetry has no external dependencies (jansson
is only used for the older compatibility part), and it uses sockets for
communication, is there a reason why it can't just be made to build and
work on windows? The unix domain socket could be converted to a standard
UDP socket on localhost, perhaps. Is there anything unix-specific beyond
that?

/Bruce

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows
  2020-08-05  8:40         ` Bruce Richardson
@ 2020-08-05  9:06           ` Thomas Monjalon
  2020-08-05 10:02             ` Bruce Richardson
  0 siblings, 1 reply; 61+ messages in thread
From: Thomas Monjalon @ 2020-08-05  9:06 UTC (permalink / raw)
  To: Bruce Richardson, kevin.laatz, ciara.power
  Cc: Dmitry Kozlyuk, Fady Bader, dev, tbashar, talshn, yohadt,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	ferruh.yigit, arybchenko, navasile

05/08/2020 10:40, Bruce Richardson:
> On Wed, Aug 05, 2020 at 10:27:27AM +0200, Thomas Monjalon wrote:
> > 05/08/2020 01:39, Dmitry Kozlyuk:
> > > On Tue,  4 Aug 2020 09:29:46 +0300, Fady Bader wrote:
> > > > Telemetry didn't compile under Windows.
> > > > Empty stubs implementation was added for Windows.
> > > > 
> > > > Signed-off-by: Fady Bader <fady@mellanox.com>
> > > > ---
> > > >  lib/librte_telemetry/rte_telemetry.h    |  4 +++
> > > >  lib/librte_telemetry/telemetry.c        | 51 ++++++++++++++++++++++++++++++++-
> > > >  lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
> > > >  3 files changed, 79 insertions(+), 2 deletions(-)
> > > 
> > > You could #ifdef code in librte_ethdev that uses librte_telemetry and not
> > > build librte_telemetry at all. This approach is already taken in
> > > eal_common_options.c and it avoids spreading #ifdef throughout telemetry code.
> > 
> > The problem is that telemetry can be used anywhere, not only in ethdev.
> > I feel it is better to #ifdef telemetry than every telemetry calls.
> > 
> Given that the majority of telemetry has no external dependencies (jansson
> is only used for the older compatibility part), and it uses sockets for
> communication, is there a reason why it can't just be made to build and
> work on windows? The unix domain socket could be converted to a standard
> UDP socket on localhost, perhaps. Is there anything unix-specific beyond
> that?

Yes of course telemetry should build on Windows.
But it seems nobody committed yet to work on it.
Feel free :)



^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows
  2020-08-05  9:06           ` Thomas Monjalon
@ 2020-08-05 10:02             ` Bruce Richardson
  0 siblings, 0 replies; 61+ messages in thread
From: Bruce Richardson @ 2020-08-05 10:02 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: kevin.laatz, ciara.power, Dmitry Kozlyuk, Fady Bader, dev,
	tbashar, talshn, yohadt, harini.ramakrishnan, ocardona,
	pallavi.kadam, ranjit.menon, ferruh.yigit, arybchenko, navasile

On Wed, Aug 05, 2020 at 11:06:04AM +0200, Thomas Monjalon wrote:
> 05/08/2020 10:40, Bruce Richardson:
> > On Wed, Aug 05, 2020 at 10:27:27AM +0200, Thomas Monjalon wrote:
> > > 05/08/2020 01:39, Dmitry Kozlyuk:
> > > > On Tue,  4 Aug 2020 09:29:46 +0300, Fady Bader wrote:
> > > > > Telemetry didn't compile under Windows.
> > > > > Empty stubs implementation was added for Windows.
> > > > > 
> > > > > Signed-off-by: Fady Bader <fady@mellanox.com>
> > > > > ---
> > > > >  lib/librte_telemetry/rte_telemetry.h    |  4 +++
> > > > >  lib/librte_telemetry/telemetry.c        | 51 ++++++++++++++++++++++++++++++++-
> > > > >  lib/librte_telemetry/telemetry_legacy.c | 26 ++++++++++++++++-
> > > > >  3 files changed, 79 insertions(+), 2 deletions(-)
> > > > 
> > > > You could #ifdef code in librte_ethdev that uses librte_telemetry and not
> > > > build librte_telemetry at all. This approach is already taken in
> > > > eal_common_options.c and it avoids spreading #ifdef throughout telemetry code.
> > > 
> > > The problem is that telemetry can be used anywhere, not only in ethdev.
> > > I feel it is better to #ifdef telemetry than every telemetry calls.
> > > 
> > Given that the majority of telemetry has no external dependencies (jansson
> > is only used for the older compatibility part), and it uses sockets for
> > communication, is there a reason why it can't just be made to build and
> > work on windows? The unix domain socket could be converted to a standard
> > UDP socket on localhost, perhaps. Is there anything unix-specific beyond
> > that?
> 
> Yes of course telemetry should build on Windows.
> But it seems nobody committed yet to work on it.
> Feel free :)

Thanks, I might give it a go sometime if I have the chance. However, I was
mainly just checking that there was no known serious impediment to having
it work.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows
  2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
                   ` (7 preceding siblings ...)
  2020-08-04  6:29 ` [dpdk-dev] [PATCH v4 0/5] compiling ethdev lib under windows Fady Bader
@ 2020-08-11  6:24 ` Fady Bader
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 1/5] eal: added interrupts empty stubs Fady Bader
                     ` (7 more replies)
  2020-09-10 23:50 ` [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows Thomas Monjalon
  9 siblings, 8 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-11  6:24 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Added needed changes in order to get ethdev compiling under windows.

Depends-on: series-10382 ("compile librte_net for windows")

v5: fixed style issues.

v4: added comments to #else and fixed code issue.

v3: rebased on current master, added more exports to export list

v2: fixed logging issue in telemetry lib.

Fady Bader (5):
  eal: added interrupts empty stubs
  eal: updated export list for Windows
  ethdev: remove structs from export list
  telemetry: implement empty stubs for Windows
  ethdev: compiling ethdev under Windows

 lib/librte_eal/rte_eal_exports.def       | 11 +++++++
 lib/librte_eal/windows/eal_interrupts.c  | 18 ++++++++++++
 lib/librte_eal/windows/meson.build       |  1 +
 lib/librte_ethdev/rte_ethdev_version.map |  2 --
 lib/librte_telemetry/rte_telemetry.h     |  4 +++
 lib/librte_telemetry/telemetry.c         | 50 ++++++++++++++++++++++++++++++++
 lib/librte_telemetry/telemetry_legacy.c  | 25 ++++++++++++++++
 lib/meson.build                          |  3 +-
 8 files changed, 111 insertions(+), 3 deletions(-)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v5 1/5] eal: added interrupts empty stubs
  2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
@ 2020-08-11  6:24   ` Fady Bader
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 2/5] eal: updated export list for Windows Fady Bader
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-11  6:24 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

The ethdev lib uses interrupts. Interrupts are not implemented for Windows.
To solve this, empty interrupt stubs were added under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/windows/eal_interrupts.c | 18 ++++++++++++++++++
 lib/librte_eal/windows/meson.build      |  1 +
 2 files changed, 19 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
new file mode 100644
index 0000000000..309e851493
--- /dev/null
+++ b/lib/librte_eal/windows/eal_interrupts.c
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+
+#include <rte_interrupts.h>
+
+int
+rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
+		int epfd, int op, unsigned int vec, void *data)
+{
+	RTE_SET_USED(intr_handle);
+	RTE_SET_USED(epfd);
+	RTE_SET_USED(op);
+	RTE_SET_USED(vec);
+	RTE_SET_USED(data);
+
+	return -ENOTSUP;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 08c888e018..b690bc6b0a 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -8,6 +8,7 @@ sources += files(
 	'eal_debug.c',
 	'eal_file.c',
 	'eal_hugepages.c',
+	'eal_interrupts.c',
 	'eal_lcore.c',
 	'eal_log.c',
 	'eal_memalloc.c',
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v5 2/5] eal: updated export list for Windows
  2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 1/5] eal: added interrupts empty stubs Fady Bader
@ 2020-08-11  6:24   ` Fady Bader
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 3/5] ethdev: remove structs from export list Fady Bader
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-11  6:24 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Added eal functions used by ethdev lib to the export list under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_eal/rte_eal_exports.def | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 69204a92c6..782e6fc721 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -28,6 +28,7 @@ EXPORTS
 	rte_eal_tailq_register
 	rte_eal_using_phys_addrs
 	rte_free
+	rte_get_tsc_hz
 	rte_hexdump
 	rte_malloc
 	rte_malloc_dump_stats
@@ -145,3 +146,13 @@ EXPORTS
 	rte_mem_map
 	rte_mem_page_size
 	rte_mem_unmap
+
+	rte_class_register
+	rte_devargs_parse
+	rte_class_find_by_name
+	rte_socket_id
+	rte_strerror
+	rte_intr_rx_ctl
+	rte_log_register
+	rte_log_set_level
+	rte_log_register_type_and_pick_level
\ No newline at end of file
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v5 3/5] ethdev: remove structs from export list
  2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 1/5] eal: added interrupts empty stubs Fady Bader
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 2/5] eal: updated export list for Windows Fady Bader
@ 2020-08-11  6:24   ` Fady Bader
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 4/5] telemetry: implement empty stubs for Windows Fady Bader
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-11  6:24 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Some ethdev structs were present in ethdev export list.
There structs were removed from the export list.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 1212a17d32..21a2177756 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -89,7 +89,6 @@ DPDK_20.0 {
 	rte_eth_iterator_next;
 	rte_eth_led_off;
 	rte_eth_led_on;
-	rte_eth_link;
 	rte_eth_link_get;
 	rte_eth_link_get_nowait;
 	rte_eth_macaddr_get;
@@ -104,7 +103,6 @@ DPDK_20.0 {
 	rte_eth_rx_queue_setup;
 	rte_eth_set_queue_rate_limit;
 	rte_eth_speed_bitflag;
-	rte_eth_stats;
 	rte_eth_stats_get;
 	rte_eth_stats_reset;
 	rte_eth_timesync_adjust_time;
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v5 4/5] telemetry: implement empty stubs for Windows
  2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
                     ` (2 preceding siblings ...)
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 3/5] ethdev: remove structs from export list Fady Bader
@ 2020-08-11  6:24   ` Fady Bader
  2020-09-10 23:35     ` Thomas Monjalon
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 5/5] ethdev: compiling ethdev under Windows Fady Bader
                     ` (3 subsequent siblings)
  7 siblings, 1 reply; 61+ messages in thread
From: Fady Bader @ 2020-08-11  6:24 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Telemetry didn't compile under Windows.
Empty stubs implementation was added for Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_telemetry/rte_telemetry.h    |  4 +++
 lib/librte_telemetry/telemetry.c        | 50 +++++++++++++++++++++++++++++++++
 lib/librte_telemetry/telemetry_legacy.c | 25 +++++++++++++++++
 3 files changed, 79 insertions(+)

diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index d13010b8fb..c3c0e44599 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -5,6 +5,10 @@
 #include <stdint.h>
 #include <rte_compat.h>
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <sched.h>
+#endif
+
 #ifndef _RTE_TELEMETRY_H_
 #define _RTE_TELEMETRY_H_
 
diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
index 0252282735..59ad9cc7ec 100644
--- a/lib/librte_telemetry/telemetry.c
+++ b/lib/librte_telemetry/telemetry.c
@@ -2,6 +2,7 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <pthread.h>
 #include <sys/socket.h>
@@ -20,6 +21,20 @@
 #include "telemetry_data.h"
 #include "rte_telemetry_legacy.h"
 
+#else /* RTE_EXEC_ENV_WINDOWS */
+
+/* includes for Windows */
+#include <rte_common.h>
+#include <rte_log.h>
+
+#include "rte_telemetry.h"
+#include "telemetry_json.h"
+#include "telemetry_data.h"
+#include "rte_telemetry_legacy.h"
+
+#endif
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 #define MAX_CMD_LEN 56
 #define MAX_HELP_LEN 64
 #define MAX_OUTPUT_LEN (1024 * 16)
@@ -42,17 +57,24 @@ struct socket {
 };
 static struct socket v2_socket; /* socket for v2 telemetry */
 static struct socket v1_socket; /* socket for v1 telemetry */
+#endif
+
 static char telemetry_log_error[1024]; /* Will contain error on init failure */
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* list of command callbacks, with one command registered by default */
 static struct cmd_callback callbacks[TELEMETRY_MAX_CALLBACKS];
 static int num_callbacks; /* How many commands are registered */
 /* Used when accessing or modifying list of command callbacks */
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
 static uint16_t v2_clients;
+#endif
 
 int
 rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	int i = 0;
 
 	if (strlen(cmd) >= MAX_CMD_LEN || fn == NULL || cmd[0] != '/'
@@ -76,8 +98,19 @@ rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 	rte_spinlock_unlock(&callback_sl);
 
 	return 0;
+
+#else /* RTE_EXEC_ENV_WINDOWS */
+
+	RTE_SET_USED(cmd);
+	RTE_SET_USED(fn);
+	RTE_SET_USED(help);
+
+	return 0;
+
+#endif
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 list_commands(const char *cmd __rte_unused, const char *params __rte_unused,
 		struct rte_tel_data *d)
@@ -411,11 +444,14 @@ telemetry_v2_init(const char *runtime_dir, rte_cpuset_t *cpuset)
 
 	return 0;
 }
+#endif
 
 int32_t
 rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		const char **err_str)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	if (telemetry_v2_init(runtime_dir, cpuset) != 0) {
 		*err_str = telemetry_log_error;
 		return -1;
@@ -424,4 +460,18 @@ rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		*err_str = telemetry_log_error;
 	}
 	return 0;
+
+#else /* RTE_EXEC_ENV_WINDOWS */
+
+	RTE_SET_USED(runtime_dir);
+	RTE_SET_USED(cpuset);
+	RTE_SET_USED(err_str);
+
+	snprintf(telemetry_log_error, sizeof(telemetry_log_error),
+		"Telemetry is not supported on Windows.");
+
+	return 0;
+
+#endif
 }
+
diff --git a/lib/librte_telemetry/telemetry_legacy.c b/lib/librte_telemetry/telemetry_legacy.c
index a341fe4ebd..40e7bbe2f8 100644
--- a/lib/librte_telemetry/telemetry_legacy.c
+++ b/lib/librte_telemetry/telemetry_legacy.c
@@ -2,6 +2,7 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -15,6 +16,15 @@
 
 #include "rte_telemetry_legacy.h"
 
+#else /* RTE_EXEC_ENV_WINDOWS */
+
+#include <rte_common.h>
+
+#include "rte_telemetry_legacy.h"
+
+#endif
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #define MAX_LEN 128
 #define BUF_SIZE 1024
 #define CLIENTS_UNREG_ACTION "\"action\":2"
@@ -48,12 +58,15 @@ struct json_command callbacks[TELEMETRY_LEGACY_MAX_CALLBACKS] = {
 };
 int num_legacy_callbacks = 1;
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
+#endif
 
 int
 rte_telemetry_legacy_register(const char *cmd,
 		enum rte_telemetry_legacy_data_req data_req,
 		telemetry_legacy_cb fn)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 	if (fn == NULL)
 		return -EINVAL;
 	if (num_legacy_callbacks >= (int) RTE_DIM(callbacks))
@@ -71,8 +84,19 @@ rte_telemetry_legacy_register(const char *cmd,
 	rte_spinlock_unlock(&callback_sl);
 
 	return 0;
+
+#else /* RTE_EXEC_ENV_WINDOWS */
+
+	RTE_SET_USED(cmd);
+	RTE_SET_USED(data_req);
+	RTE_SET_USED(fn);
+
+	return 0;
+
+#endif
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static int
 register_client(const char *cmd __rte_unused, const char *params,
 		char *buffer __rte_unused, int buf_len __rte_unused)
@@ -239,3 +263,4 @@ legacy_client_handler(void *sock_id)
 	close(s);
 	return NULL;
 }
+#endif
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v5 5/5] ethdev: compiling ethdev under Windows
  2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
                     ` (3 preceding siblings ...)
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 4/5] telemetry: implement empty stubs for Windows Fady Bader
@ 2020-08-11  6:24   ` Fady Bader
  2020-08-13  7:02   ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Thomas Monjalon
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 61+ messages in thread
From: Fady Bader @ 2020-08-11  6:24 UTC (permalink / raw)
  To: dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

Compiling needed libraries for ethdev under Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/meson.build b/lib/meson.build
index 6bbaf242a9..c145240eb9 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -38,9 +38,10 @@ libraries = [
 if is_windows
 	libraries = [
 		'kvargs',
+		'telemetry',
 		'eal',
 		'ring',
-		'mempool', 'mbuf', 'pci', 'net',
+		'mempool', 'mbuf', 'net', 'meter', 'ethdev', 'pci', # core
 	] # only supported libraries for windows
 endif
 
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows
  2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
                     ` (4 preceding siblings ...)
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 5/5] ethdev: compiling ethdev under Windows Fady Bader
@ 2020-08-13  7:02   ` Thomas Monjalon
  2020-08-18 16:13   ` Dmitry Kozlyuk
  2020-08-20 21:40   ` Ranjit Menon
  7 siblings, 0 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-08-13  7:02 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

You got some acks in previous versions which should be reported in this patchset,
otherwise they are lost.


11/08/2020 08:24, Fady Bader:
> Added needed changes in order to get ethdev compiling under windows.
> 
> Depends-on: series-10382 ("compile librte_net for windows")
> 
> v5: fixed style issues.
> 
> v4: added comments to #else and fixed code issue.
> 
> v3: rebased on current master, added more exports to export list
> 
> v2: fixed logging issue in telemetry lib.
> 
> Fady Bader (5):
>   eal: added interrupts empty stubs
>   eal: updated export list for Windows
>   ethdev: remove structs from export list
>   telemetry: implement empty stubs for Windows
>   ethdev: compiling ethdev under Windows
> 
>  lib/librte_eal/rte_eal_exports.def       | 11 +++++++
>  lib/librte_eal/windows/eal_interrupts.c  | 18 ++++++++++++
>  lib/librte_eal/windows/meson.build       |  1 +
>  lib/librte_ethdev/rte_ethdev_version.map |  2 --
>  lib/librte_telemetry/rte_telemetry.h     |  4 +++
>  lib/librte_telemetry/telemetry.c         | 50 ++++++++++++++++++++++++++++++++
>  lib/librte_telemetry/telemetry_legacy.c  | 25 ++++++++++++++++
>  lib/meson.build                          |  3 +-
>  8 files changed, 111 insertions(+), 3 deletions(-)
>  create mode 100644 lib/librte_eal/windows/eal_interrupts.c
> 
> 






^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows
  2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
                     ` (5 preceding siblings ...)
  2020-08-13  7:02   ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Thomas Monjalon
@ 2020-08-18 16:13   ` Dmitry Kozlyuk
  2020-08-20 21:40   ` Ranjit Menon
  7 siblings, 0 replies; 61+ messages in thread
From: Dmitry Kozlyuk @ 2020-08-18 16:13 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, thomas, tbashar, talshn, yohadt, harini.ramakrishnan,
	ocardona, pallavi.kadam, ranjit.menon, kevin.laatz, ferruh.yigit,
	arybchenko, ciara.power, navasile

On Tue, 11 Aug 2020 09:24:19 +0300, Fady Bader wrote:
> Added needed changes in order to get ethdev compiling under windows.
> 
> Depends-on: series-10382 ("compile librte_net for windows")
> 
> v5: fixed style issues.
> 
> v4: added comments to #else and fixed code issue.
> 
> v3: rebased on current master, added more exports to export list
> 
> v2: fixed logging issue in telemetry lib.
> 
> Fady Bader (5):
>   eal: added interrupts empty stubs
>   eal: updated export list for Windows
>   ethdev: remove structs from export list
>   telemetry: implement empty stubs for Windows
>   ethdev: compiling ethdev under Windows
> 
>  lib/librte_eal/rte_eal_exports.def       | 11 +++++++
>  lib/librte_eal/windows/eal_interrupts.c  | 18 ++++++++++++
>  lib/librte_eal/windows/meson.build       |  1 +
>  lib/librte_ethdev/rte_ethdev_version.map |  2 --
>  lib/librte_telemetry/rte_telemetry.h     |  4 +++
>  lib/librte_telemetry/telemetry.c         | 50 ++++++++++++++++++++++++++++++++
>  lib/librte_telemetry/telemetry_legacy.c  | 25 ++++++++++++++++
>  lib/meson.build                          |  3 +-
>  8 files changed, 111 insertions(+), 3 deletions(-)
>  create mode 100644 lib/librte_eal/windows/eal_interrupts.c
> 

Series-acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows
  2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
                     ` (6 preceding siblings ...)
  2020-08-18 16:13   ` Dmitry Kozlyuk
@ 2020-08-20 21:40   ` Ranjit Menon
  7 siblings, 0 replies; 61+ messages in thread
From: Ranjit Menon @ 2020-08-20 21:40 UTC (permalink / raw)
  To: Fady Bader, dev
  Cc: thomas, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, kevin.laatz,
	ferruh.yigit, arybchenko, ciara.power, navasile


On 8/10/2020 11:24 PM, Fady Bader wrote:
> Added needed changes in order to get ethdev compiling under windows.
>
> Depends-on: series-10382 ("compile librte_net for windows")
>
> v5: fixed style issues.
>
> v4: added comments to #else and fixed code issue.
>
> v3: rebased on current master, added more exports to export list
>
> v2: fixed logging issue in telemetry lib.
>
> Fady Bader (5):
>    eal: added interrupts empty stubs
>    eal: updated export list for Windows
>    ethdev: remove structs from export list
>    telemetry: implement empty stubs for Windows
>    ethdev: compiling ethdev under Windows
>
>   lib/librte_eal/rte_eal_exports.def       | 11 +++++++
>   lib/librte_eal/windows/eal_interrupts.c  | 18 ++++++++++++
>   lib/librte_eal/windows/meson.build       |  1 +
>   lib/librte_ethdev/rte_ethdev_version.map |  2 --
>   lib/librte_telemetry/rte_telemetry.h     |  4 +++
>   lib/librte_telemetry/telemetry.c         | 50 ++++++++++++++++++++++++++++++++
>   lib/librte_telemetry/telemetry_legacy.c  | 25 ++++++++++++++++
>   lib/meson.build                          |  3 +-
>   8 files changed, 111 insertions(+), 3 deletions(-)
>   create mode 100644 lib/librte_eal/windows/eal_interrupts.c


Acked-by: Ranjit Menon <ranjit.menon@intel.com>


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v5 4/5] telemetry: implement empty stubs for Windows
  2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 4/5] telemetry: implement empty stubs for Windows Fady Bader
@ 2020-09-10 23:35     ` Thomas Monjalon
  0 siblings, 0 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-09-10 23:35 UTC (permalink / raw)
  To: Fady Bader
  Cc: dev, tbashar, talshn, yohadt, dmitry.kozliuk,
	harini.ramakrishnan, ocardona, pallavi.kadam, ranjit.menon,
	kevin.laatz, ferruh.yigit, arybchenko, ciara.power, navasile

> --- a/lib/librte_telemetry/rte_telemetry.h
> +++ b/lib/librte_telemetry/rte_telemetry.h
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +#include <sched.h>
> +#endif

I don't think sched.h is required only for Windows.
It happens to be already included in Linux build,
but there is no good reason for the #ifdef above.
I'll drop the #ifdef.

In the rest of the patch, we can avoid duplicating some includes
and keep register functions untouched.



^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows
  2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
                   ` (8 preceding siblings ...)
  2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
@ 2020-09-10 23:50 ` Thomas Monjalon
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 1/5] eal/windows: add stub for Rx interrupt control Thomas Monjalon
                     ` (5 more replies)
  9 siblings, 6 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-09-10 23:50 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, bruce.richardson

This is based on v5 of Fady's work.
I've reworked a bit to minimize the number of changed lines,
and did some rewording.

Fady Bader (5):
  eal/windows: add stub for Rx interrupt control
  eal/windows: update symbols export
  telemetry: build stubs for Windows
  ethdev: remove structs from export map
  ethdev: build on Windows

 lib/librte_eal/rte_eal_exports.def       | 22 ++++++++++++++--------
 lib/librte_eal/windows/eal_interrupts.c  | 13 +++++++++++++
 lib/librte_eal/windows/meson.build       |  1 +
 lib/librte_ethdev/rte_ethdev_version.map |  2 --
 lib/librte_telemetry/rte_telemetry.h     |  1 +
 lib/librte_telemetry/telemetry.c         | 22 ++++++++++++++++++++++
 lib/librte_telemetry/telemetry_legacy.c  | 11 ++++++++++-
 lib/meson.build                          |  3 ++-
 8 files changed, 63 insertions(+), 12 deletions(-)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

-- 
2.28.0


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v6 1/5] eal/windows: add stub for Rx interrupt control
  2020-09-10 23:50 ` [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows Thomas Monjalon
@ 2020-09-10 23:50   ` Thomas Monjalon
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 2/5] eal/windows: update symbols export Thomas Monjalon
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-09-10 23:50 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, bruce.richardson, Fady Bader, Narcisa Vasile,
	Dmitry Kozlyuk, Ranjit Menon, Dmitry Malloy, Pallavi Kadam,
	Harman Kalra

From: Fady Bader <fady@mellanox.com>

Interrupts are not implemented for Windows.
In order to compile ethdev on Windows,
an empty interrupt control function stub has to be added for Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/rte_eal_exports.def      |  1 +
 lib/librte_eal/windows/eal_interrupts.c | 13 +++++++++++++
 lib/librte_eal/windows/meson.build      |  1 +
 3 files changed, 15 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_interrupts.c

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index f54ed74a58..1d4d3fb365 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -30,6 +30,7 @@ EXPORTS
 	rte_eal_using_phys_addrs
 	rte_free
 	rte_hexdump
+	rte_intr_rx_ctl
 	rte_log_register
 	rte_log_register_type_and_pick_level
 	rte_log_set_level
diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
new file mode 100644
index 0000000000..d3ecdaccbc
--- /dev/null
+++ b/lib/librte_eal/windows/eal_interrupts.c
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+
+#include <rte_interrupts.h>
+
+int
+rte_intr_rx_ctl(__rte_unused struct rte_intr_handle *intr_handle,
+		__rte_unused int epfd, __rte_unused int op,
+		__rte_unused unsigned int vec, __rte_unused void *data)
+{
+	return -ENOTSUP;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 08c888e018..b690bc6b0a 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -8,6 +8,7 @@ sources += files(
 	'eal_debug.c',
 	'eal_file.c',
 	'eal_hugepages.c',
+	'eal_interrupts.c',
 	'eal_lcore.c',
 	'eal_log.c',
 	'eal_memalloc.c',
-- 
2.28.0


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v6 2/5] eal/windows: update symbols export
  2020-09-10 23:50 ` [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows Thomas Monjalon
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 1/5] eal/windows: add stub for Rx interrupt control Thomas Monjalon
@ 2020-09-10 23:50   ` Thomas Monjalon
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 3/5] telemetry: build stubs for Windows Thomas Monjalon
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-09-10 23:50 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, bruce.richardson, Fady Bader, Narcisa Vasile,
	Dmitry Kozlyuk, Ranjit Menon, Dmitry Malloy, Pallavi Kadam

From: Fady Bader <fady@mellanox.com>

The .def file is a reduced copy of the .map file.
In order to ease comparison, some lines are moved in the .def file
to be in the same order as in the .map file.

rte_eal_get_configuration is removed because it has been removed
from the .map file in DPDK 19.11.
Note: it had been removed and re-added by mistake in 20.08 .def file.

Few functions are added in the .def file to allow ethdev on Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/rte_eal_exports.def | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 1d4d3fb365..cda3e0c79f 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -1,20 +1,16 @@
 EXPORTS
 	__rte_panic
-	__rte_trace_mem_per_thread_alloc
-	__rte_trace_point_emit_field
-	__rte_trace_point_register
 	per_lcore__lcore_id
 	per_lcore__rte_errno
-	per_lcore_trace_mem
-	per_lcore_trace_point_sz
+	per_lcore__thread_id
+	rte_bus_register
 	rte_calloc
 	rte_calloc_socket
-	rte_bus_register
 	rte_dev_is_probed
 	rte_devargs_insert
 	rte_devargs_next
+	rte_devargs_parse
 	rte_devargs_remove
-	rte_eal_get_configuration
 	rte_eal_has_hugepages
 	rte_eal_has_pci
 	rte_eal_init
@@ -29,10 +25,10 @@ EXPORTS
 	rte_eal_tailq_register
 	rte_eal_using_phys_addrs
 	rte_free
+	rte_get_tsc_hz
 	rte_hexdump
 	rte_intr_rx_ctl
 	rte_log_register
-	rte_log_register_type_and_pick_level
 	rte_log_set_level
 	rte_malloc
 	rte_malloc_dump_stats
@@ -65,6 +61,7 @@ EXPORTS
 	rte_memzone_reserve_aligned
 	rte_memzone_reserve_bounded
 	rte_memzone_walk
+	rte_socket_id
 	rte_strerror
 	rte_strsplit
 	rte_sys_gettid
@@ -97,6 +94,7 @@ EXPORTS
 	rte_fbarray_is_used
 	rte_fbarray_set_free
 	rte_fbarray_set_used
+	rte_log_register_type_and_pick_level
 	rte_malloc_dump_heaps
 	rte_mem_alloc_validator_register
 	rte_mem_alloc_validator_unregister
@@ -112,6 +110,8 @@ EXPORTS
 	rte_mp_request_async
 	rte_mp_request_sync
 
+	rte_class_find_by_name
+	rte_class_register;
 	rte_fbarray_find_prev_free
 	rte_fbarray_find_prev_n_free
 	rte_fbarray_find_prev_n_used
@@ -146,6 +146,11 @@ EXPORTS
 	rte_fbarray_find_biggest_used
 	rte_fbarray_find_rev_biggest_free
 	rte_fbarray_find_rev_biggest_used
+	__rte_trace_mem_per_thread_alloc
+	__rte_trace_point_emit_field
+	__rte_trace_point_register
+	per_lcore_trace_mem
+	per_lcore_trace_point_sz
 
 	rte_mem_lock
 	rte_mem_map
-- 
2.28.0


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v6 3/5] telemetry: build stubs for Windows
  2020-09-10 23:50 ` [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows Thomas Monjalon
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 1/5] eal/windows: add stub for Rx interrupt control Thomas Monjalon
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 2/5] eal/windows: update symbols export Thomas Monjalon
@ 2020-09-10 23:50   ` Thomas Monjalon
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 4/5] ethdev: remove structs from export map Thomas Monjalon
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-09-10 23:50 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, bruce.richardson, Fady Bader, Narcisa Vasile,
	Dmitry Kozlyuk, Ranjit Menon, Kevin Laatz

From: Fady Bader <fady@mellanox.com>

Telemetry didn't compile under Windows.
Empty stubs are arranged, waiting for a proper implementation.

Signed-off-by: Fady Bader <fady@mellanox.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_telemetry/rte_telemetry.h    |  1 +
 lib/librte_telemetry/telemetry.c        | 22 ++++++++++++++++++++++
 lib/librte_telemetry/telemetry_legacy.c | 11 ++++++++++-
 lib/meson.build                         |  1 +
 4 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index d13010b8fb..deac2e71ca 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -3,6 +3,7 @@
  */
 
 #include <stdint.h>
+#include <sched.h>
 #include <rte_compat.h>
 
 #ifndef _RTE_TELEMETRY_H_
diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
index 0252282735..51e7ceeb1b 100644
--- a/lib/librte_telemetry/telemetry.c
+++ b/lib/librte_telemetry/telemetry.c
@@ -2,11 +2,13 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <pthread.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <dlfcn.h>
+#endif /* !RTE_EXEC_ENV_WINDOWS */
 
 /* we won't link against libbsd, so just always use DPDKs-specific strlcpy */
 #undef RTE_USE_LIBBSD
@@ -25,8 +27,10 @@
 #define MAX_OUTPUT_LEN (1024 * 16)
 #define MAX_CONNECTIONS 10
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 static void *
 client_handler(void *socket);
+#endif /* !RTE_EXEC_ENV_WINDOWS */
 
 struct cmd_callback {
 	char cmd[MAX_CMD_LEN];
@@ -34,6 +38,7 @@ struct cmd_callback {
 	char help[MAX_HELP_LEN];
 };
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 struct socket {
 	int sock;
 	char path[sizeof(((struct sockaddr_un *)0)->sun_path)];
@@ -42,13 +47,16 @@ struct socket {
 };
 static struct socket v2_socket; /* socket for v2 telemetry */
 static struct socket v1_socket; /* socket for v1 telemetry */
+#endif /* !RTE_EXEC_ENV_WINDOWS */
 static char telemetry_log_error[1024]; /* Will contain error on init failure */
 /* list of command callbacks, with one command registered by default */
 static struct cmd_callback callbacks[TELEMETRY_MAX_CALLBACKS];
 static int num_callbacks; /* How many commands are registered */
 /* Used when accessing or modifying list of command callbacks */
 static rte_spinlock_t callback_sl = RTE_SPINLOCK_INITIALIZER;
+#ifndef RTE_EXEC_ENV_WINDOWS
 static uint16_t v2_clients;
+#endif /* !RTE_EXEC_ENV_WINDOWS */
 
 int
 rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
@@ -78,6 +86,8 @@ rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)
 	return 0;
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 static int
 list_commands(const char *cmd __rte_unused, const char *params __rte_unused,
 		struct rte_tel_data *d)
@@ -412,10 +422,13 @@ telemetry_v2_init(const char *runtime_dir, rte_cpuset_t *cpuset)
 	return 0;
 }
 
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
 int32_t
 rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		const char **err_str)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (telemetry_v2_init(runtime_dir, cpuset) != 0) {
 		*err_str = telemetry_log_error;
 		return -1;
@@ -423,5 +436,14 @@ rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 	if (telemetry_legacy_init(runtime_dir, cpuset) != 0) {
 		*err_str = telemetry_log_error;
 	}
+#else /* RTE_EXEC_ENV_WINDOWS */
+	RTE_SET_USED(runtime_dir);
+	RTE_SET_USED(cpuset);
+	RTE_SET_USED(err_str);
+
+	snprintf(telemetry_log_error, sizeof(telemetry_log_error),
+		"DPDK Telemetry is not supported on Windows.");
+#endif /* RTE_EXEC_ENV_WINDOWS */
+
 	return 0;
 }
diff --git a/lib/librte_telemetry/telemetry_legacy.c b/lib/librte_telemetry/telemetry_legacy.c
index a341fe4ebd..b8e424041c 100644
--- a/lib/librte_telemetry/telemetry_legacy.c
+++ b/lib/librte_telemetry/telemetry_legacy.c
@@ -2,10 +2,12 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <pthread.h>
+#endif /* !RTE_EXEC_ENV_WINDOWS */
 
 /* we won't link against libbsd, so just always use DPDKs-specific strlcpy */
 #undef RTE_USE_LIBBSD
@@ -24,7 +26,6 @@
 #define DATA_REQ_LABEL "\"data\":"
 #define TELEMETRY_LEGACY_MAX_CALLBACKS 4
 
-
 static int
 register_client(const char *cmd __rte_unused,
 		const char *params __rte_unused,
@@ -77,15 +78,18 @@ static int
 register_client(const char *cmd __rte_unused, const char *params,
 		char *buffer __rte_unused, int buf_len __rte_unused)
 {
+#ifndef RTE_EXEC_ENV_WINDOWS
 	pthread_t th;
 	char data[BUF_SIZE];
 	int fd;
 	struct sockaddr_un addrs;
+#endif /* !RTE_EXEC_ENV_WINDOWS */
 
 	if (!strchr(params, ':')) {
 		fprintf(stderr, "Invalid data\n");
 		return -1;
 	}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	strlcpy(data, strchr(params, ':'), sizeof(data));
 	memcpy(data, &data[strlen(":\"")], strlen(data));
 	if (!strchr(data, '\"')) {
@@ -109,9 +113,12 @@ register_client(const char *cmd __rte_unused, const char *params,
 	}
 	pthread_create(&th, NULL, &legacy_client_handler,
 			(void *)(uintptr_t)fd);
+#endif /* !RTE_EXEC_ENV_WINDOWS */
 	return 0;
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 static int
 send_error_response(int s, int err)
 {
@@ -239,3 +246,5 @@ legacy_client_handler(void *sock_id)
 	close(s);
 	return NULL;
 }
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */
diff --git a/lib/meson.build b/lib/meson.build
index 283ee6c505..eb0cd9090a 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -38,6 +38,7 @@ libraries = [
 if is_windows
 	libraries = [
 		'kvargs',
+		'telemetry',
 		'eal',
 		'ring',
 		'mempool', 'mbuf', 'net', 'pci',
-- 
2.28.0


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v6 4/5] ethdev: remove structs from export map
  2020-09-10 23:50 ` [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows Thomas Monjalon
                     ` (2 preceding siblings ...)
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 3/5] telemetry: build stubs for Windows Thomas Monjalon
@ 2020-09-10 23:50   ` Thomas Monjalon
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 5/5] ethdev: build on Windows Thomas Monjalon
  2020-09-10 23:58   ` [dpdk-dev] [PATCH v6 0/5] build ethdev " Thomas Monjalon
  5 siblings, 0 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-09-10 23:50 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, bruce.richardson, Fady Bader, Narcisa Vasile,
	Dmitry Kozlyuk, Ranjit Menon, Ray Kinsella, Neil Horman,
	Ferruh Yigit, Andrew Rybchenko

From: Fady Bader <fady@mellanox.com>

Some ethdev structs were present in .map export list.
There structs are removed from the .map file.

Signed-off-by: Fady Bader <fady@mellanox.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 8d9d6b1c67..02081d9de9 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -89,7 +89,6 @@ DPDK_21 {
 	rte_eth_iterator_next;
 	rte_eth_led_off;
 	rte_eth_led_on;
-	rte_eth_link;
 	rte_eth_link_get;
 	rte_eth_link_get_nowait;
 	rte_eth_macaddr_get;
@@ -104,7 +103,6 @@ DPDK_21 {
 	rte_eth_rx_queue_setup;
 	rte_eth_set_queue_rate_limit;
 	rte_eth_speed_bitflag;
-	rte_eth_stats;
 	rte_eth_stats_get;
 	rte_eth_stats_reset;
 	rte_eth_timesync_adjust_time;
-- 
2.28.0


^ permalink raw reply	[flat|nested] 61+ messages in thread

* [dpdk-dev] [PATCH v6 5/5] ethdev: build on Windows
  2020-09-10 23:50 ` [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows Thomas Monjalon
                     ` (3 preceding siblings ...)
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 4/5] ethdev: remove structs from export map Thomas Monjalon
@ 2020-09-10 23:50   ` Thomas Monjalon
  2020-09-10 23:58   ` [dpdk-dev] [PATCH v6 0/5] build ethdev " Thomas Monjalon
  5 siblings, 0 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-09-10 23:50 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, bruce.richardson, Fady Bader, Narcisa Vasile,
	Dmitry Kozlyuk, Ranjit Menon

From: Fady Bader <fady@mellanox.com>

Add ethdev and a missing dependency (meter) to the list
of libraries built on Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
 lib/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/meson.build b/lib/meson.build
index eb0cd9090a..d8b358e5f4 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -41,7 +41,7 @@ if is_windows
 		'telemetry',
 		'eal',
 		'ring',
-		'mempool', 'mbuf', 'net', 'pci',
+		'mempool', 'mbuf', 'net', 'meter', 'ethdev', 'pci',
 	] # only supported libraries for windows
 endif
 
-- 
2.28.0


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows
  2020-09-10 23:50 ` [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows Thomas Monjalon
                     ` (4 preceding siblings ...)
  2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 5/5] ethdev: build on Windows Thomas Monjalon
@ 2020-09-10 23:58   ` Thomas Monjalon
  5 siblings, 0 replies; 61+ messages in thread
From: Thomas Monjalon @ 2020-09-10 23:58 UTC (permalink / raw)
  To: Narcisa Vasile, Dmitry Kozlyuk, Ranjit Menon
  Cc: dev, david.marchand, bruce.richardson

> This is based on v5 of Fady's work.
> I've reworked a bit to minimize the number of changed lines,
> and did some rewording.

Applied quickly as it is waited for long,
in the hope I didn't introduce a regression in this v6 :)



^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2020-09-10 23:59 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 13:30 [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Fady Bader
2020-06-25 13:30 ` [dpdk-dev] [PATCH 1/5] eal: added interrupts empty stubs Fady Bader
2020-06-28 10:58   ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 1/5] eal: added interrupts empty stubs Fady Bader
2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 2/5] eal: updated export list for Windows Fady Bader
2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 3/5] ethdev: remove structs from export list Fady Bader
2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 4/5] telemetry: implement empty stubs for Windows Fady Bader
2020-06-28 18:04       ` Stephen Hemminger
2020-06-29  7:59         ` Thomas Monjalon
2020-06-28 10:58     ` [dpdk-dev] [PATCH v2 5/5] ethdev: compiling ethdev under Windows Fady Bader
2020-07-26  9:24     ` [dpdk-dev] [PATCH v2 0/5] compiling ethdev lib under windows Fady Bader
2020-07-27 18:53       ` Narcisa Ana Maria Vasile
2020-06-25 13:30 ` [dpdk-dev] [PATCH 2/5] eal: updated export list for Windows Fady Bader
2020-06-25 13:30 ` [dpdk-dev] [PATCH 3/5] ethdev: remove structs from export list Fady Bader
2020-06-25 13:30 ` [dpdk-dev] [PATCH 4/5] telemetry: implement empty stubs for Windows Fady Bader
2020-06-25 13:30 ` [dpdk-dev] [PATCH 5/5] ethdev: compiling ethdev under Windows Fady Bader
2020-07-29  1:01 ` [dpdk-dev] [PATCH 0/5] compiling ethdev lib under windows Narcisa Ana Maria Vasile
2020-08-03  6:16   ` Fady Bader
2020-08-03 10:38 ` [dpdk-dev] [PATCH v3 " Fady Bader
2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 1/5] eal: added interrupts empty stubs Fady Bader
2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 2/5] eal: updated export list for Windows Fady Bader
2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 3/5] ethdev: remove structs from export list Fady Bader
2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 4/5] telemetry: implement empty stubs for Windows Fady Bader
2020-08-04  1:26     ` Narcisa Ana Maria Vasile
2020-08-04  6:05       ` Fady Bader
2020-08-03 10:38   ` [dpdk-dev] [PATCH v3 5/5] ethdev: compiling ethdev under Windows Fady Bader
2020-08-04  6:29 ` [dpdk-dev] [PATCH v4 0/5] compiling ethdev lib under windows Fady Bader
2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 1/5] eal: added interrupts empty stubs Fady Bader
2020-08-04 18:45     ` Narcisa Ana Maria Vasile
2020-08-04 23:43     ` Dmitry Kozlyuk
2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 2/5] eal: updated export list for Windows Fady Bader
2020-08-04 18:46     ` Narcisa Ana Maria Vasile
2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 3/5] ethdev: remove structs from export list Fady Bader
2020-08-04 18:47     ` Narcisa Ana Maria Vasile
2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 4/5] telemetry: implement empty stubs for Windows Fady Bader
2020-08-04 18:47     ` Narcisa Ana Maria Vasile
2020-08-04 23:39     ` Dmitry Kozlyuk
2020-08-05  8:27       ` Thomas Monjalon
2020-08-05  8:40         ` Bruce Richardson
2020-08-05  9:06           ` Thomas Monjalon
2020-08-05 10:02             ` Bruce Richardson
2020-08-05  8:28     ` Thomas Monjalon
2020-08-04  6:29   ` [dpdk-dev] [PATCH v4 5/5] ethdev: compiling ethdev under Windows Fady Bader
2020-08-04 18:51     ` Narcisa Ana Maria Vasile
2020-08-11  6:24 ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Fady Bader
2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 1/5] eal: added interrupts empty stubs Fady Bader
2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 2/5] eal: updated export list for Windows Fady Bader
2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 3/5] ethdev: remove structs from export list Fady Bader
2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 4/5] telemetry: implement empty stubs for Windows Fady Bader
2020-09-10 23:35     ` Thomas Monjalon
2020-08-11  6:24   ` [dpdk-dev] [PATCH v5 5/5] ethdev: compiling ethdev under Windows Fady Bader
2020-08-13  7:02   ` [dpdk-dev] [PATCH v5 0/5] compiling ethdev lib under windows Thomas Monjalon
2020-08-18 16:13   ` Dmitry Kozlyuk
2020-08-20 21:40   ` Ranjit Menon
2020-09-10 23:50 ` [dpdk-dev] [PATCH v6 0/5] build ethdev on Windows Thomas Monjalon
2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 1/5] eal/windows: add stub for Rx interrupt control Thomas Monjalon
2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 2/5] eal/windows: update symbols export Thomas Monjalon
2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 3/5] telemetry: build stubs for Windows Thomas Monjalon
2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 4/5] ethdev: remove structs from export map Thomas Monjalon
2020-09-10 23:50   ` [dpdk-dev] [PATCH v6 5/5] ethdev: build on Windows Thomas Monjalon
2020-09-10 23:58   ` [dpdk-dev] [PATCH v6 0/5] build ethdev " Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).