On Thu, Sep 10, 2020 at 01:59:03PM +0800, Wenzhuo Lu wrote:
> To enhance the per-core performance, this patch adds some AVX512
> instructions to the data path to handle the legacy RX descriptors.
> 
> Signed-off-by: Wenzhuo Lu <wenzhuo...@intel.com>
> Signed-off-by: Bruce Richardson <bruce.richard...@intel.com>
> Signed-off-by: Leyi Rong <leyi.r...@intel.com>
> ---
>  drivers/net/iavf/iavf_rxtx.c            |  27 +-
>  drivers/net/iavf/iavf_rxtx.h            |   5 +
>  drivers/net/iavf/iavf_rxtx_vec_avx512.c | 720 
> ++++++++++++++++++++++++++++++++
>  drivers/net/iavf/meson.build            |   7 +
>  4 files changed, 755 insertions(+), 4 deletions(-)
>  create mode 100644 drivers/net/iavf/iavf_rxtx_vec_avx512.c
> 
<snip>
> diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build
> index a3fad36..6427885 100644
> --- a/drivers/net/iavf/meson.build
> +++ b/drivers/net/iavf/meson.build
> @@ -34,4 +34,11 @@ if arch_subdir == 'x86'
>                               c_args: [cflags, '-mavx2'])
>               objs += iavf_avx2_lib.extract_objects('iavf_rxtx_vec_avx2.c')
>       endif
> +
> +     if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX512F')
> +             cflags += ['-DCC_AVX512_SUPPORT']
> +             cflags += ['-mavx512f']
> +             cflags += ['-march=skylake-avx512']
> +             sources += files('iavf_rxtx_vec_avx512.c')
> +     endif

This logic is probably not what you want, since if the machine cpuflag
value is set, then AVX512 instructions are already available, meaning you
don't need to add in the mavx512 and march flags. Instead the logic should
be handling the case where it's not enabled, but the compiler supports it.
Use the AVX2 build logic as a reference.

>  endif
> -- 
> 1.9.3
> 

Reply via email to