1 // bindgen-flags: --rust-target 1.40 2 3 #define RTE_CACHE_LINE_MIN_SIZE 64 /**< Minimum Cache line size. */ 4 5 #define RTE_CACHE_LINE_SIZE 64 6 7 typedef unsigned char uint8_t; 8 typedef unsigned short uint16_t; 9 typedef unsigned int uint32_t; 10 typedef unsigned long long uint64_t; 11 12 /* 13 * The kernel image of the rte_mbuf struct, with only the relevant fields. 14 * Padding is necessary to assure the offsets of these fields 15 */ 16 struct rte_kni_mbuf { 17 void *buf_addr __attribute__((__aligned__(RTE_CACHE_LINE_SIZE))); 18 uint64_t buf_physaddr; 19 char pad0[2]; 20 uint16_t data_off; /**< Start address of data in segment buffer. */ 21 char pad1[2]; 22 uint8_t nb_segs; /**< Number of segments. */ 23 char pad4[1]; 24 uint64_t ol_flags; /**< Offload features. */ 25 char pad2[4]; 26 uint32_t pkt_len; /**< Total pkt len: sum of all segment data_len. */ 27 uint16_t data_len; /**< Amount of data in segment buffer. */ 28 29 /* fields on second cache line */ 30 char pad3[8] __attribute__((__aligned__(RTE_CACHE_LINE_MIN_SIZE))); 31 void *pool; 32 void *next; 33 }; 34