| 81 | |
| 82 | |
| 83 | static uint16_t |
| 84 | schedule_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 | |
| 109 | static uint16_t |
| 110 | schedule_dequeue_ordering(void *qp, struct rte_crypto_op **ops, |
nothing calls this directly
no test coverage detected