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

Function schedule_enqueue

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

Source from the content-addressed store, hash-verified

36};
37
38static uint16_t
39schedule_enqueue(void *qp, struct rte_crypto_op **ops, uint16_t nb_ops)
40{
41 struct mc_scheduler_qp_ctx *mc_qp_ctx =
42 ((struct scheduler_qp_ctx *)qp)->private_qp_ctx;
43 struct mc_scheduler_ctx *mc_ctx = mc_qp_ctx->mc_private_ctx;
44 uint32_t worker_idx = mc_qp_ctx->last_enq_worker_idx;
45 uint16_t i, processed_ops = 0;
46
47 if (unlikely(nb_ops == 0))
48 return 0;
49
50 for (i = 0; i < mc_ctx->num_workers && nb_ops != 0; i++) {
51 struct rte_ring *enq_ring = mc_ctx->sched_enq_ring[worker_idx];
52 uint16_t nb_queue_ops = rte_ring_enqueue_burst(enq_ring,
53 (void *)(&ops[processed_ops]), nb_ops, NULL);
54
55 nb_ops -= nb_queue_ops;
56 processed_ops += nb_queue_ops;
57
58 if (++worker_idx == mc_ctx->num_workers)
59 worker_idx = 0;
60 }
61 mc_qp_ctx->last_enq_worker_idx = worker_idx;
62
63 return processed_ops;
64}
65
66static uint16_t
67schedule_enqueue_ordering(void *qp, struct rte_crypto_op **ops,

Callers 1

Calls 1

rte_ring_enqueue_burstFunction · 0.85

Tested by

no test coverage detected