8 #define CNE_MEMIF_COOKIE 0x3E31F20
9 #define CNE_MEMIF_VERSION_MAJOR 2
10 #define CNE_MEMIF_VERSION_MINOR 0
11 #define CNE_MEMIF_VERSION ((CNE_MEMIF_VERSION_MAJOR << 8) | CNE_MEMIF_VERSION_MINOR)
12 #define CNE_MEMIF_NAME_SZ 32
23 typedef enum cne_memif_msg_type {
24 CNE_MEMIF_MSG_TYPE_NONE,
25 CNE_MEMIF_MSG_TYPE_ACK,
26 CNE_MEMIF_MSG_TYPE_HELLO,
27 CNE_MEMIF_MSG_TYPE_INIT,
28 CNE_MEMIF_MSG_TYPE_ADD_REGION,
29 CNE_MEMIF_MSG_TYPE_ADD_RING,
30 CNE_MEMIF_MSG_TYPE_CONNECT,
31 CNE_MEMIF_MSG_TYPE_CONNECTED,
32 CNE_MEMIF_MSG_TYPE_DISCONNECT,
33 } cne_memif_msg_type_t;
38 } cne_memif_ring_type_t;
41 CNE_MEMIF_INTERFACE_MODE_ETHERNET,
42 CNE_MEMIF_INTERFACE_MODE_IP,
43 CNE_MEMIF_INTERFACE_MODE_PUNT_INJECT,
44 } cne_memif_interface_mode_t;
46 typedef uint16_t cne_memif_region_index_t;
47 typedef uint32_t cne_memif_region_offset_t;
48 typedef uint64_t cne_memif_region_size_t;
49 typedef uint16_t cne_memif_ring_index_t;
50 typedef uint32_t cne_memif_interface_id_t;
51 typedef uint16_t cne_memif_version_t;
52 typedef uint8_t cne_memif_log2_ring_size_t;
63 uint8_t
name[CNE_MEMIF_NAME_SZ];
79 cne_memif_interface_id_t
id;
80 cne_memif_interface_mode_t
mode : 8;
82 uint8_t
name[CNE_MEMIF_NAME_SZ];
92 cne_memif_region_size_t
size;
101 #define CNE_MEMIF_MSG_ADD_RING_FLAG_C2S 1
122 uint8_t
if_name[CNE_MEMIF_NAME_SZ];
136 cne_memif_msg_type_t type : 16;
158 #define CNE_MEMIF_DESC_FLAG_NEXT 1
159 cne_memif_region_index_t
region;
161 cne_memif_region_offset_t
offset;
165 #define CNE_MEMIF_CACHELINE_ALIGN_MARK(mark) CNE_MARKER mark __cne_cache_aligned;
168 CNE_MEMIF_CACHELINE_ALIGN_MARK(cacheline0);
171 #define CNE_MEMIF_RING_FLAG_MASK_INT 1
173 CNE_MEMIF_CACHELINE_ALIGN_MARK(cacheline1);
175 CNE_MEMIF_CACHELINE_ALIGN_MARK(cacheline2);
cne_memif_interface_id_t id
cne_memif_version_t max_version
cne_memif_ring_index_t max_s2c_ring
cne_memif_version_t min_version
cne_memif_ring_index_t index
cne_memif_region_size_t size
uint8_t if_name[CNE_MEMIF_NAME_SZ]
cne_memif_region_index_t region
uint16_t private_hdr_size
uint8_t name[CNE_MEMIF_NAME_SZ]
cne_memif_log2_ring_size_t max_log2_ring_size
cne_memif_ring_index_t max_c2s_ring
cne_memif_region_offset_t offset
cne_memif_region_index_t index
cne_memif_interface_mode_t mode
cne_memif_log2_ring_size_t log2_ring_size
cne_memif_version_t version
cne_memif_region_index_t max_region