> Subject: [PATCH v10 07/10] app/testpmd: replace POSIX specific code
> 
> External email: Use caution opening links or attachments
> 
> 
>  - Make printf format OS independent
>  - Replace htons with RTE_BE16
>  - Replace POSIX specific inet_aton with OS independent inet_pton
>  - Replace sleep with rte_delay_us_sleep
>  - Repalce random with rte_rand
>  - #ifndef mman related code for now

Do you think we can reduce the number of ifndefs by using the functions 
rte_mem_map, rte_mem_lock?

> 
> Signed-off-by: Jie Zhou <j...@microsoft.com>
> Signed-off-by: Jie Zhou <j...@linux.microsoft.com>
> ---
>  app/test-pmd/cmdline.c     |  3 +--
>  app/test-pmd/csumonly.c    |  2 +-
>  app/test-pmd/icmpecho.c    |  4 ++--
>  app/test-pmd/ieee1588fwd.c |  8 ++++----  app/test-pmd/parameters.c  |
> 10 +++++++---
>  app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
>  app/test-pmd/testpmd.h     |  2 +-
>  7 files changed, 36 insertions(+), 14 deletions(-)
> 

<snip>

> @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
>                 }
>         }
> 
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  err:
>         if (rte_mp == NULL) {
>                 rte_exit(EXIT_FAILURE,
> @@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size,
> unsigned nb_mbuf,
>         } else if (verbose_level > 0) {
>                 rte_mempool_dump(stdout, rte_mp);
>         }
> +#endif

Why do we need the err flow ifndef'ed?  Isn't it needed in the MP_ALLOC_NATIVE 
case?

>         return rte_mp;
>  }
> 

Reply via email to