From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: "Coyle, David" <david.coyle@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 3/3] net/i40e: fix segment fault in AVX512
Date: Fri, 26 Mar 2021 01:50:54 +0000 [thread overview]
Message-ID: <DM5PR11MB1787B0566CEC86F0BD3297E88C619@DM5PR11MB1787.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MN2PR11MB355015D6ED2683AF1C7F330DE36C9@MN2PR11MB3550.namprd11.prod.outlook.com>
Hi David,
Sorry for the late response.
> > + if (!cache)
> > + goto normal;
>
> [DC] Like in IAVF and ICE, should we also check for cache->len == 0, like is
> done in Tx path?
Not necessary because below code tries to get more buffer is length is not as long as needed, it covers the case even if the length is 0.
> > + /* Initialize the mbufs in vector, process 4 mbufs in one loop */
>
> [DC] Comment should say 2 mbufs
Thanks. Will correct it.
> > _mm512_set1_epi64(RTE_PKTMBUF_HEADROOM);
> > + /* Initialize the mbufs in vector, process 4 mbufs in one loop */
>
> [DC] Comment should say 8 mbufs
Thanks. Will correct it.
> > + /**
> > + * merge 0 & 1, by casting 0 to 256-bit and inserting 1
> > + * into the high lanes. Similarly for 2 & 3
> > + */
>
> [DC] Comment should say "Similarly for 2 & 3, 4 & 5, 6 & 7"
Thanks. Will correct it.
>
> > + vaddr0_1 =
> > +
> > _mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
> > + vaddr1, 1);
>
> <snip>
>
> > + /* flush desc with pa dma_addr */
> > + _mm512_store_si512((__m512i *)&rxdp->read,
> > dma_addr0_3);
> > + _mm512_store_si512((__m512i *)&(rxdp + 4)->read,
> > dma_addr4_7);
> > + }
> > +#endif
>
> [DC] Again, there's common code here with the avx2 file and also with the
> IAVF and ICE PMDs.
>
> As I said in other reviews, maybe it's not practical to share code across PMDs.
> But might be good to have some common functions within each PMD for
> avx2 and avx512 paths
Most of the code looks same but not all. In this avx512 file, some avx512 instructions are used to replace the avx2 ones.
Let me check if some common code can be saved.
prev parent reply other threads:[~2021-03-26 1:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 1:27 Wenzhuo Lu
2021-03-15 17:38 ` Coyle, David
2021-03-26 1:50 ` Lu, Wenzhuo [this message]
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=DM5PR11MB1787B0566CEC86F0BD3297E88C619@DM5PR11MB1787.namprd11.prod.outlook.com \
--to=wenzhuo.lu@intel.com \
--cc=david.coyle@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/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).