]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_mbuf/rte_mbuf.h
mbuf: fix 64-bit address alignment in 32-bit builds
[dpdk.git] / lib / librte_mbuf / rte_mbuf.h
index 9dd8e807e28600bd8132594be290882deb5043a7..466ec0033e2d57237a7fdce54011eca672fe8b5f 100644 (file)
@@ -403,7 +403,13 @@ struct rte_mbuf {
        MARKER cacheline0;
 
        void *buf_addr;           /**< Virtual address of segment buffer. */
-       phys_addr_t buf_physaddr; /**< Physical address of segment buffer. */
+       /**
+        * Physical address of segment buffer.
+        * Force alignment to 8-bytes, so as to ensure we have the exact
+        * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes
+        * working on vector drivers easier.
+        */
+       phys_addr_t buf_physaddr __rte_aligned(sizeof(phys_addr_t));
 
        /* next 8 bytes are initialised on RX descriptor rearm */
        MARKER64 rearm_data;