| 134 | } |
| 135 | |
| 136 | static int |
| 137 | memif_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 | |
| 160 | static int |
| 161 | memif_msg_receive_hello(struct rte_eth_dev *dev, memif_msg_t *msg) |
no test coverage detected