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>
---
 lib/mbuf/rte_mbuf.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h
index 286b32b..04cde0f 100644
--- a/lib/mbuf/rte_mbuf.h
+++ b/lib/mbuf/rte_mbuf.h
@@ -108,7 +108,7 @@
 static inline void
 rte_mbuf_prefetch_part1(struct rte_mbuf *m)
 {
-       rte_prefetch0(&m->cacheline0);
+       rte_prefetch0(&m->buf_addr);
 }
 
 /**
@@ -126,7 +126,11 @@
 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
 #else
        RTE_SET_USED(m);
 #endif
-- 
1.8.3.1

Reply via email to