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

Function thread_msg_handle

dpdk/examples/ip_pipeline/thread.c:527–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525}
526
527static void
528thread_msg_handle(struct thread_data *t)
529{
530 for ( ; ; ) {
531 struct thread_msg_req *req;
532 struct thread_msg_rsp *rsp;
533
534 req = thread_msg_recv(t->msgq_req);
535 if (req == NULL)
536 break;
537
538 switch (req->type) {
539 case THREAD_REQ_PIPELINE_ENABLE:
540 rsp = thread_msg_handle_pipeline_enable(t, req);
541 break;
542
543 case THREAD_REQ_PIPELINE_DISABLE:
544 rsp = thread_msg_handle_pipeline_disable(t, req);
545 break;
546
547 default:
548 rsp = (struct thread_msg_rsp *) req;
549 rsp->status = -1;
550 }
551
552 thread_msg_send(t->msgq_rsp, rsp);
553 }
554}
555
556/**
557 * Main thread & data plane threads: message passing

Callers 1

thread_mainFunction · 0.70

Calls 4

thread_msg_recvFunction · 0.70
thread_msg_sendFunction · 0.70

Tested by

no test coverage detected