DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>
Cc: dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/3] net/iavf: enable AVX512 for legacy RX
Date: Thu, 10 Sep 2020 10:29:57 +0100
Message-ID: <20200910092957.GE1789@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <1599717545-106571-2-git-send-email-wenzhuo.lu@intel.com>

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.lu@intel.com>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Signed-off-by: Leyi Rong <leyi.rong@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	other threads:[~2020-09-10  9:30 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10  5:59 [dpdk-dev] [PATCH 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-09-10  5:59 ` [dpdk-dev] [PATCH 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-09-10  9:29   ` Bruce Richardson [this message]
2020-09-11  3:06     ` Lu, Wenzhuo
2020-09-10  5:59 ` [dpdk-dev] [PATCH 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-09-10  5:59 ` [dpdk-dev] [PATCH 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-09-15  1:17   ` Wang, Haiyue
2020-09-17  1:29     ` Lu, Wenzhuo
2020-09-17  1:39 ` [dpdk-dev] [PATCH v2 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-09-17  1:39   ` [dpdk-dev] [PATCH v2 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-09-17  1:39   ` [dpdk-dev] [PATCH v2 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-09-17  1:39   ` [dpdk-dev] [PATCH v2 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-09-17  7:37   ` [dpdk-dev] [PATCH v2 0/3] enable AVX512 for iavf Morten Brørup
2020-09-17  9:13     ` Bruce Richardson
2020-09-17  9:35       ` Morten Brørup
2020-09-21  8:13 ` [dpdk-dev] [PATCH v3 " Wenzhuo Lu
2020-09-21  8:13   ` [dpdk-dev] [PATCH v3 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-09-21  8:13   ` [dpdk-dev] [PATCH v3 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-09-21  8:13   ` [dpdk-dev] [PATCH v3 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-09-21 19:10     ` Morten Brørup
2020-09-22  1:34       ` Lu, Wenzhuo
2020-09-27  1:30 ` [dpdk-dev] [PATCH v4 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-09-27  1:30   ` [dpdk-dev] [PATCH v4 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-09-27  1:30   ` [dpdk-dev] [PATCH v4 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-09-27  1:30   ` [dpdk-dev] [PATCH v4 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-10-21  7:47 ` [dpdk-dev] [PATCH v5 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-10-21  7:47   ` [dpdk-dev] [PATCH v5 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-10-21  7:47   ` [dpdk-dev] [PATCH v5 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-10-21  7:47   ` [dpdk-dev] [PATCH v5 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-10-28  5:14 ` [dpdk-dev] [PATCH v6 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-10-28  5:14   ` [dpdk-dev] [PATCH v6 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-10-28  5:14   ` [dpdk-dev] [PATCH v6 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-10-28  5:15   ` [dpdk-dev] [PATCH v6 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-10-29  1:24 ` [dpdk-dev] [PATCH v7 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-10-29  1:24   ` [dpdk-dev] [PATCH v7 1/3] net/iavf: enable AVX512 for legacy Rx Wenzhuo Lu
2020-10-29  1:24   ` [dpdk-dev] [PATCH v7 2/3] net/iavf: enable AVX512 for flexible Rx Wenzhuo Lu
2020-10-29  1:24   ` [dpdk-dev] [PATCH v7 3/3] net/iavf: enable AVX512 for Tx Wenzhuo Lu
2020-10-30 23:29     ` Ferruh Yigit
2020-10-29  4:00   ` [dpdk-dev] [PATCH v7 0/3] enable AVX512 for iavf Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200910092957.GE1789@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=leyi.rong@intel.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git