DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3 6/8] net/ice: support Rx AVX2 vector
Date: Thu, 21 Mar 2019 02:31:39 +0000	[thread overview]
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC0909407EEEF2@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <755f5f67-2056-82f4-d8be-ee7b4d306ac6@intel.com>

Hi Ferruh,


> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Thursday, March 21, 2019 1:37 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 6/8] net/ice: support Rx AVX2 vector
> 
> On 3/18/2019 1:37 AM, Lu, Wenzhuo wrote:
> > Hi Ferruh,
> >
> >
> >> -----Original Message-----
> >> From: Yigit, Ferruh
> >> Sent: Saturday, March 16, 2019 1:54 AM
> >> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> >> Subject: Re: [dpdk-dev] [PATCH v3 6/8] net/ice: support Rx AVX2
> >> vector
> >>
> >> On 3/15/2019 6:22 AM, Wenzhuo Lu wrote:
> >>> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> >> <...>
> >>
> >>> +#ifdef RTE_LIBRTE_ICE_16BYTE_RX_DESC
> >>> +		/* for AVX we need alignment otherwise loads are not
> >> atomic */
> >>> +		if (avx_aligned) {
> >>> +			/* load in descriptors, 2 at a time, in reverse order */
> >>> +			raw_desc6_7 = _mm256_load_si256((void *)(rxdp +
> >> 6));
> >>> +			rte_compiler_barrier();
> >>> +			raw_desc4_5 = _mm256_load_si256((void *)(rxdp +
> >> 4));
> >>> +			rte_compiler_barrier();
> >>> +			raw_desc2_3 = _mm256_load_si256((void *)(rxdp +
> >> 2));
> >>> +			rte_compiler_barrier();
> >>> +			raw_desc0_1 = _mm256_load_si256((void *)(rxdp +
> >> 0));
> >>> +		} else
> >>> +#endif
> >>> +		do {
> >>> +			const __m128i raw_desc7 =
> >>> +				_mm_load_si128((void *)(rxdp + 7));
> >>> +			rte_compiler_barrier();
> >>> +			const __m128i raw_desc6 =
> >>> +				_mm_load_si128((void *)(rxdp + 6));
> >>> +			rte_compiler_barrier();
> >>> +			const __m128i raw_desc5 =
> >>> +				_mm_load_si128((void *)(rxdp + 5));
> >>> +			rte_compiler_barrier();
> >>> +			const __m128i raw_desc4 =
> >>> +				_mm_load_si128((void *)(rxdp + 4));
> >>> +			rte_compiler_barrier();
> >>> +			const __m128i raw_desc3 =
> >>> +				_mm_load_si128((void *)(rxdp + 3));
> >>> +			rte_compiler_barrier();
> >>> +			const __m128i raw_desc2 =
> >>> +				_mm_load_si128((void *)(rxdp + 2));
> >>> +			rte_compiler_barrier();
> >>> +			const __m128i raw_desc1 =
> >>> +				_mm_load_si128((void *)(rxdp + 1));
> >>> +			rte_compiler_barrier();
> >>> +			const __m128i raw_desc0 =
> >>> +				_mm_load_si128((void *)(rxdp + 0));
> >>> +
> >>> +			raw_desc6_7 =
> >>> +				_mm256_inserti128_si256
> >>> +
> >> 	(_mm256_castsi128_si256(raw_desc6),
> >>> +					 raw_desc7, 1);
> >>> +			raw_desc4_5 =
> >>> +				_mm256_inserti128_si256
> >>> +
> >> 	(_mm256_castsi128_si256(raw_desc4),
> >>> +					 raw_desc5, 1);
> >>> +			raw_desc2_3 =
> >>> +				_mm256_inserti128_si256
> >>> +
> >> 	(_mm256_castsi128_si256(raw_desc2),
> >>> +					 raw_desc3, 1);
> >>> +			raw_desc0_1 =
> >>> +				_mm256_inserti128_si256
> >>> +
> >> 	(_mm256_castsi128_si256(raw_desc0),
> >>> +					 raw_desc1, 1);
> >>> +		} while (0);
> >>
> >> Is this to provide the proper indention because of the above #ifdef
> >> block? If so why not simple { } for the scope, is do{ }while(0) has benefit
> against it?
> > Yes, it's for the indention. To my opinion, "do while" looks friendly
> > to the readers as we always use it in the macros. Only "{}" looks
> > missing a function name or a "for ()" :)
> >
> 
> I found '{ }' more clear but no strong opinion, perhaps a comment to clarify
> to intention can be good but that also looks like optional, so up to you.
OK. I'll use '{}'. It also looks good to me.

  parent reply	other threads:[~2019-03-21  2:31 UTC|newest]

Thread overview: 219+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  7:48 [dpdk-dev] [PATCH 0/8] Support vector instructions on ICE Wenzhuo Lu
2019-02-28  7:48 ` [dpdk-dev] [PATCH 1/8] net/ice: fix TX function setting Wenzhuo Lu
2019-02-28  7:48 ` [dpdk-dev] [PATCH 2/8] net/ice: add pointer for queue buffer release Wenzhuo Lu
2019-02-28  7:48 ` [dpdk-dev] [PATCH 3/8] net/ice: support RX SSE vector Wenzhuo Lu
2019-03-01  3:44   ` Zhang, Qi Z
2019-03-04  1:27     ` Lu, Wenzhuo
2019-02-28  7:48 ` [dpdk-dev] [PATCH 4/8] net/ice: support RX scatter " Wenzhuo Lu
2019-02-28  7:48 ` [dpdk-dev] [PATCH 5/8] net/ice: support TX " Wenzhuo Lu
2019-02-28  7:48 ` [dpdk-dev] [PATCH 6/8] net/ice: support RX AVX2 vector Wenzhuo Lu
2019-02-28  7:48 ` [dpdk-dev] [PATCH 7/8] net/ice: support RX scatter " Wenzhuo Lu
2019-02-28  7:48 ` [dpdk-dev] [PATCH 8/8] net/ice: support TX " Wenzhuo Lu
2019-03-01  3:41 ` [dpdk-dev] [PATCH 0/8] Support vector instructions on ICE Zhang, Qi Z
2019-03-04  1:24   ` Lu, Wenzhuo
2019-03-04  6:53 ` [dpdk-dev] [PATCH v2 " Wenzhuo Lu
2019-03-04  6:53   ` [dpdk-dev] [PATCH v2 1/8] net/ice: fix Tx function setting Wenzhuo Lu
2019-03-04  6:53   ` [dpdk-dev] [PATCH v2 2/8] net/ice: add pointer for queue buffer release Wenzhuo Lu
2019-03-04  6:53   ` [dpdk-dev] [PATCH v2 3/8] net/ice: support vector SSE in RX Wenzhuo Lu
2019-03-11  3:26     ` Zhang, Qi Z
2019-03-15  1:50       ` Lu, Wenzhuo
2019-03-15  1:50         ` Lu, Wenzhuo
2019-03-04  6:53   ` [dpdk-dev] [PATCH v2 4/8] net/ice: support Rx scatter SSE vector Wenzhuo Lu
2019-03-04  6:53   ` [dpdk-dev] [PATCH v2 5/8] net/ice: support Tx " Wenzhuo Lu
2019-03-04  6:53   ` [dpdk-dev] [PATCH v2 6/8] net/ice: support Rx AVX2 vector Wenzhuo Lu
2019-03-04  6:53   ` [dpdk-dev] [PATCH v2 7/8] net/ice: support Rx scatter " Wenzhuo Lu
2019-03-04  6:53   ` [dpdk-dev] [PATCH v2 8/8] net/ice: support vector AVX2 in TX Wenzhuo Lu
2019-03-15  6:22 ` [dpdk-dev] [PATCH v3 0/8] Support vector instructions on ICE Wenzhuo Lu
2019-03-15  6:22   ` Wenzhuo Lu
2019-03-15  6:22   ` [dpdk-dev] [PATCH v3 1/8] net/ice: fix Tx function setting Wenzhuo Lu
2019-03-15  6:22     ` Wenzhuo Lu
2019-03-15 17:52     ` Ferruh Yigit
2019-03-15 17:52       ` Ferruh Yigit
2019-03-18  1:08       ` Lu, Wenzhuo
2019-03-18  1:08         ` Lu, Wenzhuo
2019-03-20 17:22         ` Ferruh Yigit
2019-03-20 17:22           ` Ferruh Yigit
2019-03-21  2:29           ` Lu, Wenzhuo
2019-03-21  2:29             ` Lu, Wenzhuo
2019-03-15  6:22   ` [dpdk-dev] [PATCH v3 2/8] net/ice: add pointer for queue buffer release Wenzhuo Lu
2019-03-15  6:22     ` Wenzhuo Lu
2019-03-15 17:52     ` Ferruh Yigit
2019-03-15 17:52       ` Ferruh Yigit
2019-03-18  1:15       ` Lu, Wenzhuo
2019-03-18  1:15         ` Lu, Wenzhuo
2019-03-15  6:22   ` [dpdk-dev] [PATCH v3 3/8] net/ice: support vector SSE in RX Wenzhuo Lu
2019-03-15  6:22     ` Wenzhuo Lu
2019-03-15 17:53     ` Ferruh Yigit
2019-03-15 17:53       ` Ferruh Yigit
2019-03-18  1:22       ` Lu, Wenzhuo
2019-03-18  1:22         ` Lu, Wenzhuo
2019-03-20 17:35         ` Ferruh Yigit
2019-03-20 17:35           ` Ferruh Yigit
2019-03-21  2:48           ` Lu, Wenzhuo
2019-03-21  2:48             ` Lu, Wenzhuo
2019-03-15  6:22   ` [dpdk-dev] [PATCH v3 4/8] net/ice: support Rx scatter SSE vector Wenzhuo Lu
2019-03-15  6:22     ` Wenzhuo Lu
2019-03-15  6:22   ` [dpdk-dev] [PATCH v3 5/8] net/ice: support Tx " Wenzhuo Lu
2019-03-15  6:22     ` Wenzhuo Lu
2019-03-15  6:22   ` [dpdk-dev] [PATCH v3 6/8] net/ice: support Rx AVX2 vector Wenzhuo Lu
2019-03-15  6:22     ` Wenzhuo Lu
2019-03-15 17:54     ` Ferruh Yigit
2019-03-15 17:54       ` Ferruh Yigit
2019-03-18  1:37       ` Lu, Wenzhuo
2019-03-18  1:37         ` Lu, Wenzhuo
2019-03-20 17:37         ` Ferruh Yigit
2019-03-20 17:37           ` Ferruh Yigit
2019-03-21  2:31           ` Lu, Wenzhuo [this message]
2019-03-21  2:31             ` Lu, Wenzhuo
2019-03-15  6:22   ` [dpdk-dev] [PATCH v3 7/8] net/ice: support Rx scatter " Wenzhuo Lu
2019-03-15  6:22     ` Wenzhuo Lu
2019-03-15  6:22   ` [dpdk-dev] [PATCH v3 8/8] net/ice: support vector AVX2 in TX Wenzhuo Lu
2019-03-15  6:22     ` Wenzhuo Lu
2019-03-15 17:54     ` Ferruh Yigit
2019-03-15 17:54       ` Ferruh Yigit
2019-03-18  1:38       ` Lu, Wenzhuo
2019-03-18  1:38         ` Lu, Wenzhuo
2019-03-15  8:08   ` [dpdk-dev] [PATCH v3 0/8] Support vector instructions on ICE Zhang, Qi Z
2019-03-15  8:08     ` Zhang, Qi Z
2019-03-21  6:26 ` [dpdk-dev] [PATCH v4 " Wenzhuo Lu
2019-03-21  6:26   ` Wenzhuo Lu
2019-03-21  6:26   ` [dpdk-dev] [PATCH v4 1/8] net/ice: fix Tx function setting Wenzhuo Lu
2019-03-21  6:26     ` Wenzhuo Lu
2019-03-22  8:46     ` Maxime Coquelin
2019-03-22  8:46       ` Maxime Coquelin
2019-03-22  9:01       ` Maxime Coquelin
2019-03-22  9:01         ` Maxime Coquelin
2019-03-21  6:26   ` [dpdk-dev] [PATCH v4 2/8] net/ice: add pointer for queue buffer release Wenzhuo Lu
2019-03-21  6:26     ` Wenzhuo Lu
2019-03-22  8:59     ` Maxime Coquelin
2019-03-22  8:59       ` Maxime Coquelin
2019-03-21  6:26   ` [dpdk-dev] [PATCH v4 3/8] net/ice: support vector SSE in RX Wenzhuo Lu
2019-03-21  6:26     ` Wenzhuo Lu
2019-03-21 19:02     ` Ferruh Yigit
2019-03-21 19:02       ` Ferruh Yigit
2019-03-22  1:46       ` Lu, Wenzhuo
2019-03-22  1:46         ` Lu, Wenzhuo
2019-03-21  6:26   ` [dpdk-dev] [PATCH v4 4/8] net/ice: support Rx scatter SSE vector Wenzhuo Lu
2019-03-21  6:26     ` Wenzhuo Lu
2019-03-21  6:26   ` [dpdk-dev] [PATCH v4 5/8] net/ice: support Tx " Wenzhuo Lu
2019-03-21  6:26     ` Wenzhuo Lu
2019-03-21  6:26   ` [dpdk-dev] [PATCH v4 6/8] net/ice: support Rx AVX2 vector Wenzhuo Lu
2019-03-21  6:26     ` Wenzhuo Lu
2019-03-21  6:26   ` [dpdk-dev] [PATCH v4 7/8] net/ice: support Rx scatter " Wenzhuo Lu
2019-03-21  6:26     ` Wenzhuo Lu
2019-03-21  6:26   ` [dpdk-dev] [PATCH v4 8/8] net/ice: support vector AVX2 in TX Wenzhuo Lu
2019-03-21  6:26     ` Wenzhuo Lu
2019-03-21 19:20     ` Ferruh Yigit
2019-03-21 19:20       ` Ferruh Yigit
2019-03-22  1:45       ` Lu, Wenzhuo
2019-03-22  1:45         ` Lu, Wenzhuo
2019-03-22  2:58 ` [dpdk-dev] [PATCH v5 0/8] Support vector instructions on ICE Wenzhuo Lu
2019-03-22  2:58   ` Wenzhuo Lu
2019-03-22  2:58   ` [dpdk-dev] [PATCH v5 1/8] net/ice: fix Tx function setting Wenzhuo Lu
2019-03-22  2:58     ` Wenzhuo Lu
2019-03-22  2:58   ` [dpdk-dev] [PATCH v5 2/8] net/ice: add pointer for queue buffer release Wenzhuo Lu
2019-03-22  2:58     ` Wenzhuo Lu
2019-03-22  2:58   ` [dpdk-dev] [PATCH v5 3/8] net/ice: support vector SSE in RX Wenzhuo Lu
2019-03-22  2:58     ` Wenzhuo Lu
2019-03-22  9:42     ` Maxime Coquelin
2019-03-22  9:42       ` Maxime Coquelin
2019-03-25  1:56       ` Lu, Wenzhuo
2019-03-25  1:56         ` Lu, Wenzhuo
2019-03-22  2:58   ` [dpdk-dev] [PATCH v5 4/8] net/ice: support Rx scatter SSE vector Wenzhuo Lu
2019-03-22  2:58     ` Wenzhuo Lu
2019-03-22  2:58   ` [dpdk-dev] [PATCH v5 5/8] net/ice: support Tx " Wenzhuo Lu
2019-03-22  2:58     ` Wenzhuo Lu
2019-03-22  9:58     ` Maxime Coquelin
2019-03-22  9:58       ` Maxime Coquelin
2019-03-25  2:02       ` Lu, Wenzhuo
2019-03-25  2:02         ` Lu, Wenzhuo
2019-03-22  2:58   ` [dpdk-dev] [PATCH v5 6/8] net/ice: support Rx AVX2 vector Wenzhuo Lu
2019-03-22  2:58     ` Wenzhuo Lu
2019-03-22 10:12     ` Maxime Coquelin
2019-03-22 10:12       ` Maxime Coquelin
2019-03-25  2:22       ` Lu, Wenzhuo
2019-03-25  2:22         ` Lu, Wenzhuo
2019-03-25  8:26         ` Maxime Coquelin
2019-03-25  8:26           ` Maxime Coquelin
2019-03-26  1:00           ` Lu, Wenzhuo
2019-03-26  1:00             ` Lu, Wenzhuo
2019-03-26  9:28             ` Maxime Coquelin
2019-03-26  9:28               ` Maxime Coquelin
2019-03-27  0:56               ` Lu, Wenzhuo
2019-03-27  0:56                 ` Lu, Wenzhuo
2019-03-27  7:50                 ` Maxime Coquelin
2019-03-27  7:50                   ` Maxime Coquelin
2019-03-28  1:56                   ` Lu, Wenzhuo
2019-03-28  1:56                     ` Lu, Wenzhuo
2019-03-22  2:58   ` [dpdk-dev] [PATCH v5 7/8] net/ice: support Rx scatter " Wenzhuo Lu
2019-03-22  2:58     ` Wenzhuo Lu
2019-03-22  2:58   ` [dpdk-dev] [PATCH v5 8/8] net/ice: support vector AVX2 in TX Wenzhuo Lu
2019-03-22  2:58     ` Wenzhuo Lu
2019-03-25  6:06 ` [dpdk-dev] [PATCH v6 0/8] Support vector instructions on ICE Wenzhuo Lu
2019-03-25  6:06   ` Wenzhuo Lu
2019-03-25  6:06   ` [dpdk-dev] [PATCH v6 1/8] net/ice: fix Tx function setting Wenzhuo Lu
2019-03-25  6:06     ` Wenzhuo Lu
2019-03-25  6:06   ` [dpdk-dev] [PATCH v6 2/8] net/ice: add pointer for queue buffer release Wenzhuo Lu
2019-03-25  6:06     ` Wenzhuo Lu
2019-03-25 13:23     ` Maxime Coquelin
2019-03-25 13:23       ` Maxime Coquelin
2019-03-26  1:15       ` Lu, Wenzhuo
2019-03-26  1:15         ` Lu, Wenzhuo
2019-03-25  6:06   ` [dpdk-dev] [PATCH v6 3/8] net/ice: support vector SSE in RX Wenzhuo Lu
2019-03-25  6:06     ` Wenzhuo Lu
2019-03-25  6:06   ` [dpdk-dev] [PATCH v6 4/8] net/ice: support Rx scatter SSE vector Wenzhuo Lu
2019-03-25  6:06     ` Wenzhuo Lu
2019-03-25  6:06   ` [dpdk-dev] [PATCH v6 5/8] net/ice: support Tx " Wenzhuo Lu
2019-03-25  6:06     ` Wenzhuo Lu
2019-03-25  6:06   ` [dpdk-dev] [PATCH v6 6/8] net/ice: support Rx AVX2 vector Wenzhuo Lu
2019-03-25  6:06     ` Wenzhuo Lu
2019-03-25  6:06   ` [dpdk-dev] [PATCH v6 7/8] net/ice: support Rx scatter " Wenzhuo Lu
2019-03-25  6:06     ` Wenzhuo Lu
2019-03-25  6:06   ` [dpdk-dev] [PATCH v6 8/8] net/ice: support vector AVX2 in TX Wenzhuo Lu
2019-03-25  6:06     ` Wenzhuo Lu
2019-03-25  7:56   ` [dpdk-dev] [PATCH v6 0/8] Support vector instructions on ICE Zhang, Qi Z
2019-03-25  7:56     ` Zhang, Qi Z
2019-03-26  6:16 ` [dpdk-dev] [PATCH v7 " Wenzhuo Lu
2019-03-26  6:16   ` Wenzhuo Lu
2019-03-26  6:16   ` [dpdk-dev] [PATCH v7 1/8] net/ice: fix Tx function setting Wenzhuo Lu
2019-03-26  6:16     ` Wenzhuo Lu
2019-03-26  6:16   ` [dpdk-dev] [PATCH v7 2/8] net/ice: add pointer for queue buffer release Wenzhuo Lu
2019-03-26  6:16     ` Wenzhuo Lu
2019-03-26  6:16   ` [dpdk-dev] [PATCH v7 3/8] net/ice: support vector SSE in RX Wenzhuo Lu
2019-03-26  6:16     ` Wenzhuo Lu
2019-03-26  6:16   ` [dpdk-dev] [PATCH v7 4/8] net/ice: support Rx scatter SSE vector Wenzhuo Lu
2019-03-26  6:16     ` Wenzhuo Lu
2019-03-26  6:16   ` [dpdk-dev] [PATCH v7 5/8] net/ice: support Tx " Wenzhuo Lu
2019-03-26  6:16     ` Wenzhuo Lu
2019-03-26  6:16   ` [dpdk-dev] [PATCH v7 6/8] net/ice: support Rx AVX2 vector Wenzhuo Lu
2019-03-26  6:16     ` Wenzhuo Lu
2019-03-26  6:16   ` [dpdk-dev] [PATCH v7 7/8] net/ice: support Rx scatter " Wenzhuo Lu
2019-03-26  6:16     ` Wenzhuo Lu
2019-03-26  6:16   ` [dpdk-dev] [PATCH v7 8/8] net/ice: support vector AVX2 in TX Wenzhuo Lu
2019-03-26  6:16     ` Wenzhuo Lu
2019-03-26  9:50   ` [dpdk-dev] [PATCH v7 0/8] Support vector instructions on ICE Ferruh Yigit
2019-03-26  9:50     ` Ferruh Yigit
2019-03-31 15:52     ` Thomas Monjalon
2019-03-31 15:52       ` Thomas Monjalon
2019-04-01  5:46       ` Lu, Wenzhuo
2019-04-01  5:46         ` Lu, Wenzhuo
2019-04-01 12:51       ` Ferruh Yigit
2019-04-01 12:51         ` Ferruh Yigit
2019-04-01 13:27         ` Thomas Monjalon
2019-04-01 13:27           ` Thomas Monjalon
2019-04-01 15:12           ` Ferruh Yigit
2019-04-01 15:12             ` Ferruh Yigit
2019-04-01 15:14             ` Thomas Monjalon
2019-04-01 15:14               ` Thomas Monjalon
2019-04-02  1:01               ` Lu, Wenzhuo
2019-04-02  1:01                 ` Lu, Wenzhuo
2019-04-02  7:12                 ` Thomas Monjalon
2019-04-02  7:12                   ` Thomas Monjalon
2019-04-01 14:39         ` Bruce Richardson
2019-04-01 14:39           ` Bruce Richardson
2019-04-01 14:56           ` Ferruh Yigit
2019-04-01 14:56             ` Ferruh Yigit
2019-04-01 15:09             ` Ferruh Yigit
2019-04-01 15:09               ` Ferruh Yigit
2019-04-01 15:13             ` Thomas Monjalon
2019-04-01 15:13               ` Thomas Monjalon

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=6A0DE07E22DDAD4C9103DF62FEBC0909407EEEF2@shsmsx102.ccr.corp.intel.com \
    --to=wenzhuo.lu@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).