On Thu, Sep 10, 2020 at 02:55:03PM +0800, Leyi Rong wrote:
> Add AVX512 support for ice PMD. This patch adds ice_rxtx_vec_avx512.c
> to support ice AVX512 vPMD.
> 
> This patch aims to enable AVX512 on ice vPMD. Main changes are focus
> on Rx path compared with AVX2 vPMD.
> 
> Signed-off-by: Leyi Rong <leyi.r...@intel.com>
> Signed-off-by: Bruce Richardson <bruce.richard...@intel.com>
> ---
>  drivers/net/ice/ice_rxtx.c            |  88 ++-
>  drivers/net/ice/ice_rxtx.h            |   7 +
>  drivers/net/ice/ice_rxtx_vec_avx512.c | 824 ++++++++++++++++++++++++++
>  drivers/net/ice/meson.build           |  13 +
>  4 files changed, 914 insertions(+), 18 deletions(-)
>  create mode 100644 drivers/net/ice/ice_rxtx_vec_avx512.c
<snip>
> +     if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX512F') or not 
> machine_args.contains('-mno-avx512f')

I think you need to split these conditions:
If the cpu flag is set, you just want to unconditionally add the file to
the build list. However, if no-avx512 flag is set, you want to skip the
whole block completely.

> +             if cc.has_argument('-mavx512f') and 
> cc.has_argument('-mavx512bw')
> +                     cflags += ['-DCC_AVX512_SUPPORT']
> +                     ice_avx512_lib = static_library('ice_avx512_lib',
> +                                           'ice_rxtx_vec_avx512.c',
> +                                           dependencies: [static_rte_ethdev,
> +                                             static_rte_kvargs, 
> static_rte_hash],
> +                                           include_directories: includes,
> +                                           c_args: [cflags, 
> '-march=skylake-avx512', '-mavx512f'])
> +                     objs += 
> ice_avx512_lib.extract_objects('ice_rxtx_vec_avx512.c')
> +             endif
> +     endif
>  endif
>  
>  sources += files('ice_dcf.c',
> -- 
> 2.17.1
> 

Reply via email to