mbuf: split mbuf across two cache lines.
[dpdk.git] / lib / librte_eal / linuxapp / eal / include / exec-env / rte_kni_common.h
index d0b82da..25ed672 100644 (file)
@@ -108,16 +108,18 @@ struct rte_kni_fifo {
  * Padding is necessary to assure the offsets of these fields
  */
 struct rte_kni_mbuf {
-       void *pool;
-       void *buf_addr;
-       char pad0[14];
-       uint16_t ol_flags;      /**< Offload features. */
-       void *next;
-       void *data;             /**< Start address of data in segment buffer. */
-       uint16_t data_len;      /**< Amount of data in segment buffer. */
+       void *buf_addr __attribute__((__aligned__(64)));
+       char pad0[10];
+       uint16_t data_off;      /**< Start address of data in segment buffer. */
+       char pad1[4];
+       uint64_t ol_flags;      /**< Offload features. */
        char pad2[2];
-       uint16_t pkt_len;       /**< Total pkt len: sum of all segment data_len. */
-} __attribute__((__aligned__(64)));
+       uint16_t data_len;      /**< Amount of data in segment buffer. */
+       uint32_t pkt_len;       /**< Total pkt len: sum of all segment data_len. */
+       char pad3[8];
+       void *pool __attribute__((__aligned__(64)));
+       void *next;
+};
 
 /*
  * Struct used to create a KNI device. Passed to the kernel in IOCTL call