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

Function schedule_dequeue

dpdk/drivers/crypto/scheduler/scheduler_multicore.c:83–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83static uint16_t
84schedule_dequeue(void *qp, struct rte_crypto_op **ops, uint16_t nb_ops)
85{
86 struct mc_scheduler_qp_ctx *mc_qp_ctx =
87 ((struct scheduler_qp_ctx *)qp)->private_qp_ctx;
88 struct mc_scheduler_ctx *mc_ctx = mc_qp_ctx->mc_private_ctx;
89 uint32_t worker_idx = mc_qp_ctx->last_deq_worker_idx;
90 uint16_t i, processed_ops = 0;
91
92 for (i = 0; i < mc_ctx->num_workers && nb_ops != 0; i++) {
93 struct rte_ring *deq_ring = mc_ctx->sched_deq_ring[worker_idx];
94 uint16_t nb_deq_ops = rte_ring_dequeue_burst(deq_ring,
95 (void *)(&ops[processed_ops]), nb_ops, NULL);
96
97 nb_ops -= nb_deq_ops;
98 processed_ops += nb_deq_ops;
99 if (++worker_idx == mc_ctx->num_workers)
100 worker_idx = 0;
101 }
102
103 mc_qp_ctx->last_deq_worker_idx = worker_idx;
104
105 return processed_ops;
106
107}
108
109static uint16_t
110schedule_dequeue_ordering(void *qp, struct rte_crypto_op **ops,

Callers

nothing calls this directly

Calls 1

rte_ring_dequeue_burstFunction · 0.85

Tested by

no test coverage detected