| 623 | } |
| 624 | |
| 625 | static int |
| 626 | nitrox_enq_single_op(struct nitrox_qp *qp, struct rte_crypto_op *op) |
| 627 | { |
| 628 | struct nitrox_crypto_ctx *ctx; |
| 629 | struct nitrox_softreq *sr; |
| 630 | int err; |
| 631 | |
| 632 | op->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED; |
| 633 | ctx = get_crypto_ctx(op); |
| 634 | if (unlikely(!ctx)) { |
| 635 | op->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION; |
| 636 | return -EINVAL; |
| 637 | } |
| 638 | |
| 639 | if (unlikely(rte_mempool_get(qp->sr_mp, (void **)&sr))) |
| 640 | return -ENOMEM; |
| 641 | |
| 642 | err = nitrox_process_se_req(qp->qno, op, ctx, sr); |
| 643 | if (unlikely(err)) { |
| 644 | rte_mempool_put(qp->sr_mp, sr); |
| 645 | op->status = RTE_CRYPTO_OP_STATUS_ERROR; |
| 646 | return err; |
| 647 | } |
| 648 | |
| 649 | nitrox_qp_enqueue(qp, nitrox_sym_instr_addr(sr), sr); |
| 650 | return 0; |
| 651 | } |
| 652 | |
| 653 | static uint16_t |
| 654 | nitrox_sym_dev_enq_burst(void *queue_pair, struct rte_crypto_op **ops, |
no test coverage detected