| 229 | } |
| 230 | |
| 231 | static struct thread_msg_rsp * |
| 232 | thread_msg_send_recv(uint32_t thread_id, |
| 233 | struct thread_msg_req *req) |
| 234 | { |
| 235 | struct thread *t = &thread[thread_id]; |
| 236 | struct rte_ring *msgq_req = t->msgq_req; |
| 237 | struct rte_ring *msgq_rsp = t->msgq_rsp; |
| 238 | struct thread_msg_rsp *rsp; |
| 239 | int status; |
| 240 | |
| 241 | /* send */ |
| 242 | do { |
| 243 | status = rte_ring_sp_enqueue(msgq_req, req); |
| 244 | } while (status == -ENOBUFS); |
| 245 | |
| 246 | /* recv */ |
| 247 | do { |
| 248 | status = rte_ring_sc_dequeue(msgq_rsp, (void **) &rsp); |
| 249 | } while (status != 0); |
| 250 | |
| 251 | return rsp; |
| 252 | } |
| 253 | |
| 254 | int |
| 255 | thread_pipeline_enable(uint32_t thread_id, |
no test coverage detected