24/02/2024 09:21, Tyler Retzlaff: > Update prefetch inline functions to access rte_mbuf struct fields > directly instead of via cacheline{0,1} marker extension fields. > > Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com> [...] > rte_mbuf_prefetch_part1(struct rte_mbuf *m) > { > - rte_prefetch0(&m->cacheline0); > + rte_prefetch0(&m->buf_addr);
Should be simply "m", no need to point to the first field explicitly. [...] > rte_mbuf_prefetch_part2(struct rte_mbuf *m) > { > #if RTE_CACHE_LINE_SIZE == 64 > - rte_prefetch0(&m->cacheline1); > +#if RTE_IOVA_IN_MBUF > + rte_prefetch0(&m->next); > +#else > + rte_prefetch0(&m->dynfield2); > +#endif I think it is better to calculate m + min cache line size instead of relying on fields.