From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id D720CCD11DF for ; Tue, 26 Mar 2024 10:16:14 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEE034028B; Tue, 26 Mar 2024 11:16:13 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 884DF40265 for ; Tue, 26 Mar 2024 11:16:12 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 7B8F320CEF; Tue, 26 Mar 2024 11:16:11 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v7 1/4] net/i40e: use inline prefetch function Date: Tue, 26 Mar 2024 11:16:10 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F332@smartserver.smartshare.dk> In-Reply-To: <1710972098-2209-2-git-send-email-roretzla@linux.microsoft.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v7 1/4] net/i40e: use inline prefetch function Thread-Index: Adp7EjBYdNpIeMllQVyeqZkW8CW/jwEUx/jA References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1710972098-2209-1-git-send-email-roretzla@linux.microsoft.com> <1710972098-2209-2-git-send-email-roretzla@linux.microsoft.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Tyler Retzlaff" , , "Yuying Zhang" Cc: "Ajit Khaparde" , "Andrew Boyer" , "Andrew Rybchenko" , "Bruce Richardson" , "Chenbo Xia" , "Chengwen Feng" , "Dariusz Sosnowski" , "David Christensen" , "Hyong Youb Kim" , "Jerin Jacob" , "Jie Hai" , "Jingjing Wu" , "John Daley" , "Kevin Laatz" , "Kiran Kumar K" , "Konstantin Ananyev" , "Maciej Czekaj" , "Matan Azrad" , "Maxime Coquelin" , "Nithin Dabilpuram" , "Ori Kam" , "Ruifeng Wang" , "Satha Rao" , "Somnath Kotur" , "Suanming Mou" , "Sunil Kumar Kori" , "Viacheslav Ovsiienko" , "Yisen Zhuang" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > Sent: Wednesday, 20 March 2024 23.02 >=20 > Don't directly access the cacheline1 field in rte_mbuf struct for > prefetch instead just use rte_mbuf_prefetch_part2() to prefetch. >=20 > Signed-off-by: Tyler Retzlaff > --- > drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c > b/drivers/net/i40e/i40e_rxtx_vec_avx512.c > index f3050cd..0238b03 100644 > --- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c > +++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c > @@ -826,7 +826,7 @@ > free[0] =3D m; > nb_free =3D 1; > for (i =3D 1; i < n; i++) { > - rte_prefetch0(&txep[i + 3].mbuf->cacheline1); > + rte_mbuf_prefetch_part2(txep[i + 3].mbuf); @Yuying Zhang: If this prefetch is for m->next, I think it can be omitted if m->next is = in the first cache line: - rte_prefetch0(&txep[i + 3].mbuf->cacheline1); +#if RTE_IOVA_IN_MBUF + rte_mbuf_prefetch_part2(txep[i + 3].mbuf); +#endif If so, it belongs in a separate patch anyway. > m =3D rte_pktmbuf_prefree_seg(txep[i].mbuf); > if (likely(m)) { > if (likely(m->pool =3D=3D free[0]->pool)) { > -- > 1.8.3.1 Reviewed-by: Morten Br=F8rup