| 488 | } |
| 489 | |
| 490 | static struct thread_msg_rsp * |
| 491 | thread_msg_handle_pipeline_disable(struct thread_data *t, |
| 492 | struct thread_msg_req *req) |
| 493 | { |
| 494 | struct thread_msg_rsp *rsp = (struct thread_msg_rsp *) req; |
| 495 | uint32_t n_pipelines = t->n_pipelines; |
| 496 | struct rte_pipeline *pipeline = req->pipeline_disable.p; |
| 497 | uint32_t i; |
| 498 | |
| 499 | /* find pipeline */ |
| 500 | for (i = 0; i < n_pipelines; i++) { |
| 501 | struct pipeline_data *p = &t->pipeline_data[i]; |
| 502 | |
| 503 | if (p->p != pipeline) |
| 504 | continue; |
| 505 | |
| 506 | if (i < n_pipelines - 1) { |
| 507 | struct rte_pipeline *pipeline_last = |
| 508 | t->p[n_pipelines - 1]; |
| 509 | struct pipeline_data *p_last = |
| 510 | &t->pipeline_data[n_pipelines - 1]; |
| 511 | |
| 512 | t->p[i] = pipeline_last; |
| 513 | memcpy(p, p_last, sizeof(*p)); |
| 514 | } |
| 515 | |
| 516 | t->n_pipelines--; |
| 517 | |
| 518 | rsp->status = 0; |
| 519 | return rsp; |
| 520 | } |
| 521 | |
| 522 | /* should not get here */ |
| 523 | rsp->status = 0; |
| 524 | return rsp; |
| 525 | } |
| 526 | |
| 527 | static void |
| 528 | thread_msg_handle(struct thread_data *t) |
no test coverage detected