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

Function thread_msg_send_recv

dpdk/examples/ip_pipeline/thread.c:231–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231static struct thread_msg_rsp *
232thread_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
254int
255thread_pipeline_enable(uint32_t thread_id,

Callers 2

thread_pipeline_enableFunction · 0.70
thread_pipeline_disableFunction · 0.70

Calls 2

rte_ring_sp_enqueueFunction · 0.85
rte_ring_sc_dequeueFunction · 0.85

Tested by

no test coverage detected