[v5,9/9] app/testpmd: enable building testpmd on Windows

Message ID 1618595864-27839-10-git-send-email-jizh@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series app/testpmd: enable testpmd on Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing fail Testing issues

Commit Message

Jie Zhou April 16, 2021, 5:57 p.m. UTC
  From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)
  

Comments

Tal Shnaiderman April 18, 2021, 5:21 p.m. UTC | #1
> Subject: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd
> on Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> From: Jie Zhou <jizh@microsoft.com>
> 
> - Disable unsupported Apps on Windows
> - Enable building of testpmd on Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/meson.build                    | 4 ----
>  app/pdump/meson.build              | 6 ++++++
>  app/proc-info/meson.build          | 6 ++++++
>  app/test-acl/meson.build           | 6 ++++++
>  app/test-bbdev/meson.build         | 6 ++++++
>  app/test-cmdline/meson.build       | 6 ++++++
>  app/test-compress-perf/meson.build | 6 ++++++
>  app/test-crypto-perf/meson.build   | 6 ++++++
>  app/test-eventdev/meson.build      | 6 ++++++
>  app/test-fib/meson.build           | 6 ++++++
>  app/test-flow-perf/meson.build     | 6 ++++++
>  app/test-pipeline/meson.build      | 6 ++++++
>  app/test-regex/meson.build         | 6 ++++++
>  app/test-sad/meson.build           | 6 ++++++
>  app/test/meson.build               | 6 ++++++
>  15 files changed, 84 insertions(+), 4 deletions(-)
> 

Building testpmd results in 2 warnings in clang:

../app/test-pmd/config.c:4254:1: warning: unused function 'print_fdir_mask' [-Wunused-function]
print_fdir_mask(struct rte_eth_fdir_masks *mask)
^
../app/test-pmd/config.c:4289:1: warning: unused function 'print_fdir_flex_payload' [-Wunused-function]
print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
^
2 warnings generated.
  
Thomas Monjalon April 18, 2021, 6:17 p.m. UTC | #2
18/04/2021 19:21, Tal Shnaiderman:
> Building testpmd results in 2 warnings in clang:
> 
> ../app/test-pmd/config.c:4254:1: warning: unused function 'print_fdir_mask' [-Wunused-function]
> print_fdir_mask(struct rte_eth_fdir_masks *mask)
> ^
> ../app/test-pmd/config.c:4289:1: warning: unused function 'print_fdir_flex_payload' [-Wunused-function]
> print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
> ^
> 2 warnings generated.

Why all tests are passing in the CI?
I feel there is something wrong. We must test with -werror.
  
Tal Shnaiderman April 18, 2021, 7:11 p.m. UTC | #3
> Subject: Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building
> testpmd on Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> 18/04/2021 19:21, Tal Shnaiderman:
> > Building testpmd results in 2 warnings in clang:
> >
> > ../app/test-pmd/config.c:4254:1: warning: unused function
> > 'print_fdir_mask' [-Wunused-function] print_fdir_mask(struct
> > rte_eth_fdir_masks *mask) ^
> > ../app/test-pmd/config.c:4289:1: warning: unused function
> > 'print_fdir_flex_payload' [-Wunused-function]
> > print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf,
> > uint32_t num) ^
> > 2 warnings generated.
> 
> Why all tests are passing in the CI?
> I feel there is something wrong. We must test with -werror.

I know that the UNH Windows CI runs with -werror however the test didn't run on clang yet [1].
This patch passed Intel compilation test on Windows, however I don't know if -werror is used there [2].

[1] - https://lab.dpdk.org/results/dashboard/patchsets/16593/
[2] - http://mails.dpdk.org/archives/test-report/2021-April/188796.html
  
Tal Shnaiderman April 18, 2021, 7:20 p.m. UTC | #4
> Subject: Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building
> testpmd on Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> > Subject: Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building
> > testpmd on Windows
> >
> > External email: Use caution opening links or attachments
> >
> >
> > 18/04/2021 19:21, Tal Shnaiderman:
> > > Building testpmd results in 2 warnings in clang:
> > >
> > > ../app/test-pmd/config.c:4254:1: warning: unused function
> > > 'print_fdir_mask' [-Wunused-function] print_fdir_mask(struct
> > > rte_eth_fdir_masks *mask) ^
> > > ../app/test-pmd/config.c:4289:1: warning: unused function
> > > 'print_fdir_flex_payload' [-Wunused-function]
> > > print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf,
> > > uint32_t num) ^
> > > 2 warnings generated.
> >
> > Why all tests are passing in the CI?
> > I feel there is something wrong. We must test with -werror.
> 
> I know that the UNH Windows CI runs with -werror however the test didn't
> run on clang yet [1].
> This patch passed Intel compilation test on Windows, however I don't know if
> -werror is used there [2].
> 
> [1] - https://lab.dpdk.org/results/dashboard/patchsets/16593/
> [2] - http://mails.dpdk.org/archives/test-report/2021-April/188796.html

Update: the UNH test run a few minutes ago and as expected, failed with the compilation warnings.
For some reason however the test appears as 'passed' in patchwork.
  
Jie Zhou April 19, 2021, 5:37 p.m. UTC | #5
On Sun, Apr 18, 2021 at 07:20:18PM +0000, Tal Shnaiderman wrote:
> > Subject: Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building
> > testpmd on Windows
> > 
> > External email: Use caution opening links or attachments
> > 
> > 
> > > Subject: Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building
> > > testpmd on Windows
> > >
> > > External email: Use caution opening links or attachments
> > >
> > >
> > > 18/04/2021 19:21, Tal Shnaiderman:
> > > > Building testpmd results in 2 warnings in clang:
> > > >
> > > > ../app/test-pmd/config.c:4254:1: warning: unused function
> > > > 'print_fdir_mask' [-Wunused-function] print_fdir_mask(struct
> > > > rte_eth_fdir_masks *mask) ^
> > > > ../app/test-pmd/config.c:4289:1: warning: unused function
> > > > 'print_fdir_flex_payload' [-Wunused-function]
> > > > print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf,
> > > > uint32_t num) ^
> > > > 2 warnings generated.
> > >
> > > Why all tests are passing in the CI?
> > > I feel there is something wrong. We must test with -werror.
> > 
> > I know that the UNH Windows CI runs with -werror however the test didn't
> > run on clang yet [1].
> > This patch passed Intel compilation test on Windows, however I don't know if
> > -werror is used there [2].
> > 
> > [1] - https://lab.dpdk.org/results/dashboard/patchsets/16593/
> > [2] - http://mails.dpdk.org/archives/test-report/2021-April/188796.html
> 
> Update: the UNH test run a few minutes ago and as expected, failed with the compilation warnings.
> For some reason however the test appears as 'passed' in patchwork.

This cannot be repro'd on my Win10 + clang 10 system. Notice that the UNH is using Win2019 + clang 9. These two functions print_fdir_mask and print_fdir_flex_payload triggered "unused function" warning are both called in fdir_get_infos, and fdir_get_infos is called under "#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)".

I can add #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) for the print_fdir_mask and prting_fdir_flex_payload as well, but it's not clear to me why fdir_get_infos is not called when i40e is already enabled on Windows.
  

Patch

diff --git a/app/meson.build b/app/meson.build
index 50a53dbde..8f9ece5f4 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-	subdir_done()
-endif
-
 apps = [
 	'pdump',
 	'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@ 
 # 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('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@ 
 # 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('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@ 
 # 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('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 6d50e0339..b4b767d89 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/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('main.c',
 		'test_bbdev.c',
 		'test_bbdev_perf.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@ 
 # 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('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index a1a484da9..6ff3c179e 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/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('comp_perf_options_parse.c',
 		'main.c',
 		'comp_perf_test_verify.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 558c64878..eef7708e0 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/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('cperf_ops.c',
 		'cperf_options_parsing.c',
 		'cperf_test_common.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 9e588d9ec..5af31fbb0 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/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
+
 sources = files('evt_main.c',
 		'evt_options.c',
 		'evt_test.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@ 
 # 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('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 6eaf83b41..5d5d70f18 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
 	'actions_gen.c',
 	'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index d5eddaba9..5e43d7d69 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/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(
 	'config.c',
 	'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@ 
 # 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('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 76eaaea45..5de5a6fae 100644
--- a/app/test/meson.build
+++ b/app/test/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 get_option('tests')
 	subdir_done()
 endif