* [dpdk-dev] [PATCH 0/3] Support i40e PMD on Windows
@ 2020-12-05 1:10 Pallavi Kadam
2020-12-05 1:10 ` [dpdk-dev] [PATCH 1/3] eal/windows: add some interrupt functions stub Pallavi Kadam
` (3 more replies)
0 siblings, 4 replies; 32+ messages in thread
From: Pallavi Kadam @ 2020-12-05 1:10 UTC (permalink / raw)
To: dev, thomas
Cc: ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, beilei.xing, jia.guo, pallavi.kadam
This patch-set enables building the Intel i40e PMD on Windows.
It also adds a compiler flag to ignore a few warnings generated
when compiling the code on Windows.
Pallavi Kadam (3):
eal/windows: add some interrupt functions stub
net/i40e: add changes to support i40e PMD on windows
config/build: ignore enum forward reference warning
config/meson.build | 3 +
drivers/net/i40e/base/i40e_osdep.h | 3 +
drivers/net/i40e/i40e_ethdev_vf.c | 3 +-
drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +
drivers/net/i40e/i40e_tm.c | 2 +-
drivers/net/meson.build | 9 ++-
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/rte_eal_exports.def | 11 +++
lib/librte_eal/windows/eal_interrupts.c | 70 ++++++++++++++++++++
lib/librte_eal/windows/include/rte_windows.h | 5 ++
10 files changed, 104 insertions(+), 5 deletions(-)
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 1/3] eal/windows: add some interrupt functions stub
2020-12-05 1:10 [dpdk-dev] [PATCH 0/3] Support i40e PMD on Windows Pallavi Kadam
@ 2020-12-05 1:10 ` Pallavi Kadam
2020-12-05 1:10 ` [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows Pallavi Kadam
` (2 subsequent siblings)
3 siblings, 0 replies; 32+ messages in thread
From: Pallavi Kadam @ 2020-12-05 1:10 UTC (permalink / raw)
To: dev, thomas
Cc: ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, beilei.xing, jia.guo, pallavi.kadam
Adding some interrupt implementations on Windows to help compile
i40e PMD code.
Also added respective functions to export file.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
lib/librte_eal/rte_eal_exports.def | 10 ++++
lib/librte_eal/windows/eal_interrupts.c | 70 +++++++++++++++++++++++++
2 files changed, 80 insertions(+)
diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 6a6be1cfa..89166acd7 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -63,6 +63,16 @@ EXPORTS
rte_get_tsc_hz
rte_hexdump
rte_hypervisor_get
+ rte_intr_ack
+ rte_intr_allow_others
+ rte_intr_callback_register
+ rte_intr_callback_unregister
+ rte_intr_cap_multiple
+ rte_intr_disable
+ rte_intr_dp_is_en
+ rte_intr_efd_disable
+ rte_intr_efd_enable
+ rte_intr_enable
rte_intr_rx_ctl
rte_lcore_count
rte_lcore_has_role
diff --git a/lib/librte_eal/windows/eal_interrupts.c b/lib/librte_eal/windows/eal_interrupts.c
index 6c64a48f3..f6c24787f 100644
--- a/lib/librte_eal/windows/eal_interrupts.c
+++ b/lib/librte_eal/windows/eal_interrupts.c
@@ -105,3 +105,73 @@ eal_intr_thread_schedule(void (*func)(void *arg), void *arg)
return 0;
}
+
+int
+rte_intr_callback_register(
+ __rte_unused const struct rte_intr_handle *intr_handle,
+ __rte_unused rte_intr_callback_fn cb, __rte_unused void *cb_arg)
+{
+ return -ENOTSUP;
+}
+
+int
+rte_intr_callback_unregister(
+ __rte_unused const struct rte_intr_handle *intr_handle,
+ __rte_unused rte_intr_callback_fn cb_fn, __rte_unused void *cb_arg)
+{
+ return 0;
+}
+
+int
+rte_intr_enable(__rte_unused const struct rte_intr_handle *intr_handle)
+{
+ return -ENOTSUP;
+}
+
+int
+rte_intr_ack(__rte_unused const struct rte_intr_handle *intr_handle)
+{
+ return -ENOTSUP;
+}
+
+int
+rte_intr_disable(__rte_unused const struct rte_intr_handle *intr_handle)
+{
+ return -ENOTSUP;
+}
+
+int
+rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
+{
+ RTE_SET_USED(intr_handle);
+ RTE_SET_USED(nb_efd);
+
+ return 0;
+}
+
+void
+rte_intr_efd_disable(struct rte_intr_handle *intr_handle)
+{
+ RTE_SET_USED(intr_handle);
+}
+
+int
+rte_intr_dp_is_en(struct rte_intr_handle *intr_handle)
+{
+ RTE_SET_USED(intr_handle);
+ return 0;
+}
+
+int
+rte_intr_allow_others(struct rte_intr_handle *intr_handle)
+{
+ RTE_SET_USED(intr_handle);
+ return 1;
+}
+
+int
+rte_intr_cap_multiple(struct rte_intr_handle *intr_handle)
+{
+ RTE_SET_USED(intr_handle);
+ return 0;
+}
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
2020-12-05 1:10 [dpdk-dev] [PATCH 0/3] Support i40e PMD on Windows Pallavi Kadam
2020-12-05 1:10 ` [dpdk-dev] [PATCH 1/3] eal/windows: add some interrupt functions stub Pallavi Kadam
@ 2020-12-05 1:10 ` Pallavi Kadam
2020-12-05 13:52 ` Dmitry Kozlyuk
2020-12-06 15:49 ` Thomas Monjalon
2020-12-05 1:10 ` [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning Pallavi Kadam
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 0/2] Support i40e PMD on Windows Pallavi Kadam
3 siblings, 2 replies; 32+ messages in thread
From: Pallavi Kadam @ 2020-12-05 1:10 UTC (permalink / raw)
To: dev, thomas
Cc: ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, beilei.xing, jia.guo, pallavi.kadam
Adding build changes to compile i40e PMD on windows.
Disabling few warnings with Clang such as comparison of integers of
different signs and macro redefinitions.
Also, adding linking dependency source file rte_random.c file to
Windows.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
drivers/net/i40e/base/i40e_osdep.h | 3 +++
drivers/net/i40e/i40e_ethdev_vf.c | 3 ++-
drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 ++
drivers/net/i40e/i40e_tm.c | 2 +-
drivers/net/meson.build | 9 ++++++---
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/rte_eal_exports.def | 1 +
lib/librte_eal/windows/include/rte_windows.h | 5 +++++
8 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 9b5033024..fa22df122 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -67,8 +67,11 @@ typedef enum i40e_status_code i40e_status;
#define false 0
#define true 1
+/* Avoid macro redifinition warning on Windows */
+#ifndef RTE_EXEC_ENV_WINDOWS
#define min(a,b) RTE_MIN(a,b)
#define max(a,b) RTE_MAX(a,b)
+#endif
#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index c26b036b8..daf4a3f99 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1495,7 +1495,8 @@ i40evf_handle_aq_msg(struct rte_eth_dev *dev)
info.msg_len);
else {
/* read message and it's expected one */
- if (msg_opc == vf->pend_cmd) {
+ if ((volatile uint32_t)msg_opc ==
+ vf->pend_cmd) {
vf->cmd_retval = msg_ret;
/* prevent compiler reordering */
rte_compiler_barrier();
diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index 7a558fc73..cf2dc88c5 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -12,7 +12,9 @@
#include "i40e_rxtx.h"
#include "i40e_rxtx_vec_common.h"
+#ifndef RTE_EXEC_ENV_WINDOWS
#include <x86intrin.h>
+#endif
#ifndef __INTEL_COMPILER
#pragma GCC diagnostic ignored "-Wcast-qual"
diff --git a/drivers/net/i40e/i40e_tm.c b/drivers/net/i40e/i40e_tm.c
index 5d722f92c..cab296e1a 100644
--- a/drivers/net/i40e/i40e_tm.c
+++ b/drivers/net/i40e/i40e_tm.c
@@ -554,7 +554,7 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
}
/* check level */
if (level_id != RTE_TM_NODE_LEVEL_ID_ANY &&
- level_id != parent_node_type + 1) {
+ level_id != (uint32_t)parent_node_type + 1) {
error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS;
error->message = "Wrong level";
return -EINVAL;
diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index 29f477750..b3bc0277e 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -1,9 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- subdir_done()
-endif
drivers = ['af_packet',
'af_xdp',
@@ -56,6 +53,12 @@ drivers = ['af_packet',
'virtio',
'vmxnet3',
]
+
+if is_windows
+ drivers = ['i40e',
+ ]
+endif
+
std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
std_deps += ['bus_pci'] # very many PMDs depend on PCI, so make std
std_deps += ['bus_vdev'] # same with vdev bus
diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
index 39abf7a0a..98e8fffd4 100644
--- a/lib/librte_eal/common/meson.build
+++ b/lib/librte_eal/common/meson.build
@@ -33,6 +33,7 @@ if is_windows
'malloc_heap.c',
'rte_malloc.c',
'eal_common_timer.c',
+ 'rte_random.c',
'rte_service.c',
)
subdir_done()
diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 89166acd7..428201872 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -124,6 +124,7 @@ EXPORTS
rte_memzone_reserve_bounded
rte_memzone_walk
rte_openlog_stream
+ rte_rand
rte_realloc
rte_rtm_supported
rte_service_attr_get
diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h
index b82af34f6..822922c11 100644
--- a/lib/librte_eal/windows/include/rte_windows.h
+++ b/lib/librte_eal/windows/include/rte_windows.h
@@ -18,6 +18,11 @@
#define WIN32_LEAN_AND_MEAN
#endif
+#ifdef __clang__
+#undef _m_prefetchw
+#define _m_prefetchw __m_prefetchw
+#endif
+
/* Must come first. */
#include <windows.h>
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning
2020-12-05 1:10 [dpdk-dev] [PATCH 0/3] Support i40e PMD on Windows Pallavi Kadam
2020-12-05 1:10 ` [dpdk-dev] [PATCH 1/3] eal/windows: add some interrupt functions stub Pallavi Kadam
2020-12-05 1:10 ` [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows Pallavi Kadam
@ 2020-12-05 1:10 ` Pallavi Kadam
2020-12-05 13:51 ` Dmitry Kozlyuk
2020-12-10 0:53 ` Narcisa Ana Maria Vasile
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 0/2] Support i40e PMD on Windows Pallavi Kadam
3 siblings, 2 replies; 32+ messages in thread
From: Pallavi Kadam @ 2020-12-05 1:10 UTC (permalink / raw)
To: dev, thomas
Cc: ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, beilei.xing, jia.guo, pallavi.kadam
Warning generated using Clang compiler:
..\drivers\net\i40e\base/i40e_osdep.h:34:14: warning: forward references
to 'enum' types are a Microsoft extension
[-Wmicrosoft-enum-forward-reference]
typedef enum i40e_status_code i40e_status;
^
Adding -Wmicrosoft-enum-forward-reference compiler flag to disable
the warning on Windows Clang.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
config/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/config/meson.build b/config/meson.build
index c02802c18..6736023fa 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -212,6 +212,9 @@ warning_flags = [
'-Wno-packed-not-aligned',
'-Wno-missing-field-initializers'
]
+if is_windows
+ warning_flags += '-Wno-microsoft-enum-forward-reference'
+endif
if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0')
# FIXME: Bugzilla 396
warning_flags += '-Wno-zero-length-bounds'
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning
2020-12-05 1:10 ` [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning Pallavi Kadam
@ 2020-12-05 13:51 ` Dmitry Kozlyuk
2020-12-10 0:53 ` Narcisa Ana Maria Vasile
1 sibling, 0 replies; 32+ messages in thread
From: Dmitry Kozlyuk @ 2020-12-05 13:51 UTC (permalink / raw)
To: Pallavi Kadam, beilei.xing, jia.guo
Cc: dev, thomas, ranjit.menon, Narcisa.Vasile, talshn, ferruh.yigit
On Fri, 4 Dec 2020 17:10:20 -0800, Pallavi Kadam wrote:
> Warning generated using Clang compiler:
> ..\drivers\net\i40e\base/i40e_osdep.h:34:14: warning: forward references
> to 'enum' types are a Microsoft extension
> [-Wmicrosoft-enum-forward-reference]
> typedef enum i40e_status_code i40e_status;
> ^
>
> Adding -Wmicrosoft-enum-forward-reference compiler flag to disable
> the warning on Windows Clang.
@i40e maintainers,
Is this typedef necessary? Disabling a warning is usually the last resort.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
2020-12-05 1:10 ` [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows Pallavi Kadam
@ 2020-12-05 13:52 ` Dmitry Kozlyuk
2020-12-09 0:09 ` Kadam, Pallavi
2020-12-06 15:49 ` Thomas Monjalon
1 sibling, 1 reply; 32+ messages in thread
From: Dmitry Kozlyuk @ 2020-12-05 13:52 UTC (permalink / raw)
To: Pallavi Kadam
Cc: dev, thomas, ranjit.menon, Narcisa.Vasile, talshn, ferruh.yigit,
beilei.xing, jia.guo
On Fri, 4 Dec 2020 17:10:19 -0800, Pallavi Kadam wrote:
You could drop "add changes" and "i40e PMD" from subject line, as any commit
changes something and topic is "net/i40e" already.
> Adding build changes to compile i40e PMD on windows.
This is redundant given the commit subject.
Please use present simple tense for changes description (this applies to
sibling patches).
> Disabling few warnings with Clang such as comparison of integers of
> different signs and macro redefinitions.
> Also, adding linking dependency source file rte_random.c file to
> Windows.
>
> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
> ---
> drivers/net/i40e/base/i40e_osdep.h | 3 +++
> drivers/net/i40e/i40e_ethdev_vf.c | 3 ++-
> drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 ++
> drivers/net/i40e/i40e_tm.c | 2 +-
> drivers/net/meson.build | 9 ++++++---
> lib/librte_eal/common/meson.build | 1 +
> lib/librte_eal/rte_eal_exports.def | 1 +
> lib/librte_eal/windows/include/rte_windows.h | 5 +++++
> 8 files changed, 21 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
> index 9b5033024..fa22df122 100644
> --- a/drivers/net/i40e/base/i40e_osdep.h
> +++ b/drivers/net/i40e/base/i40e_osdep.h
> @@ -67,8 +67,11 @@ typedef enum i40e_status_code i40e_status;
> #define false 0
> #define true 1
>
> +/* Avoid macro redifinition warning on Windows */
> +#ifndef RTE_EXEC_ENV_WINDOWS
> #define min(a,b) RTE_MIN(a,b)
> #define max(a,b) RTE_MAX(a,b)
> +#endif
Windows min() and max() macros evaluate arguments twice [1], which can be
unacceptable in driver code if used with MMIO. Better #undef min and max
first, then let PMD define them.
It seems we'll have to do that for many PMDs, because rte_os.h must not erase
platform-specific macros, and rte_windows.h is not for generic PMDs.
[1]: https://docs.microsoft.com/en-us/windows/win32/multimedia/max
> diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
> index 7a558fc73..cf2dc88c5 100644
> --- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
> +++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
> @@ -12,7 +12,9 @@
> #include "i40e_rxtx.h"
> #include "i40e_rxtx_vec_common.h"
>
> +#ifndef RTE_EXEC_ENV_WINDOWS
> #include <x86intrin.h>
> +#endif
Just #include <rte_vect.h>, it takes care of x86intrin.h for Windows.
> diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h
> index b82af34f6..822922c11 100644
> --- a/lib/librte_eal/windows/include/rte_windows.h
> +++ b/lib/librte_eal/windows/include/rte_windows.h
> @@ -18,6 +18,11 @@
> #define WIN32_LEAN_AND_MEAN
> #endif
>
> +#ifdef __clang__
> +#undef _m_prefetchw
> +#define _m_prefetchw __m_prefetchw
> +#endif
> +
Please explain in the commit message which problem this solves.
Can't x86intrin.h be replaced by rte_vect.h in rte_random.c?
If it's still necessary, __clang__ should be RTE_TOOLCHAIN_CLANG.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
2020-12-05 1:10 ` [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows Pallavi Kadam
2020-12-05 13:52 ` Dmitry Kozlyuk
@ 2020-12-06 15:49 ` Thomas Monjalon
2020-12-07 9:14 ` Bruce Richardson
2020-12-09 0:21 ` Kadam, Pallavi
1 sibling, 2 replies; 32+ messages in thread
From: Thomas Monjalon @ 2020-12-06 15:49 UTC (permalink / raw)
To: Pallavi Kadam
Cc: dev, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, beilei.xing, jia.guo, talshn
05/12/2020 02:10, Pallavi Kadam:
> --- a/drivers/net/meson.build
> +++ b/drivers/net/meson.build
> @@ -1,9 +1,6 @@
> # SPDX-License-Identifier: BSD-3-Clause
> # Copyright(c) 2017 Intel Corporation
>
> -if is_windows
> - subdir_done()
> -endif
>
> drivers = ['af_packet',
> 'af_xdp',
> @@ -56,6 +53,12 @@ drivers = ['af_packet',
> 'virtio',
> 'vmxnet3',
> ]
> +
> +if is_windows
> + drivers = ['i40e',
> + ]
> +endif
Let's not add an alternative list please.
I prefer disabling compilation in other drivers.
> --- a/lib/librte_eal/common/meson.build
> +++ b/lib/librte_eal/common/meson.build
> @@ -33,6 +33,7 @@ if is_windows
> 'malloc_heap.c',
> 'rte_malloc.c',
> 'eal_common_timer.c',
> + 'rte_random.c',
> 'rte_service.c',
> )
> subdir_done()
> diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
> index 89166acd7..428201872 100644
> --- a/lib/librte_eal/rte_eal_exports.def
> +++ b/lib/librte_eal/rte_eal_exports.def
> @@ -124,6 +124,7 @@ EXPORTS
> rte_memzone_reserve_bounded
> rte_memzone_walk
> rte_openlog_stream
> + rte_rand
> rte_realloc
> rte_rtm_supported
> rte_service_attr_get
> diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h
> index b82af34f6..822922c11 100644
> --- a/lib/librte_eal/windows/include/rte_windows.h
> +++ b/lib/librte_eal/windows/include/rte_windows.h
> @@ -18,6 +18,11 @@
> #define WIN32_LEAN_AND_MEAN
> #endif
>
> +#ifdef __clang__
> +#undef _m_prefetchw
> +#define _m_prefetchw __m_prefetchw
> +#endif
These changes are not specific to i40e, please separate.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
2020-12-06 15:49 ` Thomas Monjalon
@ 2020-12-07 9:14 ` Bruce Richardson
2020-12-09 0:14 ` Kadam, Pallavi
2020-12-09 0:21 ` Kadam, Pallavi
1 sibling, 1 reply; 32+ messages in thread
From: Bruce Richardson @ 2020-12-07 9:14 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Pallavi Kadam, dev, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile,
talshn, ferruh.yigit, beilei.xing, jia.guo
On Sun, Dec 06, 2020 at 04:49:40PM +0100, Thomas Monjalon wrote:
> 05/12/2020 02:10, Pallavi Kadam:
> > --- a/drivers/net/meson.build
> > +++ b/drivers/net/meson.build
> > @@ -1,9 +1,6 @@
> > # SPDX-License-Identifier: BSD-3-Clause
> > # Copyright(c) 2017 Intel Corporation
> >
> > -if is_windows
> > - subdir_done()
> > -endif
> >
> > drivers = ['af_packet',
> > 'af_xdp',
> > @@ -56,6 +53,12 @@ drivers = ['af_packet',
> > 'virtio',
> > 'vmxnet3',
> > ]
> > +
> > +if is_windows
> > + drivers = ['i40e',
> > + ]
> > +endif
>
> Let's not add an alternative list please.
> I prefer disabling compilation in other drivers.
>
+1 for this. It's more work, but it keeps the existing style where all info
about whether a driver should be built, and how it's built in a single file
for each driver.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
2020-12-05 13:52 ` Dmitry Kozlyuk
@ 2020-12-09 0:09 ` Kadam, Pallavi
0 siblings, 0 replies; 32+ messages in thread
From: Kadam, Pallavi @ 2020-12-09 0:09 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, thomas, ranjit.menon, Narcisa.Vasile, talshn, ferruh.yigit,
beilei.xing, jia.guo
On 12/5/2020 5:52 AM, Dmitry Kozlyuk wrote:
> On Fri, 4 Dec 2020 17:10:19 -0800, Pallavi Kadam wrote:
>
> You could drop "add changes" and "i40e PMD" from subject line, as any commit
> changes something and topic is "net/i40e" already.
>
>> Adding build changes to compile i40e PMD on windows.
> This is redundant given the commit subject.
> Please use present simple tense for changes description (this applies to
> sibling patches).
Ok, I'll update the title and description in v2.
>
>> Disabling few warnings with Clang such as comparison of integers of
>> different signs and macro redefinitions.
>> Also, adding linking dependency source file rte_random.c file to
>> Windows.
>>
>> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
>> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
>> ---
>> drivers/net/i40e/base/i40e_osdep.h | 3 +++
>> drivers/net/i40e/i40e_ethdev_vf.c | 3 ++-
>> drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 ++
>> drivers/net/i40e/i40e_tm.c | 2 +-
>> drivers/net/meson.build | 9 ++++++---
>> lib/librte_eal/common/meson.build | 1 +
>> lib/librte_eal/rte_eal_exports.def | 1 +
>> lib/librte_eal/windows/include/rte_windows.h | 5 +++++
>> 8 files changed, 21 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
>> index 9b5033024..fa22df122 100644
>> --- a/drivers/net/i40e/base/i40e_osdep.h
>> +++ b/drivers/net/i40e/base/i40e_osdep.h
>> @@ -67,8 +67,11 @@ typedef enum i40e_status_code i40e_status;
>> #define false 0
>> #define true 1
>>
>> +/* Avoid macro redifinition warning on Windows */
>> +#ifndef RTE_EXEC_ENV_WINDOWS
>> #define min(a,b) RTE_MIN(a,b)
>> #define max(a,b) RTE_MAX(a,b)
>> +#endif
> Windows min() and max() macros evaluate arguments twice [1], which can be
> unacceptable in driver code if used with MMIO. Better #undef min and max
> first, then let PMD define them.
>
> It seems we'll have to do that for many PMDs, because rte_os.h must not erase
> platform-specific macros, and rte_windows.h is not for generic PMDs.
>
> [1]: https://docs.microsoft.com/en-us/windows/win32/multimedia/max
Thanks for the suggestion. Will first #undef min and max in the same file in v2.
>
>> diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
>> index 7a558fc73..cf2dc88c5 100644
>> --- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
>> +++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
>> @@ -12,7 +12,9 @@
>> #include "i40e_rxtx.h"
>> #include "i40e_rxtx_vec_common.h"
>>
>> +#ifndef RTE_EXEC_ENV_WINDOWS
>> #include <x86intrin.h>
>> +#endif
> Just #include <rte_vect.h>, it takes care of x86intrin.h for Windows.
Ok, will #include <rte_vect.h> instead.
>
>> diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h
>> index b82af34f6..822922c11 100644
>> --- a/lib/librte_eal/windows/include/rte_windows.h
>> +++ b/lib/librte_eal/windows/include/rte_windows.h
>> @@ -18,6 +18,11 @@
>> #define WIN32_LEAN_AND_MEAN
>> #endif
>>
>> +#ifdef __clang__
>> +#undef _m_prefetchw
>> +#define _m_prefetchw __m_prefetchw
>> +#endif
>> +
> Please explain in the commit message which problem this solves.
Sure, will explain it in v2.
> Can't x86intrin.h be replaced by rte_vect.h in rte_random.c?
Please correct if I am wrong. Here, cause of an error is indirectly due
to rte_windows.h
and not because of #include <x86intrin.h>
Please see below error:
FAILED: lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj
clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj.rsp
In file included from ../lib/librte_eal/common/rte_random.c:13:
In file included from ..\lib/librte_eal/include\rte_eal.h:20:
In file included from ..\lib/librte_eal/include\rte_per_lcore.h:25:
In file included from ..\lib/librte_eal/windows/include\pthread.h:21:
In file included from ..\lib/librte_eal/windows/include\rte_windows.h:27:
In file included from C:\Program Files (x86)\Windows
Kits\10\include\10.0.18362.0\um\windows.h:171:
In file included from C:\Program Files (x86)\Windows
Kits\10\include\10.0.18362.0\shared\windef.h:24:
In file included from C:\Program Files (x86)\Windows
Kits\10\include\10.0.18362.0\shared\minwindef.h:182:
C:\Program Files (x86)\Windows
Kits\10\include\10.0.18362.0\um\winnt.h:3324:1: error: conflicting types
for '_m_prefetchw'
_m_prefetchw (
^
C:\Program Files\LLVM\lib\clang\10.0.0\include\prfchwintrin.h:50:1:
note: previous definition is here
_m_prefetchw(void *__P)
^
1 error generated.
> If it's still necessary, __clang__ should be RTE_TOOLCHAIN_CLANG.
will update this in v2. Thank you.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
2020-12-07 9:14 ` Bruce Richardson
@ 2020-12-09 0:14 ` Kadam, Pallavi
0 siblings, 0 replies; 32+ messages in thread
From: Kadam, Pallavi @ 2020-12-09 0:14 UTC (permalink / raw)
To: Bruce Richardson, Thomas Monjalon
Cc: dev, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, beilei.xing, jia.guo
On 12/7/2020 1:14 AM, Bruce Richardson wrote:
> On Sun, Dec 06, 2020 at 04:49:40PM +0100, Thomas Monjalon wrote:
>> 05/12/2020 02:10, Pallavi Kadam:
>>> --- a/drivers/net/meson.build
>>> +++ b/drivers/net/meson.build
>>> @@ -1,9 +1,6 @@
>>> # SPDX-License-Identifier: BSD-3-Clause
>>> # Copyright(c) 2017 Intel Corporation
>>>
>>> -if is_windows
>>> - subdir_done()
>>> -endif
>>>
>>> drivers = ['af_packet',
>>> 'af_xdp',
>>> @@ -56,6 +53,12 @@ drivers = ['af_packet',
>>> 'virtio',
>>> 'vmxnet3',
>>> ]
>>> +
>>> +if is_windows
>>> + drivers = ['i40e',
>>> + ]
>>> +endif
>> Let's not add an alternative list please.
>> I prefer disabling compilation in other drivers.
>>
> +1 for this. It's more work, but it keeps the existing style where all info
> about whether a driver should be built, and how it's built in a single file
> for each driver.
Thanks Thomas and Bruce.
Will incorporate this change in v2.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
2020-12-06 15:49 ` Thomas Monjalon
2020-12-07 9:14 ` Bruce Richardson
@ 2020-12-09 0:21 ` Kadam, Pallavi
2020-12-09 8:59 ` Thomas Monjalon
1 sibling, 1 reply; 32+ messages in thread
From: Kadam, Pallavi @ 2020-12-09 0:21 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, beilei.xing, jia.guo
On 12/6/2020 7:49 AM, Thomas Monjalon wrote:
> 05/12/2020 02:10, Pallavi Kadam:
>> --- a/drivers/net/meson.build
>> +++ b/drivers/net/meson.build
>> @@ -1,9 +1,6 @@
>> # SPDX-License-Identifier: BSD-3-Clause
>> # Copyright(c) 2017 Intel Corporation
>>
>> -if is_windows
>> - subdir_done()
>> -endif
>>
>> drivers = ['af_packet',
>> 'af_xdp',
>> @@ -56,6 +53,12 @@ drivers = ['af_packet',
>> 'virtio',
>> 'vmxnet3',
>> ]
>> +
>> +if is_windows
>> + drivers = ['i40e',
>> + ]
>> +endif
> Let's not add an alternative list please.
> I prefer disabling compilation in other drivers.
>
>
>> --- a/lib/librte_eal/common/meson.build
>> +++ b/lib/librte_eal/common/meson.build
>> @@ -33,6 +33,7 @@ if is_windows
>> 'malloc_heap.c',
>> 'rte_malloc.c',
>> 'eal_common_timer.c',
>> + 'rte_random.c',
>> 'rte_service.c',
>> )
>> subdir_done()
>> diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
>> index 89166acd7..428201872 100644
>> --- a/lib/librte_eal/rte_eal_exports.def
>> +++ b/lib/librte_eal/rte_eal_exports.def
>> @@ -124,6 +124,7 @@ EXPORTS
>> rte_memzone_reserve_bounded
>> rte_memzone_walk
>> rte_openlog_stream
>> + rte_rand
>> rte_realloc
>> rte_rtm_supported
>> rte_service_attr_get
>> diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h
>> index b82af34f6..822922c11 100644
>> --- a/lib/librte_eal/windows/include/rte_windows.h
>> +++ b/lib/librte_eal/windows/include/rte_windows.h
>> @@ -18,6 +18,11 @@
>> #define WIN32_LEAN_AND_MEAN
>> #endif
>>
>> +#ifdef __clang__
>> +#undef _m_prefetchw
>> +#define _m_prefetchw __m_prefetchw
>> +#endif
>
> These changes are not specific to i40e, please separate.
Ok, will create a separate patch in v2.
This change is required once we add rte_random.c file on windows.
So, may be addition of rte_random.c file and this change should go together?
Please suggest. Thanks,
>
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
2020-12-09 0:21 ` Kadam, Pallavi
@ 2020-12-09 8:59 ` Thomas Monjalon
2020-12-17 23:17 ` Kadam, Pallavi
0 siblings, 1 reply; 32+ messages in thread
From: Thomas Monjalon @ 2020-12-09 8:59 UTC (permalink / raw)
To: Kadam, Pallavi
Cc: dev, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, beilei.xing, jia.guo
09/12/2020 01:21, Kadam, Pallavi:
> On 12/6/2020 7:49 AM, Thomas Monjalon wrote:
> > 05/12/2020 02:10, Pallavi Kadam:
> >> --- a/lib/librte_eal/windows/include/rte_windows.h
> >> +++ b/lib/librte_eal/windows/include/rte_windows.h
> >> @@ -18,6 +18,11 @@
> >> #define WIN32_LEAN_AND_MEAN
> >> #endif
> >>
> >> +#ifdef __clang__
> >> +#undef _m_prefetchw
> >> +#define _m_prefetchw __m_prefetchw
> >> +#endif
> >
> > These changes are not specific to i40e, please separate.
> Ok, will create a separate patch in v2.
> This change is required once we add rte_random.c file on windows.
> So, may be addition of rte_random.c file and this change should go together?
> Please suggest. Thanks,
Yes absolutely, addition of random feature should be atomic in a patch.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning
2020-12-05 1:10 ` [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning Pallavi Kadam
2020-12-05 13:51 ` Dmitry Kozlyuk
@ 2020-12-10 0:53 ` Narcisa Ana Maria Vasile
2020-12-17 23:15 ` Kadam, Pallavi
1 sibling, 1 reply; 32+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-12-10 0:53 UTC (permalink / raw)
To: Pallavi Kadam
Cc: dev, thomas, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile,
talshn, ferruh.yigit, beilei.xing, jia.guo
On Fri, Dec 04, 2020 at 05:10:20PM -0800, Pallavi Kadam wrote:
> Warning generated using Clang compiler:
> ..\drivers\net\i40e\base/i40e_osdep.h:34:14: warning: forward references
> to 'enum' types are a Microsoft extension
> [-Wmicrosoft-enum-forward-reference]
> typedef enum i40e_status_code i40e_status;
> ^
>
> Adding -Wmicrosoft-enum-forward-reference compiler flag to disable
> the warning on Windows Clang.
>
> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
> ---
Why not including the "i40e_status.h" header that contains the definition of the enum
in this file?
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 0/2] Support i40e PMD on Windows
2020-12-05 1:10 [dpdk-dev] [PATCH 0/3] Support i40e PMD on Windows Pallavi Kadam
` (2 preceding siblings ...)
2020-12-05 1:10 ` [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning Pallavi Kadam
@ 2020-12-17 22:59 ` Pallavi Kadam
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 1/2] eal: add rte_random.c file on windows Pallavi Kadam
` (2 more replies)
3 siblings, 3 replies; 32+ messages in thread
From: Pallavi Kadam @ 2020-12-17 22:59 UTC (permalink / raw)
To: dev, thomas
Cc: ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, bruce.richardson, beilei.xing, jia.guo,
pallavi.kadam
This patch-set enables building the Intel i40e PMD on Windows.
Depends-on: series-14296 ("eal/windows: add interrupt functions stub")
v2 changes:
- Updated commit message (Dmitry Kozlyuk)
- Replaced x86intrin.h with rte_vect.h (Dmitry Kozlyuk)
- Disable all drivers that do not support on Windows and enable
as required (Thomas and Bruce)
- added #include "i40e_status.h" for enum definition to avoid
forward references warning (Naty)
Pallavi Kadam (2):
eal: add rte_random.c file on windows
build: i40e PMD on Windows
drivers/net/af_xdp/meson.build | 6 ++++++
drivers/net/ark/meson.build | 6 ++++++
drivers/net/atlantic/meson.build | 6 ++++++
drivers/net/bnx2x/meson.build | 6 ++++++
drivers/net/bnxt/meson.build | 6 ++++++
drivers/net/bonding/meson.build | 6 ++++++
drivers/net/cxgbe/meson.build | 6 ++++++
drivers/net/e1000/meson.build | 6 ++++++
drivers/net/ena/meson.build | 6 ++++++
drivers/net/enic/meson.build | 6 ++++++
drivers/net/failsafe/meson.build | 6 ++++++
drivers/net/fm10k/meson.build | 6 ++++++
drivers/net/hinic/meson.build | 6 ++++++
drivers/net/i40e/base/i40e_osdep.h | 10 ++++++++++
drivers/net/i40e/i40e_ethdev_vf.c | 3 ++-
drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +-
drivers/net/i40e/i40e_tm.c | 2 +-
drivers/net/iavf/meson.build | 6 ++++++
drivers/net/ice/meson.build | 6 ++++++
drivers/net/igc/meson.build | 6 ++++++
drivers/net/ionic/meson.build | 6 ++++++
drivers/net/ipn3ke/meson.build | 6 ++++++
drivers/net/ixgbe/meson.build | 6 ++++++
drivers/net/kni/meson.build | 6 ++++++
drivers/net/liquidio/meson.build | 6 ++++++
drivers/net/meson.build | 3 ---
drivers/net/mlx5/windows/meson.build | 0
drivers/net/mvneta/meson.build | 6 ++++++
drivers/net/mvpp2/meson.build | 6 ++++++
drivers/net/netvsc/meson.build | 6 ++++++
drivers/net/nfb/meson.build | 6 ++++++
drivers/net/null/meson.build | 6 ++++++
drivers/net/octeontx/meson.build | 6 ++++++
drivers/net/octeontx2/meson.build | 6 ++++++
drivers/net/pcap/meson.build | 6 ++++++
drivers/net/qede/meson.build | 6 ++++++
drivers/net/ring/meson.build | 6 ++++++
drivers/net/sfc/meson.build | 6 ++++++
drivers/net/szedata2/meson.build | 6 ++++++
drivers/net/thunderx/meson.build | 6 ++++++
drivers/net/txgbe/meson.build | 6 ++++++
drivers/net/vhost/meson.build | 6 ++++++
drivers/net/virtio/meson.build | 6 ++++++
drivers/net/vmxnet3/meson.build | 6 ++++++
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/rte_eal_exports.def | 1 +
lib/librte_eal/windows/include/rte_windows.h | 5 +++++
47 files changed, 249 insertions(+), 6 deletions(-)
create mode 100644 drivers/net/mlx5/windows/meson.build
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] eal: add rte_random.c file on windows
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 0/2] Support i40e PMD on Windows Pallavi Kadam
@ 2020-12-17 22:59 ` Pallavi Kadam
2020-12-18 11:29 ` Thomas Monjalon
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 2/2] build: i40e PMD on Windows Pallavi Kadam
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 0/2] Support " Pallavi Kadam
2 siblings, 1 reply; 32+ messages in thread
From: Pallavi Kadam @ 2020-12-17 22:59 UTC (permalink / raw)
To: dev, thomas
Cc: ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, bruce.richardson, beilei.xing, jia.guo,
pallavi.kadam
This file is required to compile and build i40e PMD on Windows.
Add rte_rand variable to export file.
Redefine _m_prefetchw for Clang toolchain due to following error
with respect to conflicting types:
FAILED: lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj
clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj.rsp
In file included from ../lib/librte_eal/common/rte_random.c:13:
In file included from ..\lib/librte_eal/include\rte_eal.h:20:
In file included from ..\lib/librte_eal/include\rte_per_lcore.h:25:
In file included from ..\lib/librte_eal/windows/include\pthread.h:21:
In file included from ..\lib/librte_eal/windows/include\rte_windows.h:27:
In file included from C:\Program Files (x86)\Windows Kits\10\include\
10.0.18362.0\um\windows.h:171:
In file included from C:\Program Files (x86)\Windows Kits\10\include\
10.0.18362.0\shared\windef.h:24:
In file included from C:\Program Files (x86)\Windows Kits\10\include\
10.0.18362.0\shared\minwindef.h:182:
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\
winnt.h:3324:1: error: conflicting types for '_m_prefetchw'
_m_prefetchw (
^
C:\Program Files\LLVM\lib\clang\10.0.0\include\prfchwintrin.h:50:1:
note: previous definition is here
_m_prefetchw(void *__P)
^
1 error generated.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/rte_eal_exports.def | 1 +
lib/librte_eal/windows/include/rte_windows.h | 5 +++++
3 files changed, 7 insertions(+)
diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
index 39abf7a0a..98e8fffd4 100644
--- a/lib/librte_eal/common/meson.build
+++ b/lib/librte_eal/common/meson.build
@@ -33,6 +33,7 @@ if is_windows
'malloc_heap.c',
'rte_malloc.c',
'eal_common_timer.c',
+ 'rte_random.c',
'rte_service.c',
)
subdir_done()
diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 6a6be1cfa..a2ad4d633 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -114,6 +114,7 @@ EXPORTS
rte_memzone_reserve_bounded
rte_memzone_walk
rte_openlog_stream
+ rte_rand
rte_realloc
rte_rtm_supported
rte_service_attr_get
diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h
index b82af34f6..ee065204d 100644
--- a/lib/librte_eal/windows/include/rte_windows.h
+++ b/lib/librte_eal/windows/include/rte_windows.h
@@ -18,6 +18,11 @@
#define WIN32_LEAN_AND_MEAN
#endif
+#ifdef RTE_TOOLCHAIN_CLANG
+#undef _m_prefetchw
+#define _m_prefetchw __m_prefetchw
+#endif
+
/* Must come first. */
#include <windows.h>
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] build: i40e PMD on Windows
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 0/2] Support i40e PMD on Windows Pallavi Kadam
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 1/2] eal: add rte_random.c file on windows Pallavi Kadam
@ 2020-12-17 22:59 ` Pallavi Kadam
2020-12-18 11:27 ` Thomas Monjalon
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 0/2] Support " Pallavi Kadam
2 siblings, 1 reply; 32+ messages in thread
From: Pallavi Kadam @ 2020-12-17 22:59 UTC (permalink / raw)
To: dev, thomas
Cc: ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, bruce.richardson, beilei.xing, jia.guo,
pallavi.kadam
Allows i40e PMD to compile on Windows and disable other drivers.
Disable few warnings with Clang such as comparison of integers of
different signs and macro redefinitions.
Adds temp folder mlx5/windows as it is required to build this patch
without any build error. This folder will be removed once mlx5 PMD
patches are merged.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
drivers/net/af_xdp/meson.build | 6 ++++++
drivers/net/ark/meson.build | 6 ++++++
drivers/net/atlantic/meson.build | 6 ++++++
drivers/net/bnx2x/meson.build | 6 ++++++
drivers/net/bnxt/meson.build | 6 ++++++
drivers/net/bonding/meson.build | 6 ++++++
drivers/net/cxgbe/meson.build | 6 ++++++
drivers/net/e1000/meson.build | 6 ++++++
drivers/net/ena/meson.build | 6 ++++++
drivers/net/enic/meson.build | 6 ++++++
drivers/net/failsafe/meson.build | 6 ++++++
drivers/net/fm10k/meson.build | 6 ++++++
drivers/net/hinic/meson.build | 6 ++++++
drivers/net/i40e/base/i40e_osdep.h | 10 ++++++++++
drivers/net/i40e/i40e_ethdev_vf.c | 3 ++-
drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +-
drivers/net/i40e/i40e_tm.c | 2 +-
drivers/net/iavf/meson.build | 6 ++++++
drivers/net/ice/meson.build | 6 ++++++
drivers/net/igc/meson.build | 6 ++++++
drivers/net/ionic/meson.build | 6 ++++++
drivers/net/ipn3ke/meson.build | 6 ++++++
drivers/net/ixgbe/meson.build | 6 ++++++
drivers/net/kni/meson.build | 6 ++++++
drivers/net/liquidio/meson.build | 6 ++++++
drivers/net/meson.build | 3 ---
drivers/net/mlx5/windows/meson.build | 0
drivers/net/mvneta/meson.build | 6 ++++++
drivers/net/mvpp2/meson.build | 6 ++++++
drivers/net/netvsc/meson.build | 6 ++++++
drivers/net/nfb/meson.build | 6 ++++++
drivers/net/null/meson.build | 6 ++++++
drivers/net/octeontx/meson.build | 6 ++++++
drivers/net/octeontx2/meson.build | 6 ++++++
drivers/net/pcap/meson.build | 6 ++++++
drivers/net/qede/meson.build | 6 ++++++
drivers/net/ring/meson.build | 6 ++++++
drivers/net/sfc/meson.build | 6 ++++++
drivers/net/szedata2/meson.build | 6 ++++++
drivers/net/thunderx/meson.build | 6 ++++++
drivers/net/txgbe/meson.build | 6 ++++++
drivers/net/vhost/meson.build | 6 ++++++
drivers/net/virtio/meson.build | 6 ++++++
drivers/net/vmxnet3/meson.build | 6 ++++++
44 files changed, 242 insertions(+), 6 deletions(-)
create mode 100644 drivers/net/mlx5/windows/meson.build
diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index fead8dd99..5c50d3f41 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources = files('rte_eth_af_xdp.c')
bpf_dep = dependency('libbpf', required: false)
diff --git a/drivers/net/ark/meson.build b/drivers/net/ark/meson.build
index 80bce94e1..cbc7d6166 100644
--- a/drivers/net/ark/meson.build
+++ b/drivers/net/ark/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
headers = files('rte_pmd_ark.h')
sources = files('ark_ddm.c',
diff --git a/drivers/net/atlantic/meson.build b/drivers/net/atlantic/meson.build
index 60b84684e..a386dd2ec 100644
--- a/drivers/net/atlantic/meson.build
+++ b/drivers/net/atlantic/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Aquantia Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources = files(
'atl_rxtx.c',
'atl_ethdev.c',
diff --git a/drivers/net/bnx2x/meson.build b/drivers/net/bnx2x/meson.build
index 4892bb234..4e9ea6995 100644
--- a/drivers/net/bnx2x/meson.build
+++ b/drivers/net/bnx2x/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
dep = dependency('zlib', required: false)
build = dep.found()
reason = 'missing dependency, "zlib"'
diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 2896337b5..24e594e19 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -2,6 +2,12 @@
# Copyright(c) 2018 Intel Corporation
# Copyright(c) 2020 Broadcom
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
headers = files('rte_pmd_bnxt.h')
includes += include_directories('tf_ulp')
diff --git a/drivers/net/bonding/meson.build b/drivers/net/bonding/meson.build
index adf64626e..3ff155bcb 100644
--- a/drivers/net/bonding/meson.build
+++ b/drivers/net/bonding/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
name = 'bond' #, james bond :-)
sources = files('rte_eth_bond_api.c', 'rte_eth_bond_pmd.c', 'rte_eth_bond_flow.c',
'rte_eth_bond_args.c', 'rte_eth_bond_8023ad.c', 'rte_eth_bond_alb.c')
diff --git a/drivers/net/cxgbe/meson.build b/drivers/net/cxgbe/meson.build
index 3992aba44..52b59d1bd 100644
--- a/drivers/net/cxgbe/meson.build
+++ b/drivers/net/cxgbe/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources = files('cxgbe_ethdev.c',
'cxgbe_main.c',
'cxgbevf_ethdev.c',
diff --git a/drivers/net/e1000/meson.build b/drivers/net/e1000/meson.build
index cf456995c..a517f86fc 100644
--- a/drivers/net/e1000/meson.build
+++ b/drivers/net/e1000/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/ena/meson.build b/drivers/net/ena/meson.build
index 189903b90..150f10c33 100644
--- a/drivers/net/ena/meson.build
+++ b/drivers/net/ena/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources = files('ena_ethdev.c',
'base/ena_com.c',
'base/ena_eth_com.c')
diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build
index 86ef2a8a2..345000e5d 100644
--- a/drivers/net/enic/meson.build
+++ b/drivers/net/enic/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Cisco Systems, Inc.
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources = files(
'base/vnic_cq.c',
'base/vnic_dev.c',
diff --git a/drivers/net/failsafe/meson.build b/drivers/net/failsafe/meson.build
index 56010e212..4e9d15bec 100644
--- a/drivers/net/failsafe/meson.build
+++ b/drivers/net/failsafe/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
cflags += '-std=gnu99'
cflags += '-D_DEFAULT_SOURCE'
cflags += '-D_XOPEN_SOURCE=700'
diff --git a/drivers/net/fm10k/meson.build b/drivers/net/fm10k/meson.build
index 2772ea4df..336b100cc 100644
--- a/drivers/net/fm10k/meson.build
+++ b/drivers/net/fm10k/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/hinic/meson.build b/drivers/net/hinic/meson.build
index bc7e24639..0298c0769 100644
--- a/drivers/net/hinic/meson.build
+++ b/drivers/net/hinic/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Huawei Technologies Co., Ltd
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 9b5033024..5085d6510 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -20,6 +20,7 @@
#include <rte_io.h>
#include "../i40e_logs.h"
+#include "i40e_status.h"
#define INLINE inline
#define STATIC static
@@ -67,6 +68,15 @@ typedef enum i40e_status_code i40e_status;
#define false 0
#define true 1
+/* Avoid macro redefinition warning on Windows */
+#ifdef RTE_EXEC_ENV_WINDOWS
+#ifdef min
+#undef min
+#endif
+#ifdef max
+#undef max
+#endif
+#endif
#define min(a,b) RTE_MIN(a,b)
#define max(a,b) RTE_MAX(a,b)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index c26b036b8..daf4a3f99 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1495,7 +1495,8 @@ i40evf_handle_aq_msg(struct rte_eth_dev *dev)
info.msg_len);
else {
/* read message and it's expected one */
- if (msg_opc == vf->pend_cmd) {
+ if ((volatile uint32_t)msg_opc ==
+ vf->pend_cmd) {
vf->cmd_retval = msg_ret;
/* prevent compiler reordering */
rte_compiler_barrier();
diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index 7a558fc73..e5f0e90cb 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -12,7 +12,7 @@
#include "i40e_rxtx.h"
#include "i40e_rxtx_vec_common.h"
-#include <x86intrin.h>
+#include <rte_vect.h>
#ifndef __INTEL_COMPILER
#pragma GCC diagnostic ignored "-Wcast-qual"
diff --git a/drivers/net/i40e/i40e_tm.c b/drivers/net/i40e/i40e_tm.c
index 5d722f92c..cab296e1a 100644
--- a/drivers/net/i40e/i40e_tm.c
+++ b/drivers/net/i40e/i40e_tm.c
@@ -554,7 +554,7 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
}
/* check level */
if (level_id != RTE_TM_NODE_LEVEL_ID_ANY &&
- level_id != parent_node_type + 1) {
+ level_id != (uint32_t)parent_node_type + 1) {
error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS;
error->message = "Wrong level";
return -EINVAL;
diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build
index 26c02c440..a7b4a7adb 100644
--- a/drivers/net/iavf/meson.build
+++ b/drivers/net/iavf/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
cflags += ['-Wno-strict-aliasing']
includes += include_directories('../../common/iavf')
diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build
index 7b291269d..9866b78c6 100644
--- a/drivers/net/ice/meson.build
+++ b/drivers/net/ice/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/igc/meson.build b/drivers/net/igc/meson.build
index fba119c98..90c05ef81 100644
--- a/drivers/net/igc/meson.build
+++ b/drivers/net/igc/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019-2020 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/ionic/meson.build b/drivers/net/ionic/meson.build
index 1c6362d27..99aaae3e9 100644
--- a/drivers/net/ionic/meson.build
+++ b/drivers/net/ionic/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
# Copyright(c) 2019 Pensando
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources = files(
'ionic_mac_api.c',
'ionic_rx_filter.c',
diff --git a/drivers/net/ipn3ke/meson.build b/drivers/net/ipn3ke/meson.build
index d5000d807..c2d6fd238 100644
--- a/drivers/net/ipn3ke/meson.build
+++ b/drivers/net/ipn3ke/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
#
# Add the experimenatal APIs called from this PMD
# rte_eth_switch_domain_alloc()
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index f10437891..0b7d0257b 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
subdir('base')
diff --git a/drivers/net/kni/meson.build b/drivers/net/kni/meson.build
index d9fa898d1..337508c28 100644
--- a/drivers/net/kni/meson.build
+++ b/drivers/net/kni/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
# this driver can be built if-and-only-if KNI library is buildable
build = dpdk_conf.has('RTE_LIB_KNI')
reason = 'missing dependency, DPDK KNI library'
diff --git a/drivers/net/liquidio/meson.build b/drivers/net/liquidio/meson.build
index 9ae48e213..12834e4b0 100644
--- a/drivers/net/liquidio/meson.build
+++ b/drivers/net/liquidio/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources = files('base/lio_23xx_vf.c',
'base/lio_mbox.c',
'lio_ethdev.c',
diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index 29f477750..b489088f1 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -1,9 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- subdir_done()
-endif
drivers = ['af_packet',
'af_xdp',
diff --git a/drivers/net/mlx5/windows/meson.build b/drivers/net/mlx5/windows/meson.build
new file mode 100644
index 000000000..e69de29bb
diff --git a/drivers/net/mvneta/meson.build b/drivers/net/mvneta/meson.build
index 8d7202788..7ef71b243 100644
--- a/drivers/net/mvneta/meson.build
+++ b/drivers/net/mvneta/meson.build
@@ -3,6 +3,12 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
path = get_option('lib_musdk_dir')
lib_dir = path + '/lib'
inc_dir = path + '/include'
diff --git a/drivers/net/mvpp2/meson.build b/drivers/net/mvpp2/meson.build
index e06eddaac..fff909877 100644
--- a/drivers/net/mvpp2/meson.build
+++ b/drivers/net/mvpp2/meson.build
@@ -3,6 +3,12 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
path = get_option('lib_musdk_dir')
lib_dir = path + '/lib'
inc_dir = path + '/include'
diff --git a/drivers/net/netvsc/meson.build b/drivers/net/netvsc/meson.build
index f3f52f732..6c0f86991 100644
--- a/drivers/net/netvsc/meson.build
+++ b/drivers/net/netvsc/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Microsoft Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
build = dpdk_conf.has('RTE_BUS_VMBUS')
reason = 'missing dependency, DPDK VMBus driver'
sources = files('hn_ethdev.c', 'hn_rxtx.c', 'hn_rndis.c', 'hn_nvs.c', 'hn_vf.c')
diff --git a/drivers/net/nfb/meson.build b/drivers/net/nfb/meson.build
index d53e8eca7..7bcc4e08f 100644
--- a/drivers/net/nfb/meson.build
+++ b/drivers/net/nfb/meson.build
@@ -3,6 +3,12 @@
# Copyright(c) 2019 Netcope Technologies, a.s. <info@netcope.com>
# All rights reserved.
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
dep = dependency('netcope-common', required: false)
reason = 'missing dependency, "libnfb"'
build = dep.found()
diff --git a/drivers/net/null/meson.build b/drivers/net/null/meson.build
index 68ac0d2ae..69edb9e24 100644
--- a/drivers/net/null/meson.build
+++ b/drivers/net/null/meson.build
@@ -1,4 +1,10 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources = files('rte_eth_null.c')
diff --git a/drivers/net/octeontx/meson.build b/drivers/net/octeontx/meson.build
index e8d3ff4a3..cc93f5d4f 100644
--- a/drivers/net/octeontx/meson.build
+++ b/drivers/net/octeontx/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Cavium, Inc
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/octeontx2/meson.build b/drivers/net/octeontx2/meson.build
index 638c04a2f..bf15e52b4 100644
--- a/drivers/net/octeontx2/meson.build
+++ b/drivers/net/octeontx2/meson.build
@@ -2,6 +2,12 @@
# Copyright(C) 2019 Marvell International Ltd.
#
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
if not dpdk_conf.get('RTE_ARCH_64')
build = false
reason = 'only supported on 64-bit'
diff --git a/drivers/net/pcap/meson.build b/drivers/net/pcap/meson.build
index b680710aa..31dae19f5 100644
--- a/drivers/net/pcap/meson.build
+++ b/drivers/net/pcap/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
if not dpdk_conf.has('RTE_PORT_PCAP')
build = false
reason = 'missing dependency, "libpcap"'
diff --git a/drivers/net/qede/meson.build b/drivers/net/qede/meson.build
index ff0ac0b03..f6b093319 100644
--- a/drivers/net/qede/meson.build
+++ b/drivers/net/qede/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/ring/meson.build b/drivers/net/ring/meson.build
index 26a324eeb..2ceea4a9c 100644
--- a/drivers/net/ring/meson.build
+++ b/drivers/net/ring/meson.build
@@ -1,5 +1,11 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources = files('rte_eth_ring.c')
headers = files('rte_eth_ring.h')
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
index be888bd87..b10c2ef52 100644
--- a/drivers/net/sfc/meson.build
+++ b/drivers/net/sfc/meson.build
@@ -6,6 +6,12 @@
# This software was jointly developed between OKTET Labs (under contract
# for Solarflare) and Solarflare Communications, Inc.
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
build = false
reason = 'only supported on x86_64 and aarch64'
diff --git a/drivers/net/szedata2/meson.build b/drivers/net/szedata2/meson.build
index b53fcbc59..a846b2770 100644
--- a/drivers/net/szedata2/meson.build
+++ b/drivers/net/szedata2/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
dep = dependency('libsze2', required: false)
build = dep.found()
reason = 'missing dependency, "libsze2"'
diff --git a/drivers/net/thunderx/meson.build b/drivers/net/thunderx/meson.build
index 69819a97f..a9a326b06 100644
--- a/drivers/net/thunderx/meson.build
+++ b/drivers/net/thunderx/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Cavium, Inc
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/txgbe/meson.build b/drivers/net/txgbe/meson.build
index 345dffaf6..2e79e72dc 100644
--- a/drivers/net/txgbe/meson.build
+++ b/drivers/net/txgbe/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2015-2020
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/vhost/meson.build b/drivers/net/vhost/meson.build
index 1ae4854b8..a8fd3325a 100644
--- a/drivers/net/vhost/meson.build
+++ b/drivers/net/vhost/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
build = dpdk_conf.has('RTE_LIB_VHOST')
reason = 'missing dependency, DPDK vhost library'
sources = files('rte_eth_vhost.c')
diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
index eaed46373..c812d085e 100644
--- a/drivers/net/virtio/meson.build
+++ b/drivers/net/virtio/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources += files('virtio_ethdev.c',
'virtio_pci.c',
'virtio_rxtx.c',
diff --git a/drivers/net/vmxnet3/meson.build b/drivers/net/vmxnet3/meson.build
index 0641f776f..b817bbb29 100644
--- a/drivers/net/vmxnet3/meson.build
+++ b/drivers/net/vmxnet3/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+if is_windows
+ build = false
+ reason = 'Not supported on Windows'
+ subdir_done()
+endif
+
sources += files(
'vmxnet3_ethdev.c',
'vmxnet3_rxtx.c',
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning
2020-12-10 0:53 ` Narcisa Ana Maria Vasile
@ 2020-12-17 23:15 ` Kadam, Pallavi
0 siblings, 0 replies; 32+ messages in thread
From: Kadam, Pallavi @ 2020-12-17 23:15 UTC (permalink / raw)
To: Narcisa Ana Maria Vasile
Cc: dev, thomas, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile,
talshn, ferruh.yigit, beilei.xing, jia.guo
On 12/9/2020 4:53 PM, Narcisa Ana Maria Vasile wrote:
> On Fri, Dec 04, 2020 at 05:10:20PM -0800, Pallavi Kadam wrote:
>> Warning generated using Clang compiler:
>> ..\drivers\net\i40e\base/i40e_osdep.h:34:14: warning: forward references
>> to 'enum' types are a Microsoft extension
>> [-Wmicrosoft-enum-forward-reference]
>> typedef enum i40e_status_code i40e_status;
>> ^
>>
>> Adding -Wmicrosoft-enum-forward-reference compiler flag to disable
>> the warning on Windows Clang.
>>
>> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
>> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
>> ---
> Why not including the "i40e_status.h" header that contains the definition of the enum
> in this file?
Thanks, Naty. Added this header file in v2.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
2020-12-09 8:59 ` Thomas Monjalon
@ 2020-12-17 23:17 ` Kadam, Pallavi
0 siblings, 0 replies; 32+ messages in thread
From: Kadam, Pallavi @ 2020-12-17 23:17 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, beilei.xing, jia.guo
On 12/9/2020 12:59 AM, Thomas Monjalon wrote:
> 09/12/2020 01:21, Kadam, Pallavi:
>> On 12/6/2020 7:49 AM, Thomas Monjalon wrote:
>>> 05/12/2020 02:10, Pallavi Kadam:
>>>> --- a/lib/librte_eal/windows/include/rte_windows.h
>>>> +++ b/lib/librte_eal/windows/include/rte_windows.h
>>>> @@ -18,6 +18,11 @@
>>>> #define WIN32_LEAN_AND_MEAN
>>>> #endif
>>>>
>>>> +#ifdef __clang__
>>>> +#undef _m_prefetchw
>>>> +#define _m_prefetchw __m_prefetchw
>>>> +#endif
>>> These changes are not specific to i40e, please separate.
>> Ok, will create a separate patch in v2.
>> This change is required once we add rte_random.c file on windows.
>> So, may be addition of rte_random.c file and this change should go together?
>> Please suggest. Thanks,
> Yes absolutely, addition of random feature should be atomic in a patch.
Ok. Created a separate patch in v2. Thanks!
>
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/2] build: i40e PMD on Windows
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 2/2] build: i40e PMD on Windows Pallavi Kadam
@ 2020-12-18 11:27 ` Thomas Monjalon
2020-12-18 18:42 ` Kadam, Pallavi
0 siblings, 1 reply; 32+ messages in thread
From: Thomas Monjalon @ 2020-12-18 11:27 UTC (permalink / raw)
To: Pallavi Kadam
Cc: dev, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, bruce.richardson, beilei.xing, jia.guo
17/12/2020 23:59, Pallavi Kadam:
> Adds temp folder mlx5/windows as it is required to build this patch
> without any build error. This folder will be removed once mlx5 PMD
> patches are merged.
Why is it required?
> +if is_windows
> + build = false
> + reason = 'Not supported on Windows'
> + subdir_done()
> +endif
As you can see in other files, the reason starts always with a lowercase letter.
Please replace the first capital letter.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] eal: add rte_random.c file on windows
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 1/2] eal: add rte_random.c file on windows Pallavi Kadam
@ 2020-12-18 11:29 ` Thomas Monjalon
2020-12-18 18:49 ` Kadam, Pallavi
0 siblings, 1 reply; 32+ messages in thread
From: Thomas Monjalon @ 2020-12-18 11:29 UTC (permalink / raw)
To: Pallavi Kadam
Cc: dev, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, bruce.richardson, beilei.xing, jia.guo
17/12/2020 23:59, Pallavi Kadam:
> This file is required to compile and build i40e PMD on Windows.
> Add rte_rand variable to export file.
>
> Redefine _m_prefetchw for Clang toolchain due to following error
> with respect to conflicting types:
>
> FAILED: lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj
> clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj.rsp
> In file included from ../lib/librte_eal/common/rte_random.c:13:
> In file included from ..\lib/librte_eal/include\rte_eal.h:20:
> In file included from ..\lib/librte_eal/include\rte_per_lcore.h:25:
> In file included from ..\lib/librte_eal/windows/include\pthread.h:21:
> In file included from ..\lib/librte_eal/windows/include\rte_windows.h:27:
> In file included from C:\Program Files (x86)\Windows Kits\10\include\
> 10.0.18362.0\um\windows.h:171:
> In file included from C:\Program Files (x86)\Windows Kits\10\include\
> 10.0.18362.0\shared\windef.h:24:
> In file included from C:\Program Files (x86)\Windows Kits\10\include\
> 10.0.18362.0\shared\minwindef.h:182:
> C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\
> winnt.h:3324:1: error: conflicting types for '_m_prefetchw'
> _m_prefetchw (
> ^
> C:\Program Files\LLVM\lib\clang\10.0.0\include\prfchwintrin.h:50:1:
> note: previous definition is here
> _m_prefetchw(void *__P)
> ^
> 1 error generated.
>
> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
> ---
> +#ifdef RTE_TOOLCHAIN_CLANG
> +#undef _m_prefetchw
> +#define _m_prefetchw __m_prefetchw
> +#endif
It deserves a comment explaining why __m_prefetchw is required.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/2] build: i40e PMD on Windows
2020-12-18 11:27 ` Thomas Monjalon
@ 2020-12-18 18:42 ` Kadam, Pallavi
0 siblings, 0 replies; 32+ messages in thread
From: Kadam, Pallavi @ 2020-12-18 18:42 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, bruce.richardson, beilei.xing, jia.guo
Hi Thomas,
On 12/18/2020 3:27 AM, Thomas Monjalon wrote:
> 17/12/2020 23:59, Pallavi Kadam:
>> Adds temp folder mlx5/windows as it is required to build this patch
>> without any build error. This folder will be removed once mlx5 PMD
>> patches are merged.
> Why is it required?
The patch [1] already supports Windows build for mlx5 PMD.
However, there is no Windows folder in the current main branch
and this gives following error when building with meson
after entire "net" dir is enabled:
drivers\net\mlx5\meson.build:56:0:
ERROR: Non-existent build file 'drivers\\net/mlx5\\windows\\meson.build'
[1]http://patches.dpdk.org/patch/70839/ <http://patches.dpdk.org/patch/70839/>
>
>> +if is_windows
>> + build = false
>> + reason = 'Not supported on Windows'
>> + subdir_done()
>> +endif
> As you can see in other files, the reason starts always with a lowercase letter.
> Please replace the first capital letter.
Ok. I'll replace first capital letter in v3. Thanks!
>
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] eal: add rte_random.c file on windows
2020-12-18 11:29 ` Thomas Monjalon
@ 2020-12-18 18:49 ` Kadam, Pallavi
0 siblings, 0 replies; 32+ messages in thread
From: Kadam, Pallavi @ 2020-12-18 18:49 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, ranjit.menon, dmitry.kozliuk, Narcisa.Vasile, talshn,
ferruh.yigit, bruce.richardson, beilei.xing, jia.guo
On 12/18/2020 3:29 AM, Thomas Monjalon wrote:
> 17/12/2020 23:59, Pallavi Kadam:
>> This file is required to compile and build i40e PMD on Windows.
>> Add rte_rand variable to export file.
>>
>> Redefine _m_prefetchw for Clang toolchain due to following error
>> with respect to conflicting types:
>>
>> FAILED: lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj
>> clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj.rsp
>> In file included from ../lib/librte_eal/common/rte_random.c:13:
>> In file included from ..\lib/librte_eal/include\rte_eal.h:20:
>> In file included from ..\lib/librte_eal/include\rte_per_lcore.h:25:
>> In file included from ..\lib/librte_eal/windows/include\pthread.h:21:
>> In file included from ..\lib/librte_eal/windows/include\rte_windows.h:27:
>> In file included from C:\Program Files (x86)\Windows Kits\10\include\
>> 10.0.18362.0\um\windows.h:171:
>> In file included from C:\Program Files (x86)\Windows Kits\10\include\
>> 10.0.18362.0\shared\windef.h:24:
>> In file included from C:\Program Files (x86)\Windows Kits\10\include\
>> 10.0.18362.0\shared\minwindef.h:182:
>> C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\
>> winnt.h:3324:1: error: conflicting types for '_m_prefetchw'
>> _m_prefetchw (
>> ^
>> C:\Program Files\LLVM\lib\clang\10.0.0\include\prfchwintrin.h:50:1:
>> note: previous definition is here
>> _m_prefetchw(void *__P)
>> ^
>> 1 error generated.
>>
>> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
>> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
>> ---
>> +#ifdef RTE_TOOLCHAIN_CLANG
>> +#undef _m_prefetchw
>> +#define _m_prefetchw __m_prefetchw
>> +#endif
> It deserves a comment explaining why __m_prefetchw is required.
Will add a comment in v3. Thanks!
>
>
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v3 0/2] Support i40e PMD on Windows
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 0/2] Support i40e PMD on Windows Pallavi Kadam
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 1/2] eal: add rte_random.c file on windows Pallavi Kadam
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 2/2] build: i40e PMD on Windows Pallavi Kadam
@ 2020-12-22 0:45 ` Pallavi Kadam
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 1/2] eal: add rte_random.c file on windows Pallavi Kadam
` (2 more replies)
2 siblings, 3 replies; 32+ messages in thread
From: Pallavi Kadam @ 2020-12-22 0:45 UTC (permalink / raw)
To: dev, thomas
Cc: ranjit.menon, dmitry.kozliuk, bruce.richardson, ferruh.yigit,
beilei.xing, jia.guo, Narcisa.Vasile, talshn, pallavi.kadam
This patch-set enables building the Intel i40e PMD on Windows.
Depends-on: series-14296 ("eal/windows: add interrupt functions stub")
v3 changes:
- Added a comment for __m_prefetchw (Thomas)
- Replaced the letter from the reason to lowercase (Thomas)
v2 changes:
- Updated commit message (Dmitry Kozlyuk)
- Replaced x86intrin.h with rte_vect.h (Dmitry Kozlyuk)
- Disable all drivers that do not support on Windows and enable
as required (Thomas and Bruce)
- added #include "i40e_status.h" for enum definition to avoid
forward references warning (Naty)
Pallavi Kadam (2):
eal: add rte_random.c file on windows
build: i40e PMD on Windows
drivers/net/af_xdp/meson.build | 6 ++++++
drivers/net/ark/meson.build | 6 ++++++
drivers/net/atlantic/meson.build | 6 ++++++
drivers/net/bnx2x/meson.build | 6 ++++++
drivers/net/bnxt/meson.build | 6 ++++++
drivers/net/bonding/meson.build | 6 ++++++
drivers/net/cxgbe/meson.build | 6 ++++++
drivers/net/e1000/meson.build | 6 ++++++
drivers/net/ena/meson.build | 6 ++++++
drivers/net/enic/meson.build | 6 ++++++
drivers/net/failsafe/meson.build | 6 ++++++
drivers/net/fm10k/meson.build | 6 ++++++
drivers/net/hinic/meson.build | 6 ++++++
drivers/net/i40e/base/i40e_osdep.h | 10 ++++++++++
drivers/net/i40e/i40e_ethdev_vf.c | 3 ++-
drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +-
drivers/net/i40e/i40e_tm.c | 2 +-
drivers/net/iavf/meson.build | 6 ++++++
drivers/net/ice/meson.build | 6 ++++++
drivers/net/igc/meson.build | 6 ++++++
drivers/net/ionic/meson.build | 6 ++++++
drivers/net/ipn3ke/meson.build | 6 ++++++
drivers/net/ixgbe/meson.build | 6 ++++++
drivers/net/kni/meson.build | 6 ++++++
drivers/net/liquidio/meson.build | 6 ++++++
drivers/net/meson.build | 3 ---
drivers/net/mlx5/windows/meson.build | 0
drivers/net/mvneta/meson.build | 6 ++++++
drivers/net/mvpp2/meson.build | 6 ++++++
drivers/net/netvsc/meson.build | 6 ++++++
drivers/net/nfb/meson.build | 6 ++++++
drivers/net/null/meson.build | 6 ++++++
drivers/net/octeontx/meson.build | 6 ++++++
drivers/net/octeontx2/meson.build | 6 ++++++
drivers/net/pcap/meson.build | 6 ++++++
drivers/net/qede/meson.build | 6 ++++++
drivers/net/ring/meson.build | 6 ++++++
drivers/net/sfc/meson.build | 6 ++++++
drivers/net/szedata2/meson.build | 6 ++++++
drivers/net/thunderx/meson.build | 6 ++++++
drivers/net/txgbe/meson.build | 6 ++++++
drivers/net/vhost/meson.build | 6 ++++++
drivers/net/virtio/meson.build | 6 ++++++
drivers/net/vmxnet3/meson.build | 6 ++++++
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/rte_eal_exports.def | 1 +
lib/librte_eal/windows/include/rte_windows.h | 6 ++++++
47 files changed, 250 insertions(+), 6 deletions(-)
create mode 100644 drivers/net/mlx5/windows/meson.build
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v3 1/2] eal: add rte_random.c file on windows
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 0/2] Support " Pallavi Kadam
@ 2020-12-22 0:45 ` Pallavi Kadam
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows Pallavi Kadam
2021-01-14 22:55 ` [dpdk-dev] [PATCH v3 0/2] Support " Thomas Monjalon
2 siblings, 0 replies; 32+ messages in thread
From: Pallavi Kadam @ 2020-12-22 0:45 UTC (permalink / raw)
To: dev, thomas
Cc: ranjit.menon, dmitry.kozliuk, bruce.richardson, ferruh.yigit,
beilei.xing, jia.guo, Narcisa.Vasile, talshn, pallavi.kadam
This file is required to compile and build i40e PMD on Windows.
Add rte_rand variable to export file.
Redefine _m_prefetchw for Clang toolchain due to following error
with respect to conflicting types:
FAILED: lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj
clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.obj.rsp
In file included from ../lib/librte_eal/common/rte_random.c:13:
In file included from ..\lib/librte_eal/include\rte_eal.h:20:
In file included from ..\lib/librte_eal/include\rte_per_lcore.h:25:
In file included from ..\lib/librte_eal/windows/include\pthread.h:21:
In file included from ..\lib/librte_eal/windows/include\rte_windows.h:27:
In file included from C:\Program Files (x86)\Windows Kits\10\include\
10.0.18362.0\um\windows.h:171:
In file included from C:\Program Files (x86)\Windows Kits\10\include\
10.0.18362.0\shared\windef.h:24:
In file included from C:\Program Files (x86)\Windows Kits\10\include\
10.0.18362.0\shared\minwindef.h:182:
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\
winnt.h:3324:1: error: conflicting types for '_m_prefetchw'
_m_prefetchw (
^
C:\Program Files\LLVM\lib\clang\10.0.0\include\prfchwintrin.h:50:1:
note: previous definition is here
_m_prefetchw(void *__P)
^
1 error generated.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/rte_eal_exports.def | 1 +
lib/librte_eal/windows/include/rte_windows.h | 6 ++++++
3 files changed, 8 insertions(+)
diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
index 39abf7a0a..98e8fffd4 100644
--- a/lib/librte_eal/common/meson.build
+++ b/lib/librte_eal/common/meson.build
@@ -33,6 +33,7 @@ if is_windows
'malloc_heap.c',
'rte_malloc.c',
'eal_common_timer.c',
+ 'rte_random.c',
'rte_service.c',
)
subdir_done()
diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 6a6be1cfa..a2ad4d633 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -114,6 +114,7 @@ EXPORTS
rte_memzone_reserve_bounded
rte_memzone_walk
rte_openlog_stream
+ rte_rand
rte_realloc
rte_rtm_supported
rte_service_attr_get
diff --git a/lib/librte_eal/windows/include/rte_windows.h b/lib/librte_eal/windows/include/rte_windows.h
index b82af34f6..0063b5d78 100644
--- a/lib/librte_eal/windows/include/rte_windows.h
+++ b/lib/librte_eal/windows/include/rte_windows.h
@@ -18,6 +18,12 @@
#define WIN32_LEAN_AND_MEAN
#endif
+/* Override Windows SDK definition of _m_prefetchw to avoid conflicting types */
+#ifdef RTE_TOOLCHAIN_CLANG
+#undef _m_prefetchw
+#define _m_prefetchw __m_prefetchw
+#endif
+
/* Must come first. */
#include <windows.h>
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 0/2] Support " Pallavi Kadam
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 1/2] eal: add rte_random.c file on windows Pallavi Kadam
@ 2020-12-22 0:45 ` Pallavi Kadam
2021-01-08 22:58 ` Jie Zhou
2021-01-13 22:52 ` Thomas Monjalon
2021-01-14 22:55 ` [dpdk-dev] [PATCH v3 0/2] Support " Thomas Monjalon
2 siblings, 2 replies; 32+ messages in thread
From: Pallavi Kadam @ 2020-12-22 0:45 UTC (permalink / raw)
To: dev, thomas
Cc: ranjit.menon, dmitry.kozliuk, bruce.richardson, ferruh.yigit,
beilei.xing, jia.guo, Narcisa.Vasile, talshn, pallavi.kadam
Allows i40e PMD to compile on Windows and disable other drivers.
Disable few warnings with Clang such as comparison of integers of
different signs and macro redefinitions.
Adds temp folder mlx5/windows as it is required to build this patch
without any build error. This folder will be removed once mlx5 PMD
patches are merged.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
drivers/net/af_xdp/meson.build | 6 ++++++
drivers/net/ark/meson.build | 6 ++++++
drivers/net/atlantic/meson.build | 6 ++++++
drivers/net/bnx2x/meson.build | 6 ++++++
drivers/net/bnxt/meson.build | 6 ++++++
drivers/net/bonding/meson.build | 6 ++++++
drivers/net/cxgbe/meson.build | 6 ++++++
drivers/net/e1000/meson.build | 6 ++++++
drivers/net/ena/meson.build | 6 ++++++
drivers/net/enic/meson.build | 6 ++++++
drivers/net/failsafe/meson.build | 6 ++++++
drivers/net/fm10k/meson.build | 6 ++++++
drivers/net/hinic/meson.build | 6 ++++++
drivers/net/i40e/base/i40e_osdep.h | 10 ++++++++++
drivers/net/i40e/i40e_ethdev_vf.c | 3 ++-
drivers/net/i40e/i40e_rxtx_vec_avx2.c | 2 +-
drivers/net/i40e/i40e_tm.c | 2 +-
drivers/net/iavf/meson.build | 6 ++++++
drivers/net/ice/meson.build | 6 ++++++
drivers/net/igc/meson.build | 6 ++++++
drivers/net/ionic/meson.build | 6 ++++++
drivers/net/ipn3ke/meson.build | 6 ++++++
drivers/net/ixgbe/meson.build | 6 ++++++
drivers/net/kni/meson.build | 6 ++++++
drivers/net/liquidio/meson.build | 6 ++++++
drivers/net/meson.build | 3 ---
drivers/net/mlx5/windows/meson.build | 0
drivers/net/mvneta/meson.build | 6 ++++++
drivers/net/mvpp2/meson.build | 6 ++++++
drivers/net/netvsc/meson.build | 6 ++++++
drivers/net/nfb/meson.build | 6 ++++++
drivers/net/null/meson.build | 6 ++++++
drivers/net/octeontx/meson.build | 6 ++++++
drivers/net/octeontx2/meson.build | 6 ++++++
drivers/net/pcap/meson.build | 6 ++++++
drivers/net/qede/meson.build | 6 ++++++
drivers/net/ring/meson.build | 6 ++++++
drivers/net/sfc/meson.build | 6 ++++++
drivers/net/szedata2/meson.build | 6 ++++++
drivers/net/thunderx/meson.build | 6 ++++++
drivers/net/txgbe/meson.build | 6 ++++++
drivers/net/vhost/meson.build | 6 ++++++
drivers/net/virtio/meson.build | 6 ++++++
drivers/net/vmxnet3/meson.build | 6 ++++++
44 files changed, 242 insertions(+), 6 deletions(-)
create mode 100644 drivers/net/mlx5/windows/meson.build
diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index fead8dd99..dce123036 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources = files('rte_eth_af_xdp.c')
bpf_dep = dependency('libbpf', required: false)
diff --git a/drivers/net/ark/meson.build b/drivers/net/ark/meson.build
index 80bce94e1..aea3ba493 100644
--- a/drivers/net/ark/meson.build
+++ b/drivers/net/ark/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
headers = files('rte_pmd_ark.h')
sources = files('ark_ddm.c',
diff --git a/drivers/net/atlantic/meson.build b/drivers/net/atlantic/meson.build
index 60b84684e..01373f868 100644
--- a/drivers/net/atlantic/meson.build
+++ b/drivers/net/atlantic/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Aquantia Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources = files(
'atl_rxtx.c',
'atl_ethdev.c',
diff --git a/drivers/net/bnx2x/meson.build b/drivers/net/bnx2x/meson.build
index 4892bb234..8837ef424 100644
--- a/drivers/net/bnx2x/meson.build
+++ b/drivers/net/bnx2x/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
dep = dependency('zlib', required: false)
build = dep.found()
reason = 'missing dependency, "zlib"'
diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 2896337b5..092655697 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -2,6 +2,12 @@
# Copyright(c) 2018 Intel Corporation
# Copyright(c) 2020 Broadcom
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
headers = files('rte_pmd_bnxt.h')
includes += include_directories('tf_ulp')
diff --git a/drivers/net/bonding/meson.build b/drivers/net/bonding/meson.build
index adf64626e..4682903a6 100644
--- a/drivers/net/bonding/meson.build
+++ b/drivers/net/bonding/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
name = 'bond' #, james bond :-)
sources = files('rte_eth_bond_api.c', 'rte_eth_bond_pmd.c', 'rte_eth_bond_flow.c',
'rte_eth_bond_args.c', 'rte_eth_bond_8023ad.c', 'rte_eth_bond_alb.c')
diff --git a/drivers/net/cxgbe/meson.build b/drivers/net/cxgbe/meson.build
index 3992aba44..52896ea85 100644
--- a/drivers/net/cxgbe/meson.build
+++ b/drivers/net/cxgbe/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources = files('cxgbe_ethdev.c',
'cxgbe_main.c',
'cxgbevf_ethdev.c',
diff --git a/drivers/net/e1000/meson.build b/drivers/net/e1000/meson.build
index cf456995c..43ad52cbc 100644
--- a/drivers/net/e1000/meson.build
+++ b/drivers/net/e1000/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/ena/meson.build b/drivers/net/ena/meson.build
index 189903b90..772fbfc88 100644
--- a/drivers/net/ena/meson.build
+++ b/drivers/net/ena/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources = files('ena_ethdev.c',
'base/ena_com.c',
'base/ena_eth_com.c')
diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build
index 86ef2a8a2..ed699bb37 100644
--- a/drivers/net/enic/meson.build
+++ b/drivers/net/enic/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Cisco Systems, Inc.
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources = files(
'base/vnic_cq.c',
'base/vnic_dev.c',
diff --git a/drivers/net/failsafe/meson.build b/drivers/net/failsafe/meson.build
index 56010e212..d8343be63 100644
--- a/drivers/net/failsafe/meson.build
+++ b/drivers/net/failsafe/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
cflags += '-std=gnu99'
cflags += '-D_DEFAULT_SOURCE'
cflags += '-D_XOPEN_SOURCE=700'
diff --git a/drivers/net/fm10k/meson.build b/drivers/net/fm10k/meson.build
index 2772ea4df..fa264f489 100644
--- a/drivers/net/fm10k/meson.build
+++ b/drivers/net/fm10k/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/hinic/meson.build b/drivers/net/hinic/meson.build
index bc7e24639..61ea3954c 100644
--- a/drivers/net/hinic/meson.build
+++ b/drivers/net/hinic/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Huawei Technologies Co., Ltd
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 9b5033024..5085d6510 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -20,6 +20,7 @@
#include <rte_io.h>
#include "../i40e_logs.h"
+#include "i40e_status.h"
#define INLINE inline
#define STATIC static
@@ -67,6 +68,15 @@ typedef enum i40e_status_code i40e_status;
#define false 0
#define true 1
+/* Avoid macro redefinition warning on Windows */
+#ifdef RTE_EXEC_ENV_WINDOWS
+#ifdef min
+#undef min
+#endif
+#ifdef max
+#undef max
+#endif
+#endif
#define min(a,b) RTE_MIN(a,b)
#define max(a,b) RTE_MAX(a,b)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index c26b036b8..daf4a3f99 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1495,7 +1495,8 @@ i40evf_handle_aq_msg(struct rte_eth_dev *dev)
info.msg_len);
else {
/* read message and it's expected one */
- if (msg_opc == vf->pend_cmd) {
+ if ((volatile uint32_t)msg_opc ==
+ vf->pend_cmd) {
vf->cmd_retval = msg_ret;
/* prevent compiler reordering */
rte_compiler_barrier();
diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index 7a558fc73..e5f0e90cb 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -12,7 +12,7 @@
#include "i40e_rxtx.h"
#include "i40e_rxtx_vec_common.h"
-#include <x86intrin.h>
+#include <rte_vect.h>
#ifndef __INTEL_COMPILER
#pragma GCC diagnostic ignored "-Wcast-qual"
diff --git a/drivers/net/i40e/i40e_tm.c b/drivers/net/i40e/i40e_tm.c
index 5d722f92c..cab296e1a 100644
--- a/drivers/net/i40e/i40e_tm.c
+++ b/drivers/net/i40e/i40e_tm.c
@@ -554,7 +554,7 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
}
/* check level */
if (level_id != RTE_TM_NODE_LEVEL_ID_ANY &&
- level_id != parent_node_type + 1) {
+ level_id != (uint32_t)parent_node_type + 1) {
error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS;
error->message = "Wrong level";
return -EINVAL;
diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build
index 26c02c440..ac2af81f7 100644
--- a/drivers/net/iavf/meson.build
+++ b/drivers/net/iavf/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
cflags += ['-Wno-strict-aliasing']
includes += include_directories('../../common/iavf')
diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build
index 7b291269d..9aab0249a 100644
--- a/drivers/net/ice/meson.build
+++ b/drivers/net/ice/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/igc/meson.build b/drivers/net/igc/meson.build
index fba119c98..b971e6f8c 100644
--- a/drivers/net/igc/meson.build
+++ b/drivers/net/igc/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019-2020 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/ionic/meson.build b/drivers/net/ionic/meson.build
index 1c6362d27..631ea27f5 100644
--- a/drivers/net/ionic/meson.build
+++ b/drivers/net/ionic/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
# Copyright(c) 2019 Pensando
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources = files(
'ionic_mac_api.c',
'ionic_rx_filter.c',
diff --git a/drivers/net/ipn3ke/meson.build b/drivers/net/ipn3ke/meson.build
index d5000d807..65de9d517 100644
--- a/drivers/net/ipn3ke/meson.build
+++ b/drivers/net/ipn3ke/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
#
# Add the experimenatal APIs called from this PMD
# rte_eth_switch_domain_alloc()
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index f10437891..76cbfb830 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
subdir('base')
diff --git a/drivers/net/kni/meson.build b/drivers/net/kni/meson.build
index d9fa898d1..4d5e5fe36 100644
--- a/drivers/net/kni/meson.build
+++ b/drivers/net/kni/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
# this driver can be built if-and-only-if KNI library is buildable
build = dpdk_conf.has('RTE_LIB_KNI')
reason = 'missing dependency, DPDK KNI library'
diff --git a/drivers/net/liquidio/meson.build b/drivers/net/liquidio/meson.build
index 9ae48e213..4965ebe85 100644
--- a/drivers/net/liquidio/meson.build
+++ b/drivers/net/liquidio/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources = files('base/lio_23xx_vf.c',
'base/lio_mbox.c',
'lio_ethdev.c',
diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index 29f477750..b489088f1 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -1,9 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if is_windows
- subdir_done()
-endif
drivers = ['af_packet',
'af_xdp',
diff --git a/drivers/net/mlx5/windows/meson.build b/drivers/net/mlx5/windows/meson.build
new file mode 100644
index 000000000..e69de29bb
diff --git a/drivers/net/mvneta/meson.build b/drivers/net/mvneta/meson.build
index 8d7202788..c10d2f789 100644
--- a/drivers/net/mvneta/meson.build
+++ b/drivers/net/mvneta/meson.build
@@ -3,6 +3,12 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
path = get_option('lib_musdk_dir')
lib_dir = path + '/lib'
inc_dir = path + '/include'
diff --git a/drivers/net/mvpp2/meson.build b/drivers/net/mvpp2/meson.build
index e06eddaac..4ed392374 100644
--- a/drivers/net/mvpp2/meson.build
+++ b/drivers/net/mvpp2/meson.build
@@ -3,6 +3,12 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
path = get_option('lib_musdk_dir')
lib_dir = path + '/lib'
inc_dir = path + '/include'
diff --git a/drivers/net/netvsc/meson.build b/drivers/net/netvsc/meson.build
index f3f52f732..c190124db 100644
--- a/drivers/net/netvsc/meson.build
+++ b/drivers/net/netvsc/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Microsoft Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
build = dpdk_conf.has('RTE_BUS_VMBUS')
reason = 'missing dependency, DPDK VMBus driver'
sources = files('hn_ethdev.c', 'hn_rxtx.c', 'hn_rndis.c', 'hn_nvs.c', 'hn_vf.c')
diff --git a/drivers/net/nfb/meson.build b/drivers/net/nfb/meson.build
index d53e8eca7..42f7921dc 100644
--- a/drivers/net/nfb/meson.build
+++ b/drivers/net/nfb/meson.build
@@ -3,6 +3,12 @@
# Copyright(c) 2019 Netcope Technologies, a.s. <info@netcope.com>
# All rights reserved.
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
dep = dependency('netcope-common', required: false)
reason = 'missing dependency, "libnfb"'
build = dep.found()
diff --git a/drivers/net/null/meson.build b/drivers/net/null/meson.build
index 68ac0d2ae..d9fb88fd7 100644
--- a/drivers/net/null/meson.build
+++ b/drivers/net/null/meson.build
@@ -1,4 +1,10 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources = files('rte_eth_null.c')
diff --git a/drivers/net/octeontx/meson.build b/drivers/net/octeontx/meson.build
index e8d3ff4a3..4e784b948 100644
--- a/drivers/net/octeontx/meson.build
+++ b/drivers/net/octeontx/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Cavium, Inc
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/octeontx2/meson.build b/drivers/net/octeontx2/meson.build
index 638c04a2f..e2c139a8b 100644
--- a/drivers/net/octeontx2/meson.build
+++ b/drivers/net/octeontx2/meson.build
@@ -2,6 +2,12 @@
# Copyright(C) 2019 Marvell International Ltd.
#
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
if not dpdk_conf.get('RTE_ARCH_64')
build = false
reason = 'only supported on 64-bit'
diff --git a/drivers/net/pcap/meson.build b/drivers/net/pcap/meson.build
index b680710aa..b65d91e70 100644
--- a/drivers/net/pcap/meson.build
+++ b/drivers/net/pcap/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
if not dpdk_conf.has('RTE_PORT_PCAP')
build = false
reason = 'missing dependency, "libpcap"'
diff --git a/drivers/net/qede/meson.build b/drivers/net/qede/meson.build
index ff0ac0b03..05ce69560 100644
--- a/drivers/net/qede/meson.build
+++ b/drivers/net/qede/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/ring/meson.build b/drivers/net/ring/meson.build
index 26a324eeb..fb6a5f7d6 100644
--- a/drivers/net/ring/meson.build
+++ b/drivers/net/ring/meson.build
@@ -1,5 +1,11 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources = files('rte_eth_ring.c')
headers = files('rte_eth_ring.h')
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
index be888bd87..c3ecdbe19 100644
--- a/drivers/net/sfc/meson.build
+++ b/drivers/net/sfc/meson.build
@@ -6,6 +6,12 @@
# This software was jointly developed between OKTET Labs (under contract
# for Solarflare) and Solarflare Communications, Inc.
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
build = false
reason = 'only supported on x86_64 and aarch64'
diff --git a/drivers/net/szedata2/meson.build b/drivers/net/szedata2/meson.build
index b53fcbc59..4c02830b0 100644
--- a/drivers/net/szedata2/meson.build
+++ b/drivers/net/szedata2/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
dep = dependency('libsze2', required: false)
build = dep.found()
reason = 'missing dependency, "libsze2"'
diff --git a/drivers/net/thunderx/meson.build b/drivers/net/thunderx/meson.build
index 69819a97f..dad5c5924 100644
--- a/drivers/net/thunderx/meson.build
+++ b/drivers/net/thunderx/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Cavium, Inc
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/txgbe/meson.build b/drivers/net/txgbe/meson.build
index 345dffaf6..a18660078 100644
--- a/drivers/net/txgbe/meson.build
+++ b/drivers/net/txgbe/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2015-2020
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
subdir('base')
objs = [base_objs]
diff --git a/drivers/net/vhost/meson.build b/drivers/net/vhost/meson.build
index 1ae4854b8..804b7a1dd 100644
--- a/drivers/net/vhost/meson.build
+++ b/drivers/net/vhost/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
build = dpdk_conf.has('RTE_LIB_VHOST')
reason = 'missing dependency, DPDK vhost library'
sources = files('rte_eth_vhost.c')
diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
index eaed46373..a06b9dde7 100644
--- a/drivers/net/virtio/meson.build
+++ b/drivers/net/virtio/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources += files('virtio_ethdev.c',
'virtio_pci.c',
'virtio_rxtx.c',
diff --git a/drivers/net/vmxnet3/meson.build b/drivers/net/vmxnet3/meson.build
index 0641f776f..124238666 100644
--- a/drivers/net/vmxnet3/meson.build
+++ b/drivers/net/vmxnet3/meson.build
@@ -1,6 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+if is_windows
+ build = false
+ reason = 'not supported on Windows'
+ subdir_done()
+endif
+
sources += files(
'vmxnet3_ethdev.c',
'vmxnet3_rxtx.c',
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows Pallavi Kadam
@ 2021-01-08 22:58 ` Jie Zhou
2021-01-13 22:52 ` Thomas Monjalon
1 sibling, 0 replies; 32+ messages in thread
From: Jie Zhou @ 2021-01-08 22:58 UTC (permalink / raw)
To: Pallavi Kadam
Cc: dev, thomas, ranjit.menon, dmitry.kozliuk, bruce.richardson,
ferruh.yigit, beilei.xing, jia.guo, Narcisa.Vasile, talshn
On Mon, Dec 21, 2020 at 04:45:11PM -0800, Pallavi Kadam wrote:
> Allows i40e PMD to compile on Windows and disable other drivers.
> Disable few warnings with Clang such as comparison of integers of
> different signs and macro redefinitions.
>
> Adds temp folder mlx5/windows as it is required to build this patch
> without any build error. This folder will be removed once mlx5 PMD
> patches are merged.
>
> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
> Acked-by: Jie Zhou <jizh@linux.microsoft.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows Pallavi Kadam
2021-01-08 22:58 ` Jie Zhou
@ 2021-01-13 22:52 ` Thomas Monjalon
2021-01-13 22:55 ` Ranjit Menon
1 sibling, 1 reply; 32+ messages in thread
From: Thomas Monjalon @ 2021-01-13 22:52 UTC (permalink / raw)
To: Pallavi Kadam
Cc: dev, ranjit.menon, dmitry.kozliuk, bruce.richardson,
ferruh.yigit, beilei.xing, jia.guo, Narcisa.Vasile, talshn
22/12/2020 01:45, Pallavi Kadam:
> Allows i40e PMD to compile on Windows and disable other drivers.
> Disable few warnings with Clang such as comparison of integers of
> different signs and macro redefinitions.
>
> Adds temp folder mlx5/windows as it is required to build this patch
> without any build error. This folder will be removed once mlx5 PMD
> patches are merged.
The mlx5 patches are merged, so this empty folder is not required anymore.
In reality this patch will enable both i40e and mlx5 PMDs.
I will change the title accordingly if you agree:
drivers/net: build i40e and mlx5 on Windows
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
2021-01-13 22:52 ` Thomas Monjalon
@ 2021-01-13 22:55 ` Ranjit Menon
2021-01-13 23:10 ` Thomas Monjalon
0 siblings, 1 reply; 32+ messages in thread
From: Ranjit Menon @ 2021-01-13 22:55 UTC (permalink / raw)
To: Thomas Monjalon, Pallavi Kadam
Cc: dev, dmitry.kozliuk, bruce.richardson, ferruh.yigit, beilei.xing,
jia.guo, Narcisa.Vasile, talshn
On 1/13/2021 2:52 PM, Thomas Monjalon wrote:
> 22/12/2020 01:45, Pallavi Kadam:
>> Allows i40e PMD to compile on Windows and disable other drivers.
>> Disable few warnings with Clang such as comparison of integers of
>> different signs and macro redefinitions.
>>
>> Adds temp folder mlx5/windows as it is required to build this patch
>> without any build error. This folder will be removed once mlx5 PMD
>> patches are merged.
> The mlx5 patches are merged, so this empty folder is not required anymore.
> In reality this patch will enable both i40e and mlx5 PMDs.
> I will change the title accordingly if you agree:
> drivers/net: build i40e and mlx5 on Windows
>
>
Yes. That should be fine. Thanks, Thomas. (Pallavi is out on vacation)
ranjit m.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
2021-01-13 22:55 ` Ranjit Menon
@ 2021-01-13 23:10 ` Thomas Monjalon
2021-01-14 1:51 ` Tal Shnaiderman
0 siblings, 1 reply; 32+ messages in thread
From: Thomas Monjalon @ 2021-01-13 23:10 UTC (permalink / raw)
To: Pallavi Kadam, Ranjit Menon
Cc: dev, dmitry.kozliuk, bruce.richardson, ferruh.yigit, beilei.xing,
jia.guo, Narcisa.Vasile, talshn
13/01/2021 23:55, Ranjit Menon:
> On 1/13/2021 2:52 PM, Thomas Monjalon wrote:
> > 22/12/2020 01:45, Pallavi Kadam:
> >> Allows i40e PMD to compile on Windows and disable other drivers.
> >> Disable few warnings with Clang such as comparison of integers of
> >> different signs and macro redefinitions.
> >>
> >> Adds temp folder mlx5/windows as it is required to build this patch
> >> without any build error. This folder will be removed once mlx5 PMD
> >> patches are merged.
> > The mlx5 patches are merged, so this empty folder is not required anymore.
> > In reality this patch will enable both i40e and mlx5 PMDs.
> > I will change the title accordingly if you agree:
> > drivers/net: build i40e and mlx5 on Windows
> >
> >
> Yes. That should be fine. Thanks, Thomas. (Pallavi is out on vacation)
OK
You may want to add another patch for doc
(i40e guide, release notes and features table).
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
2021-01-13 23:10 ` Thomas Monjalon
@ 2021-01-14 1:51 ` Tal Shnaiderman
0 siblings, 0 replies; 32+ messages in thread
From: Tal Shnaiderman @ 2021-01-14 1:51 UTC (permalink / raw)
To: NBU-Contact-Thomas Monjalon, Pallavi Kadam, Ranjit Menon
Cc: dev, dmitry.kozliuk, bruce.richardson, ferruh.yigit, beilei.xing,
jia.guo, Narcisa.Vasile
> Subject: Re: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
>
> External email: Use caution opening links or attachments
>
>
> 13/01/2021 23:55, Ranjit Menon:
> > On 1/13/2021 2:52 PM, Thomas Monjalon wrote:
> > > 22/12/2020 01:45, Pallavi Kadam:
> > >> Allows i40e PMD to compile on Windows and disable other drivers.
> > >> Disable few warnings with Clang such as comparison of integers of
> > >> different signs and macro redefinitions.
> > >>
> > >> Adds temp folder mlx5/windows as it is required to build this patch
> > >> without any build error. This folder will be removed once mlx5 PMD
> > >> patches are merged.
> > > The mlx5 patches are merged, so this empty folder is not required
> anymore.
> > > In reality this patch will enable both i40e and mlx5 PMDs.
> > > I will change the title accordingly if you agree:
> > > drivers/net: build i40e and mlx5 on Windows
> > >
> > >
> > Yes. That should be fine. Thanks, Thomas. (Pallavi is out on vacation)
>
> OK
> You may want to add another patch for doc (i40e guide, release notes and
> features table).
>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/2] Support i40e PMD on Windows
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 0/2] Support " Pallavi Kadam
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 1/2] eal: add rte_random.c file on windows Pallavi Kadam
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows Pallavi Kadam
@ 2021-01-14 22:55 ` Thomas Monjalon
2021-01-14 23:06 ` Ranjit Menon
2 siblings, 1 reply; 32+ messages in thread
From: Thomas Monjalon @ 2021-01-14 22:55 UTC (permalink / raw)
To: pallavi.kadam
Cc: dev, ranjit.menon, dmitry.kozliuk, bruce.richardson,
ferruh.yigit, beilei.xing, jia.guo, Narcisa.Vasile, talshn
22/12/2020 01:45, Pallavi Kadam:
> Pallavi Kadam (2):
> eal: add rte_random.c file on windows
> build: i40e PMD on Windows
Applied, thanks
For info, I've fixed an additional warning in i40e compilation on Windows:
drivers/net/i40e/i40e_hash.c:357:22: warning:
comparison of integers of different signs:
'enum rte_flow_item_type' and 'unsigned long long'
--- a/drivers/net/i40e/i40e_hash.c
+++ b/drivers/net/i40e/i40e_hash.c
@@ -354,9 +354,10 @@ i40e_hash_get_pattern_type(const struct rte_flow_item pattern[],
}
/* Check the previous item allows this sub-item. */
- if (prev_item_type >= RTE_DIM(pattern_next_allow_items) ||
+ if (prev_item_type >= (enum rte_flow_item_type)
+ RTE_DIM(pattern_next_allow_items) ||
!(pattern_next_allow_items[prev_item_type] &
- BIT_ULL(pattern->type)))
+ BIT_ULL(pattern->type)))
goto not_sup;
/* For VLAN item, it does no matter about to pattern type
@@ -372,7 +373,8 @@ i40e_hash_get_pattern_type(const struct rte_flow_item pattern[],
}
prev_item_type = last_item_type;
- assert(last_item_type < RTE_DIM(pattern_item_header));
+ assert(last_item_type < (enum rte_flow_item_type)
+ RTE_DIM(pattern_item_header));
item_hdr = pattern_item_header[last_item_type];
assert(item_hdr);
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/2] Support i40e PMD on Windows
2021-01-14 22:55 ` [dpdk-dev] [PATCH v3 0/2] Support " Thomas Monjalon
@ 2021-01-14 23:06 ` Ranjit Menon
0 siblings, 0 replies; 32+ messages in thread
From: Ranjit Menon @ 2021-01-14 23:06 UTC (permalink / raw)
To: Thomas Monjalon, pallavi.kadam
Cc: dev, dmitry.kozliuk, bruce.richardson, ferruh.yigit, beilei.xing,
jia.guo, Narcisa.Vasile, talshn
On 1/14/2021 2:55 PM, Thomas Monjalon wrote:
> 22/12/2020 01:45, Pallavi Kadam:
>> Pallavi Kadam (2):
>> eal: add rte_random.c file on windows
>> build: i40e PMD on Windows
> Applied, thanks
>
> For info, I've fixed an additional warning in i40e compilation on Windows:
> drivers/net/i40e/i40e_hash.c:357:22: warning:
> comparison of integers of different signs:
> 'enum rte_flow_item_type' and 'unsigned long long'
Thanks, Thomas. Oddly, we never saw this warning when we submitted the
patch.
I'll check with Pallavi when she's back.
ranjit m.
^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2021-01-14 23:07 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 1:10 [dpdk-dev] [PATCH 0/3] Support i40e PMD on Windows Pallavi Kadam
2020-12-05 1:10 ` [dpdk-dev] [PATCH 1/3] eal/windows: add some interrupt functions stub Pallavi Kadam
2020-12-05 1:10 ` [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows Pallavi Kadam
2020-12-05 13:52 ` Dmitry Kozlyuk
2020-12-09 0:09 ` Kadam, Pallavi
2020-12-06 15:49 ` Thomas Monjalon
2020-12-07 9:14 ` Bruce Richardson
2020-12-09 0:14 ` Kadam, Pallavi
2020-12-09 0:21 ` Kadam, Pallavi
2020-12-09 8:59 ` Thomas Monjalon
2020-12-17 23:17 ` Kadam, Pallavi
2020-12-05 1:10 ` [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning Pallavi Kadam
2020-12-05 13:51 ` Dmitry Kozlyuk
2020-12-10 0:53 ` Narcisa Ana Maria Vasile
2020-12-17 23:15 ` Kadam, Pallavi
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 0/2] Support i40e PMD on Windows Pallavi Kadam
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 1/2] eal: add rte_random.c file on windows Pallavi Kadam
2020-12-18 11:29 ` Thomas Monjalon
2020-12-18 18:49 ` Kadam, Pallavi
2020-12-17 22:59 ` [dpdk-dev] [PATCH v2 2/2] build: i40e PMD on Windows Pallavi Kadam
2020-12-18 11:27 ` Thomas Monjalon
2020-12-18 18:42 ` Kadam, Pallavi
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 0/2] Support " Pallavi Kadam
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 1/2] eal: add rte_random.c file on windows Pallavi Kadam
2020-12-22 0:45 ` [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows Pallavi Kadam
2021-01-08 22:58 ` Jie Zhou
2021-01-13 22:52 ` Thomas Monjalon
2021-01-13 22:55 ` Ranjit Menon
2021-01-13 23:10 ` Thomas Monjalon
2021-01-14 1:51 ` Tal Shnaiderman
2021-01-14 22:55 ` [dpdk-dev] [PATCH v3 0/2] Support " Thomas Monjalon
2021-01-14 23:06 ` Ranjit Menon
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).