| 489 | } |
| 490 | |
| 491 | static void |
| 492 | thread_msg_handle(struct softnic_thread_data *t) |
| 493 | { |
| 494 | for ( ; ; ) { |
| 495 | struct thread_msg_req *req; |
| 496 | struct thread_msg_rsp *rsp; |
| 497 | |
| 498 | req = thread_msg_recv(t->msgq_req); |
| 499 | if (req == NULL) |
| 500 | break; |
| 501 | |
| 502 | switch (req->type) { |
| 503 | case THREAD_REQ_PIPELINE_ENABLE: |
| 504 | rsp = thread_msg_handle_pipeline_enable(t, req); |
| 505 | break; |
| 506 | |
| 507 | case THREAD_REQ_PIPELINE_DISABLE: |
| 508 | rsp = thread_msg_handle_pipeline_disable(t, req); |
| 509 | break; |
| 510 | |
| 511 | default: |
| 512 | rsp = (struct thread_msg_rsp *)req; |
| 513 | rsp->status = -1; |
| 514 | } |
| 515 | |
| 516 | thread_msg_send(t->msgq_rsp, rsp); |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | /** |
| 521 | * Data plane threads: main |
no test coverage detected