21 #ifndef MEMIF_CACHELINE_SIZE 22 #define MEMIF_CACHELINE_SIZE 64 25 #define MEMIF_COOKIE 0x3E31F10 26 #define MEMIF_VERSION_MAJOR 1 27 #define MEMIF_VERSION_MINOR 0 28 #define MEMIF_VERSION ((MEMIF_VERSION_MAJOR << 8) | MEMIF_VERSION_MINOR) 72 typedef struct __attribute__ ((packed))
75 memif_version_t min_version;
76 memif_version_t max_version;
77 memif_region_index_t max_region;
78 memif_ring_index_t max_m2s_ring;
79 memif_ring_index_t max_s2m_ring;
80 memif_log2_ring_size_t max_log2_ring_size;
83 typedef struct __attribute__ ((packed))
85 memif_version_t version;
86 memif_interface_id_t id;
92 typedef struct __attribute__ ((packed))
94 memif_region_index_t index;
95 memif_region_size_t
size;
98 typedef struct __attribute__ ((packed))
101 #define MEMIF_MSG_ADD_RING_FLAG_S2M (1 << 0) 102 memif_ring_index_t index;
103 memif_region_index_t region;
104 memif_region_offset_t
offset;
105 memif_log2_ring_size_t log2_ring_size;
108 typedef struct __attribute__ ((packed))
113 typedef struct __attribute__ ((packed))
118 typedef struct __attribute__ ((packed))
124 typedef struct __attribute__ ((packed, aligned (128)))
140 "Size of memif_msg_t must be 128");
146 typedef struct __attribute__ ((packed))
149 #define MEMIF_DESC_FLAG_NEXT (1 << 0) 150 memif_region_index_t region;
151 uint32_t buffer_length;
154 memif_region_offset_t
offset;
159 "Size of memif_dsct_t must be 32");
161 #define MEMIF_CACHELINE_ALIGN_MARK(mark) \ 162 uint8_t mark[0] __attribute__((aligned(MEMIF_CACHELINE_SIZE))) 169 #define MEMIF_RING_FLAG_MASK_INT 1 170 volatile uint16_t head;
172 volatile uint16_t tail;
uint16_t memif_ring_index_t
uint16_t memif_region_index_t
enum memif_msg_type memif_msg_type_t
uint8_t memif_log2_ring_size_t
uint32_t memif_interface_id_t
uint64_t memif_region_size_t
struct clib_bihash_value offset
template key/value backing page structure
uint64_t memif_region_offset_t