[v2,02/13] driver/mempool: build mempool stack on Windows

Message ID 1629306834-6277-3-git-send-email-jizh@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series app/test: enable subset of tests on Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Jie Zhou Aug. 18, 2021, 5:13 p.m. UTC
  mempool_autotest failed on Windows at setting the "stack" handler
test case. Per debugging, in rte_mempool_ops_table, there are only
6 ring ops registered, and no "stack" ops registered which caused
the failure of rte_mempool_set_ops_byname and thus the test failed.
Per code investigation, the "stack" ops are registered in
rte_mempool_stack.c:
MEMPOOL_REGISTER_OPS(ops_stack);
MEMPOOL_REGISTER_OPS(ops_lf_stack);

The reason these two ops are not registered is because currently
driver\mempool\stack is not build on Windows. After building stack
on Windows, the mempool_autotest now completed as pass.

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 drivers/mempool/stack/meson.build | 5 -----
 1 file changed, 5 deletions(-)
  

Comments

Dmitry Kozlyuk Aug. 28, 2021, 10:43 p.m. UTC | #1
2021-08-18 10:13 (UTC-0700), Jie Zhou:
> mempool_autotest failed on Windows at setting the "stack" handler
> test case. Per debugging, in rte_mempool_ops_table, there are only
> 6 ring ops registered, and no "stack" ops registered which caused
> the failure of rte_mempool_set_ops_byname and thus the test failed.
> Per code investigation, the "stack" ops are registered in
> rte_mempool_stack.c:
> MEMPOOL_REGISTER_OPS(ops_stack);
> MEMPOOL_REGISTER_OPS(ops_lf_stack);
> 
> The reason these two ops are not registered is because currently
> driver\mempool\stack is not build on Windows. After building stack
> on Windows, the mempool_autotest now completed as pass.
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  drivers/mempool/stack/meson.build | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build
> index 371cf131b1..580dde79eb 100644
> --- a/drivers/mempool/stack/meson.build
> +++ b/drivers/mempool/stack/meson.build
> @@ -1,11 +1,6 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017-2019 Intel Corporation
>  
> -if is_windows
> -    build = false
> -    reason = 'not supported on Windows'
> -endif
> -
>  sources = files('rte_mempool_stack.c')
>  
>  deps += ['stack']

1. The title should be "mempool/stack: build on Windows".

2. For the description it would be sufficient to say something like
   "Mempool unit test requires mempool/stack to pass, enable this driver",
   because the ops registration mechanism is standard in DPDK.

P.S. It is really the test that should skip disabled driver cases,
but mempool/ring and mempool/stack are very basic to DPDK,
so I believe just enabling the latter is OK.
  
Jie Zhou Aug. 31, 2021, 5:06 p.m. UTC | #2
On Sun, Aug 29, 2021 at 01:43:13AM +0300, Dmitry Kozlyuk wrote:
> 2021-08-18 10:13 (UTC-0700), Jie Zhou:
> > mempool_autotest failed on Windows at setting the "stack" handler
> > test case. Per debugging, in rte_mempool_ops_table, there are only
> > 6 ring ops registered, and no "stack" ops registered which caused
> > the failure of rte_mempool_set_ops_byname and thus the test failed.
> > Per code investigation, the "stack" ops are registered in
> > rte_mempool_stack.c:
> > MEMPOOL_REGISTER_OPS(ops_stack);
> > MEMPOOL_REGISTER_OPS(ops_lf_stack);
> > 
> > The reason these two ops are not registered is because currently
> > driver\mempool\stack is not build on Windows. After building stack
> > on Windows, the mempool_autotest now completed as pass.
> >
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> >  drivers/mempool/stack/meson.build | 5 -----
> >  1 file changed, 5 deletions(-)
> > 
> > diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build
> > index 371cf131b1..580dde79eb 100644
> > --- a/drivers/mempool/stack/meson.build
> > +++ b/drivers/mempool/stack/meson.build
> > @@ -1,11 +1,6 @@
> >  # SPDX-License-Identifier: BSD-3-Clause
> >  # Copyright(c) 2017-2019 Intel Corporation
> >  
> > -if is_windows
> > -    build = false
> > -    reason = 'not supported on Windows'
> > -endif
> > -
> >  sources = files('rte_mempool_stack.c')
> >  
> >  deps += ['stack']
> 
> 1. The title should be "mempool/stack: build on Windows".
> 
> 2. For the description it would be sufficient to say something like
>    "Mempool unit test requires mempool/stack to pass, enable this driver",
>    because the ops registration mechanism is standard in DPDK.
> 
> P.S. It is really the test that should skip disabled driver cases,
> but mempool/ring and mempool/stack are very basic to DPDK,
> so I believe just enabling the latter is OK.

Will reword the title and description in V3. Thanks.
  

Patch

diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build
index 371cf131b1..580dde79eb 100644
--- a/drivers/mempool/stack/meson.build
+++ b/drivers/mempool/stack/meson.build
@@ -1,11 +1,6 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    build = false
-    reason = 'not supported on Windows'
-endif
-
 sources = files('rte_mempool_stack.c')
 
 deps += ['stack']