Process crypto operation for mbuf */
| 48 | |
| 49 | /** Process crypto operation for mbuf */ |
| 50 | static int |
| 51 | process_op(const struct null_crypto_qp *qp, struct rte_crypto_op *op, |
| 52 | struct null_crypto_session *sess __rte_unused) |
| 53 | { |
| 54 | /* set status as successful by default */ |
| 55 | op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; |
| 56 | |
| 57 | /* Free session if a session-less crypto op. */ |
| 58 | if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) { |
| 59 | memset(op->sym->session, 0, |
| 60 | sizeof(struct null_crypto_session)); |
| 61 | rte_mempool_put(qp->sess_mp, (void *)op->sym->session); |
| 62 | op->sym->session = NULL; |
| 63 | } |
| 64 | |
| 65 | /* |
| 66 | * if crypto session and operation are valid just enqueue the packet |
| 67 | * in the processed ring |
| 68 | */ |
| 69 | return rte_ring_enqueue(qp->processed_pkts, (void *)op); |
| 70 | } |
| 71 | |
| 72 | static struct null_crypto_session * |
| 73 | get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op) |
no test coverage detected