From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 769D243CF0; Wed, 27 Mar 2024 19:14:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 047DE402B2; Wed, 27 Mar 2024 19:14:41 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id EB0AF402A3 for ; Wed, 27 Mar 2024 19:14:39 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 224BB2098E0E; Wed, 27 Mar 2024 11:14:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 224BB2098E0E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1711563279; bh=knP8aPaU/jPFdrDxTDEg18+0RPXiBLaEQadML1UA24I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Bzx6wi7gHJIyhFZtH0YQa6VMYlPTAShl6cXevhUlVYsBy/OYbcBiS5sVONcXZpkno h7z98eVPPkUnIvl7pWm1XMkdvcilFpMondxGkHNht0+NoYWWmGKrNJ+LoRmTrN9//W 9DWNgBS72+uR6at3GBwtHhe3SHdXs4/BKnKX/8q8= Date: Wed, 27 Mar 2024 11:14:39 -0700 From: Tyler Retzlaff To: Morten =?iso-8859-1?Q?Br=F8rup?= Cc: dev@dpdk.org, Yuying Zhang , 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 Subject: Re: [PATCH v7 1/4] net/i40e: use inline prefetch function Message-ID: <20240327181439.GA20331@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> 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> <98CBD80474FA8B44BF855DF32C47DC35E9F332@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F332@smartserver.smartshare.dk> User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Tue, Mar 26, 2024 at 11:16:10AM +0100, Morten Brørup wrote: > > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > > Sent: Wednesday, 20 March 2024 23.02 > > > > Don't directly access the cacheline1 field in rte_mbuf struct for > > prefetch instead just use rte_mbuf_prefetch_part2() to prefetch. > > > > Signed-off-by: Tyler Retzlaff > > --- > > drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > 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] = m; > > nb_free = 1; > > for (i = 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 Yuying Zhang any reply here to confirm? If not I will leave it unconditionally prefetch. > > If so, it belongs in a separate patch anyway. > > > m = rte_pktmbuf_prefree_seg(txep[i].mbuf); > > if (likely(m)) { > > if (likely(m->pool == free[0]->pool)) { > > -- > > 1.8.3.1 > > Reviewed-by: Morten Brørup