MCPcopy Create free account
hub / github.com/F-Stack/f-stack / memif_msg_enq_hello

Function memif_msg_enq_hello

dpdk/drivers/net/memif/memif_socket.c:136–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136static int
137memif_msg_enq_hello(struct memif_control_channel *cc)
138{
139 struct memif_msg_queue_elt *e = memif_msg_enq(cc);
140 memif_msg_hello_t *h;
141
142 if (e == NULL)
143 return -1;
144
145 h = &e->msg.hello;
146
147 e->msg.type = MEMIF_MSG_TYPE_HELLO;
148 h->min_version = MEMIF_VERSION;
149 h->max_version = MEMIF_VERSION;
150 h->max_c2s_ring = ETH_MEMIF_MAX_NUM_Q_PAIRS;
151 h->max_s2c_ring = ETH_MEMIF_MAX_NUM_Q_PAIRS;
152 h->max_region = ETH_MEMIF_MAX_REGION_NUM - 1;
153 h->max_log2_ring_size = ETH_MEMIF_MAX_LOG2_RING_SIZE;
154
155 strlcpy((char *)h->name, rte_version(), sizeof(h->name));
156
157 return 0;
158}
159
160static int
161memif_msg_receive_hello(struct rte_eth_dev *dev, memif_msg_t *msg)

Callers 1

memif_listener_handlerFunction · 0.85

Calls 3

memif_msg_enqFunction · 0.85
rte_versionFunction · 0.85
strlcpyFunction · 0.50

Tested by

no test coverage detected