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

Function thread_msg_handle_pipeline_disable

dpdk/examples/ip_pipeline/thread.c:490–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490static struct thread_msg_rsp *
491thread_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
527static void
528thread_msg_handle(struct thread_data *t)

Callers 1

thread_msg_handleFunction · 0.70

Calls 1

memcpyFunction · 0.50

Tested by

no test coverage detected