[PATCH v7 1/4] net/i40e: use inline prefetch function
Tyler Retzlaff
roretzla at linux.microsoft.com
Wed Mar 27 19:14:39 CET 2024
On Tue, Mar 26, 2024 at 11:16:10AM +0100, Morten Brørup wrote:
> > From: Tyler Retzlaff [mailto:roretzla at 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 <roretzla at linux.microsoft.com>
> > ---
> > 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 <mb at smartsharesystems.com>
More information about the dev
mailing list