| 83 | } |
| 84 | |
| 85 | static struct memif_msg_queue_elt * |
| 86 | memif_msg_enq(struct memif_control_channel *cc) |
| 87 | { |
| 88 | struct memif_msg_queue_elt *e; |
| 89 | |
| 90 | e = rte_zmalloc("memif_msg", sizeof(struct memif_msg_queue_elt), 0); |
| 91 | if (e == NULL) { |
| 92 | MIF_LOG(ERR, "Failed to allocate control message."); |
| 93 | return NULL; |
| 94 | } |
| 95 | |
| 96 | e->fd = -1; |
| 97 | TAILQ_INSERT_TAIL(&cc->msg_queue, e, next); |
| 98 | |
| 99 | return e; |
| 100 | } |
| 101 | |
| 102 | void |
| 103 | memif_msg_enq_disconnect(struct memif_control_channel *cc, const char *reason, |
no test coverage detected