Support i40e PMD on Windows
Subsystems (4)
cover Support i40e PMD on Windows
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(-)
Signature · 1 line
2.18.0.windows.1
PATCH 1/3 eal/windows: add some interrupt functions stub
Adding some interrupt implementations on Windows to help compile i40e PMD code.
Also added respective functions to export file.
--- lib/librte_eal/rte_eal_exports.def | 10 ++++ lib/librte_eal/windows/eal_interrupts.c | 70 +++++++++++++++++++++++++ 2 files changed, 80 insertions(+)
lib/librte_eal/rte_eal_exports.def +10 -0
@@ -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
lib/librte_eal/windows/eal_interrupts.c +70 -0
73 lines not on this page · raw message
Signature · 1 line
2.18.0.windows.1
PATCH 2/3 net/i40e: add changes to support i40e PMD on windows
In reply to Pallavi KadamAdding 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.
--- 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(-)
drivers/net/i40e/base/i40e_osdep.h +3 -0
@@ -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))
drivers/net/i40e/i40e_ethdev_vf.c +2 -1
@@ -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 ();
drivers/net/i40e/i40e_rxtx_vec_avx2.c +2 -0
@@ -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"
drivers/net/i40e/i40e_tm.c +1 -1
@@ -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 ;
drivers/net/meson.build +6 -3
@@ -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
lib/librte_eal/common/meson.build +1 -0
@@ -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()
lib/librte_eal/rte_eal_exports.def +1 -0
@@ -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
lib/librte_eal/windows/include/rte_windows.h +5 -0
@@ -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>
Signature · 1 line
2.18.0.windows.1
Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
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.
Quoted 1 line
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).
Quoted 23 lines
Disabling few warnings with Clang such as comparison of integers of different signs and macro redefinitions.
Also, adding linking dependency source filerte_random.cfile to Windows.Signed-off-by Pallavi Kadam <[email protected]>Reviewed-by Ranjit Menon <[email protected]>--- 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(-)drivers/net/i40e/base/i40e_osdep.h +0
-0
drivers/net/i40e/base/i40e_osdep.h typedef enum i40e_status_code i40e_status; · line 74
Quoted 8 lines
drivers/net/i40e/base/i40e_osdep.h +3
-0@@ -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
drivers/net/i40e/i40e_rxtx_vec_avx2.c line 17
Quoted 11 lines
drivers/net/i40e/i40e_rxtx_vec_avx2.c +2
-0@@ -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.
lib/librte_eal/windows/include/rte_windows.h line 25
Quoted 13 lines
lib/librte_eal/windows/include/rte_windows.h +5
-0@@ -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.
Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
Quoted 9 lines · Dmitry Kozlyuk
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.
Quoted 1 line
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.
Quoted 36 lines
Quoted 24 lines
Disabling few warnings with Clang such as comparison of integers of different signs and macro redefinitions.
Also, adding linking dependency source filerte_random.cfile to Windows.Signed-off-by Pallavi Kadam <[email protected]>Reviewed-by Ranjit Menon <[email protected]>--- 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(-)drivers/net/i40e/base/i40e_osdep.h +0
-0drivers/net/i40e/base/i40e_osdep.h typedef enum i40e_status_code i40e_status; · line 74
Quoted 8 lines
drivers/net/i40e/base/i40e_osdep.h +3
-0@@ -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()andmax()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.
Quoted 4 lines
It seems we'll have to do that for many PMDs, because
rte_os.hmust not erase platform-specific macros, andrte_windows.his 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.
Quoted 9 lines
Quoted 9 lines
drivers/net/i40e/i40e_rxtx_vec_avx2.c +0
-0@@ -12,7 +12,9 @@#include "i40e_rxtx.h" #include "i40e_rxtx_vec_common.h"
Quoted 4 lines
drivers/net/i40e/i40e_rxtx_vec_avx2.c line 17
Quoted 3 lines
drivers/net/i40e/i40e_rxtx_vec_avx2.c +2
-0+#ifndef RTE_EXEC_ENV_WINDOWS #include <x86intrin.h> +#endif Just #include <
rte_vect.h>, it takes care ofx86intrin.hfor Windows.
Ok, will #include <rte_vect.h> instead.
Quoted 9 lines
Quoted 9 lines
lib/librte_eal/windows/include/rte_windows.h +0
-0@@ -18,6 +18,11 @@#define WIN32_LEAN_AND_MEAN #endif
Quoted 6 lines
lib/librte_eal/windows/include/rte_windows.h line 25
Quoted 5 lines
lib/librte_eal/windows/include/rte_windows.h +5
-0+#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.
Quoted 1 line
Can't
x86intrin.hbe replaced byrte_vect.hinrte_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.
Quoted 1 line
If it's still necessary,
__clang__should beRTE_TOOLCHAIN_CLANG.
will update this in v2. Thank you.
Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
In reply to Pallavi Kadam05/12/2020 02:10, Pallavi Kadam:
Quoted 13 lines
drivers/net/meson.build +0
-3@@ -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',
drivers/net/meson.build drivers = ['af_packet', · line 60
Quoted 8 lines
drivers/net/meson.build +5
-0@@ -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.
Quoted 27 lines
lib/librte_eal/common/meson.build +1
-0@@ -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()lib/librte_eal/rte_eal_exports.def +1
-0@@ -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_getlib/librte_eal/windows/include/rte_windows.h +0
-0
lib/librte_eal/windows/include/rte_windows.h line 24
Quoted 7 lines
lib/librte_eal/windows/include/rte_windows.h +4
-0@@ -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.
Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
Quoted 11 lines · Thomas Monjalon
05/12/2020 02:10, Pallavi Kadam:
Quoted 10 lines
drivers/net/meson.build +0
-3@@ -1,9 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -if is_windows - subdir_done() -endif
Quoted 15 lines
drivers/net/meson.build drivers = ['af_packet', · line 60
Quoted 11 lines
drivers/net/meson.build +5
-0drivers = ['af_packet', 'af_xdp',@@ -56,6 +53,12 @@ drivers = ['af_packet', 'virtio', 'vmxnet3', ] + +if is_windows + drivers = ['i40e', + ] +endifLet'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.
Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
Quoted 26 lines · Bruce Richardson
Quoted 11 lines · Thomas Monjalon
05/12/2020 02:10, Pallavi Kadam:
Quoted 10 lines
drivers/net/meson.build +0
-3@@ -1,9 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -if is_windows - subdir_done() -endifQuoted 14 lines
drivers/net/meson.build drivers = ['af_packet', · line 60
Quoted 11 lines
drivers/net/meson.build +5
-0drivers = ['af_packet', 'af_xdp',@@ -56,6 +53,12 @@ drivers = ['af_packet', 'virtio', 'vmxnet3', ] + +if is_windows + drivers = ['i40e', + ] +endifLet's not add an alternative list please.
I prefer disabling compilation in other drivers.
Quoted 3 lines
+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.
Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
In reply to Thomas MonjalonQuoted 56 lines · Thomas Monjalon
05/12/2020 02:10, Pallavi Kadam:
Quoted 13 lines
drivers/net/meson.build +0
-3@@ -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',drivers/net/meson.build drivers = ['af_packet', · line 60
Quoted 8 lines
drivers/net/meson.build +5
-0@@ -56,6 +53,12 @@ drivers = ['af_packet', 'virtio', 'vmxnet3', ] + +if is_windows + drivers = ['i40e', + ] +endifLet's not add an alternative list please.
I prefer disabling compilation in other drivers.Quoted 30 lines
lib/librte_eal/common/meson.build +1
-0@@ -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()lib/librte_eal/rte_eal_exports.def +1
-0@@ -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_getlib/librte_eal/windows/include/rte_windows.h +0
-0@@ -18,6 +18,11 @@#define WIN32_LEAN_AND_MEAN #endif
Quoted 6 lines
lib/librte_eal/windows/include/rte_windows.h line 24
Quoted 4 lines
lib/librte_eal/windows/include/rte_windows.h +4
-0+#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,
Quoted 2 lines
Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
09/12/2020 01:21, Kadam, Pallavi:
Quoted 14 lines · Thomas Monjalon
Quoted 7 lines
05/12/2020 02:10, Pallavi Kadam:
Quoted 6 lines
lib/librte_eal/windows/include/rte_windows.h +0
-0@@ -18,6 +18,11 @@#define WIN32_LEAN_AND_MEAN #endif Quoted 6 lines
lib/librte_eal/windows/include/rte_windows.h line 24
Quoted 4 lines
lib/librte_eal/windows/include/rte_windows.h +4
-0+#ifdef __clang__ +#undef _m_prefetchw +#define _m_prefetchw __m_prefetchw +#endif These changes are not specific to i40e, please separate.
Quoted 4 lines
Ok, will create a separate patch in v2.
This change is required once we addrte_random.cfile on windows. So, may be addition ofrte_random.cfile and this change should go together? Please suggest. Thanks,
Yes absolutely, addition of random feature should be atomic in a patch.
Re: [dpdk-dev] [PATCH 2/3] net/i40e: add changes to support i40e PMD on windows
Quoted 14 lines · Thomas Monjalon
09/12/2020 01:21, Kadam, Pallavi:
Quoted 13 lines · Thomas Monjalon
Quoted 12 lines
05/12/2020 02:10, Pallavi Kadam:
lib/librte_eal/windows/include/rte_windows.h line 24
Quoted 10 lines
lib/librte_eal/windows/include/rte_windows.h +4
-0@@ -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.
Quoted 5 lines
Quoted 4 lines
Ok, will create a separate patch in v2.
This change is required once we addrte_random.cfile on windows. So, may be addition ofrte_random.cfile 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!
Quoted 2 lines
PATCH 3/3 config/build: ignore enum forward reference warning
In reply to Pallavi KadamWarning 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.
--- config/meson.build | 3 +++ 1 file changed, 3 insertions(+)
config/meson.build +3 -0
@@ -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'
Signature · 1 line
2.18.0.windows.1
Re: [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning
Quoted 9 lines · 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.
@i40e maintainers,
Is this typedef necessary? Disabling a warning is usually the last resort.
Re: [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning
In reply to Pallavi KadamQuoted 7 lines · 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; ^
Quoted 6 lines
Adding -Wmicrosoft-enum-forward-reference compiler flag to disable the warning on Windows Clang.
Signed-off-by Pallavi Kadam <[email protected]>Reviewed-by Ranjit Menon <[email protected]>---
Why not including the "i40e_status.h" header that contains the definition of the enum in this file?
Re: [dpdk-dev] [PATCH 3/3] config/build: ignore enum forward reference warning
Quoted 8 lines · Narcisa Ana Maria Vasile
Quoted 7 lines · 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; ^
Quoted 8 lines
Quoted 6 lines
Adding -Wmicrosoft-enum-forward-reference compiler flag to disable the warning on Windows Clang.
Signed-off-by Pallavi Kadam <[email protected]>Reviewed-by Ranjit Menon <[email protected]>---
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.
v2 cover Support i40e PMD on Windows
In reply to Pallavi KadamThis 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
Signature · 1 line
2.18.0.windows.1
PATCH v2 1/2 eal: add rte_random.c file on windows
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.
--- 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(+)
lib/librte_eal/common/meson.build +1 -0
@@ -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()
lib/librte_eal/rte_eal_exports.def +1 -0
@@ -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
lib/librte_eal/windows/include/rte_windows.h +5 -0
@@ -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>
Signature · 1 line
2.18.0.windows.1
Re: [dpdk-dev] [PATCH v2 1/2] eal: add rte_random.c file on windows
17/12/2020 23:59, Pallavi Kadam:
Quoted 32 lines
This file is required to compile and build i40e PMD on Windows. Add
rte_randvariable to export file.Redefine
_m_prefetchwfor Clang toolchain due to following error with respect to conflicting types:FAILED:
lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.objclang @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 <[email protected]>Reviewed-by Ranjit Menon <[email protected]>---
lib/librte_eal/windows/include/rte_windows.h line 24
Quoted 4 lines
lib/librte_eal/windows/include/rte_windows.h +4
-0+#ifdef RTE_TOOLCHAIN_CLANG +#undef _m_prefetchw +#define _m_prefetchw __m_prefetchw +#endif
It deserves a comment explaining why __m_prefetchw is required.
Re: [dpdk-dev] [PATCH v2 1/2] eal: add rte_random.c file on windows
Quoted 30 lines · Thomas Monjalon
17/12/2020 23:59, Pallavi Kadam:
Quoted 29 lines
This file is required to compile and build i40e PMD on Windows. Add
rte_randvariable to export file.Redefine
_m_prefetchwfor Clang toolchain due to following error with respect to conflicting types:FAILED:
lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_random.c.objclang @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.
Quoted 8 lines
lib/librte_eal/windows/include/rte_windows.h line 24
Quoted 7 lines
Signed-off-by Pallavi Kadam <[email protected]>Reviewed-by Ranjit Menon <[email protected]>---
lib/librte_eal/windows/include/rte_windows.h +4
-0+#ifdef RTE_TOOLCHAIN_CLANG +#undef _m_prefetchw +#define _m_prefetchw __m_prefetchw +#endif It deserves a comment explaining why
__m_prefetchwis required.
Will add a comment in v3. Thanks!
Quoted 3 lines
PATCH v2 2/2 build: i40e PMD on Windows
In reply to Pallavi KadamAllows 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.
--- 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
drivers/net/af_xdp/meson.build +6 -0
@@ -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)
drivers/net/ark/meson.build +6 -0
@@ -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',
drivers/net/atlantic/meson.build +6 -0
@@ -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',
drivers/net/bnx2x/meson.build +6 -0
@@ -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"'
drivers/net/bnxt/meson.build +6 -0
@@ -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')
drivers/net/bonding/meson.build +6 -0
@@ -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')
drivers/net/cxgbe/meson.build +6 -0
@@ -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',
drivers/net/e1000/meson.build +6 -0
@@ -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]
drivers/net/ena/meson.build +6 -0
@@ -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')
drivers/net/enic/meson.build +6 -0
@@ -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',
drivers/net/failsafe/meson.build +6 -0
@@ -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'
drivers/net/fm10k/meson.build +6 -0
@@ -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]
drivers/net/hinic/meson.build +6 -0
@@ -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]
drivers/net/i40e/base/i40e_osdep.h +10 -0
@@ -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)
drivers/net/i40e/i40e_ethdev_vf.c +2 -1
@@ -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 ();
drivers/net/i40e/i40e_rxtx_vec_avx2.c +1 -1
@@ -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"
drivers/net/i40e/i40e_tm.c +1 -1
@@ -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 ;
drivers/net/iavf/meson.build +6 -0
@@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> +if is_windows + build = false + reason = 'Not supported on Windows' + subdir_done() +endif + cflags += ['-Wno-strict-aliasing'] includes += include_directories('../../common/iavf')
drivers/net/ice/meson.build +6 -0
@@ -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]
drivers/net/igc/meson.build +6 -0
@@ -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]
drivers/net/ionic/meson.build +6 -0
@@ -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',
drivers/net/ipn3ke/meson.build +6 -0
@@ -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()
drivers/net/ixgbe/meson.build +6 -0
@@ -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')
drivers/net/kni/meson.build +6 -0
@@ -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'
drivers/net/liquidio/meson.build +6 -0
@@ -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',
drivers/net/meson.build +0 -3
@@ -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',
drivers/net/mlx5/windows/meson.build new file +0 -0
drivers/net/mvneta/meson.build +6 -0
@@ -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'
drivers/net/mvpp2/meson.build +6 -0
@@ -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'
drivers/net/netvsc/meson.build +6 -0
@@ -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')
drivers/net/nfb/meson.build +6 -0
@@ -3,6 +3,12 @@ # Copyright(c) 2019 Netcope Technologies, a.s. <[email protected]> # 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()
drivers/net/null/meson.build +6 -0
@@ -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')
drivers/net/octeontx/meson.build +6 -0
@@ -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]
drivers/net/octeontx2/meson.build +6 -0
@@ -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'
drivers/net/pcap/meson.build +6 -0
@@ -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"'
drivers/net/qede/meson.build +6 -0
@@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> +if is_windows + build = false + reason = 'Not supported on Windows' + subdir_done() +endif + subdir('base') objs = [base_objs]
drivers/net/ring/meson.build +6 -0
@@ -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')
drivers/net/sfc/meson.build +6 -0
@@ -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'
drivers/net/szedata2/meson.build +6 -0
@@ -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"'
drivers/net/thunderx/meson.build +6 -0
@@ -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]
drivers/net/txgbe/meson.build +6 -0
@@ -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]
drivers/net/vhost/meson.build +6 -0
@@ -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')
drivers/net/virtio/meson.build +6 -0
@@ -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',
drivers/net/vmxnet3/meson.build +6 -0
@@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> +if is_windows + build = false + reason = 'Not supported on Windows' + subdir_done() +endif + sources += files( 'vmxnet3_ethdev.c', 'vmxnet3_rxtx.c',
Signature · 1 line
2.18.0.windows.1
Re: [dpdk-dev] [PATCH v2 2/2] build: i40e PMD on Windows
17/12/2020 23:59, Pallavi Kadam:
Quoted 3 lines
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?
drivers/net/af_xdp/meson.build line 8
Quoted 5 lines
drivers/net/af_xdp/meson.build +5
-0+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.
Re: [dpdk-dev] [PATCH v2 2/2] build: i40e PMD on Windows
Hi Thomas,
Quoted 5 lines · Thomas Monjalon
17/12/2020 23:59, Pallavi Kadam:
Quoted 3 lines
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/>
Quoted 8 lines
drivers/net/af_xdp/meson.build line 8
Quoted 6 lines
drivers/net/af_xdp/meson.build +5
-0+if is_windows + build = false + reason = 'Not supported on Windows' + subdir_done() +endifAs 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!
Quoted 2 lines
v3 cover Support i40e PMD on Windows
In reply to Pallavi KadamThis 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
Signature · 1 line
2.18.0.windows.1
PATCH v3 1/2 eal: add rte_random.c file on windows
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.
--- 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(+)
lib/librte_eal/common/meson.build +1 -0
@@ -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()
lib/librte_eal/rte_eal_exports.def +1 -0
@@ -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
lib/librte_eal/windows/include/rte_windows.h +6 -0
@@ -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>
Signature · 1 line
2.18.0.windows.1
PATCH v3 2/2 build: i40e PMD on Windows
In reply to Pallavi KadamAllows 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.
--- 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
drivers/net/af_xdp/meson.build +6 -0
@@ -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)
drivers/net/ark/meson.build +6 -0
@@ -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',
drivers/net/atlantic/meson.build +6 -0
@@ -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',
drivers/net/bnx2x/meson.build +6 -0
@@ -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"'
drivers/net/bnxt/meson.build +6 -0
@@ -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')
drivers/net/bonding/meson.build +6 -0
@@ -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')
drivers/net/cxgbe/meson.build +6 -0
@@ -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',
drivers/net/e1000/meson.build +6 -0
@@ -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]
drivers/net/ena/meson.build +6 -0
@@ -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')
drivers/net/enic/meson.build +6 -0
@@ -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',
drivers/net/failsafe/meson.build +6 -0
@@ -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'
drivers/net/fm10k/meson.build +6 -0
@@ -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]
drivers/net/hinic/meson.build +6 -0
@@ -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]
drivers/net/i40e/base/i40e_osdep.h +10 -0
@@ -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)
drivers/net/i40e/i40e_ethdev_vf.c +2 -1
@@ -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 ();
drivers/net/i40e/i40e_rxtx_vec_avx2.c +1 -1
@@ -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"
drivers/net/i40e/i40e_tm.c +1 -1
@@ -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 ;
drivers/net/iavf/meson.build +6 -0
@@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> +if is_windows + build = false + reason = 'not supported on Windows' + subdir_done() +endif + cflags += ['-Wno-strict-aliasing'] includes += include_directories('../../common/iavf')
drivers/net/ice/meson.build +6 -0
@@ -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]
drivers/net/igc/meson.build +6 -0
@@ -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]
drivers/net/ionic/meson.build +6 -0
@@ -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',
drivers/net/ipn3ke/meson.build +6 -0
@@ -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()
drivers/net/ixgbe/meson.build +6 -0
@@ -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')
drivers/net/kni/meson.build +6 -0
@@ -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'
drivers/net/liquidio/meson.build +6 -0
@@ -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',
drivers/net/meson.build +0 -3
@@ -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',
drivers/net/mlx5/windows/meson.build new file +0 -0
drivers/net/mvneta/meson.build +6 -0
@@ -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'
drivers/net/mvpp2/meson.build +6 -0
@@ -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'
drivers/net/netvsc/meson.build +6 -0
@@ -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')
drivers/net/nfb/meson.build +6 -0
@@ -3,6 +3,12 @@ # Copyright(c) 2019 Netcope Technologies, a.s. <[email protected]> # 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()
drivers/net/null/meson.build +6 -0
@@ -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')
drivers/net/octeontx/meson.build +6 -0
@@ -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]
drivers/net/octeontx2/meson.build +6 -0
@@ -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'
drivers/net/pcap/meson.build +6 -0
@@ -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"'
drivers/net/qede/meson.build +6 -0
@@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> +if is_windows + build = false + reason = 'not supported on Windows' + subdir_done() +endif + subdir('base') objs = [base_objs]
drivers/net/ring/meson.build +6 -0
@@ -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')
drivers/net/sfc/meson.build +6 -0
@@ -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'
drivers/net/szedata2/meson.build +6 -0
@@ -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"'
drivers/net/thunderx/meson.build +6 -0
@@ -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]
drivers/net/txgbe/meson.build +6 -0
@@ -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]
drivers/net/vhost/meson.build +6 -0
@@ -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')
drivers/net/virtio/meson.build +6 -0
@@ -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',
drivers/net/vmxnet3/meson.build +6 -0
@@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> +if is_windows + build = false + reason = 'not supported on Windows' + subdir_done() +endif + sources += files( 'vmxnet3_ethdev.c', 'vmxnet3_rxtx.c',
Signature · 1 line
2.18.0.windows.1
Re: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
Quoted 11 lines · 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 <[email protected]>Reviewed-by Ranjit Menon <[email protected]>Acked-by Jie Zhou <[email protected]>
Re: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
In reply to Pallavi Kadam22/12/2020 01:45, Pallavi Kadam:
Quoted 7 lines
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
Re: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
Quoted 5 lines · Thomas Monjalon
22/12/2020 01:45, Pallavi Kadam:
Quoted 4 lines
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.
Quoted 9 lines
Quoted 3 lines
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.
Re: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
13/01/2021 23:55, Ranjit Menon:
Quoted 9 lines · Thomas Monjalon
Quoted 8 lines
22/12/2020 01:45, Pallavi Kadam:
Quoted 7 lines
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.
Quoted 7 lines
Quoted 6 lines
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 WindowsYes. 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).
Tal Shnaiderman
Acked-byRe: [dpdk-dev] [PATCH v3 2/2] build: i40e PMD on Windows
Quoted 22 lines
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:
Quoted 10 lines · Thomas Monjalon
Quoted 9 lines
22/12/2020 01:45, Pallavi Kadam:
Quoted 7 lines
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.
Quoted 5 lines
Quoted 5 lines
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
Quoted 6 lines
Quoted 1 line
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).
Thomas Monjalon
Applied22/12/2020 01:45, Pallavi Kadam:
Quoted 3 lines
Pallavi Kadam (2):
eal: addrte_random.cfile 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'
drivers/net/i40e/i40e_hash.c +5 -3
@@ -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);
Quoted 10 lines · Thomas Monjalon
22/12/2020 01:45, Pallavi Kadam:
Quoted 3 lines
Pallavi Kadam (2):
eal: addrte_random.cfile on windows
build: i40e PMD on WindowsApplied, 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:
'enumrte_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.