| 88 | } |
| 89 | |
| 90 | struct ff_msg * |
| 91 | ff_ipc_msg_alloc(void) |
| 92 | { |
| 93 | if (inited == 0) { |
| 94 | int ret = ff_ipc_init(); |
| 95 | if (ret < 0) { |
| 96 | return NULL; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | void *msg; |
| 101 | if (rte_mempool_get(message_pool, &msg) < 0) { |
| 102 | printf("get buffer from message pool failed.\n"); |
| 103 | return NULL; |
| 104 | } |
| 105 | |
| 106 | return (struct ff_msg *)msg; |
| 107 | } |
| 108 | |
| 109 | int |
| 110 | ff_ipc_msg_free(struct ff_msg *msg) |
no test coverage detected