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

Function thread_msg_handle_pipeline_enable

dpdk/examples/ip_pipeline/thread.c:454–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454static struct thread_msg_rsp *
455thread_msg_handle_pipeline_enable(struct thread_data *t,
456 struct thread_msg_req *req)
457{
458 struct thread_msg_rsp *rsp = (struct thread_msg_rsp *) req;
459 struct pipeline_data *p = &t->pipeline_data[t->n_pipelines];
460 uint32_t i;
461
462 /* Request */
463 if (t->n_pipelines >= THREAD_PIPELINES_MAX) {
464 rsp->status = -1;
465 return rsp;
466 }
467
468 t->p[t->n_pipelines] = req->pipeline_enable.p;
469
470 p->p = req->pipeline_enable.p;
471 for (i = 0; i < req->pipeline_enable.n_tables; i++)
472 p->table_data[i].a =
473 req->pipeline_enable.table[i].a;
474
475 p->n_tables = req->pipeline_enable.n_tables;
476
477 p->msgq_req = req->pipeline_enable.msgq_req;
478 p->msgq_rsp = req->pipeline_enable.msgq_rsp;
479 p->timer_period =
480 (rte_get_tsc_hz() * req->pipeline_enable.timer_period_ms) / 1000;
481 p->time_next = rte_get_tsc_cycles() + p->timer_period;
482
483 t->n_pipelines++;
484
485 /* Response */
486 rsp->status = 0;
487 return rsp;
488}
489
490static struct thread_msg_rsp *
491thread_msg_handle_pipeline_disable(struct thread_data *t,

Callers 1

thread_msg_handleFunction · 0.70

Calls 2

rte_get_tsc_hzFunction · 0.85
rte_get_tsc_cyclesFunction · 0.50

Tested by

no test coverage detected