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

Function process_op

dpdk/drivers/crypto/null/null_crypto_pmd.c:50–70  ·  view source on GitHub ↗

Process crypto operation for mbuf */

Source from the content-addressed store, hash-verified

48
49/** Process crypto operation for mbuf */
50static int
51process_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
72static struct null_crypto_session *
73get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)

Callers 1

Calls 3

memsetFunction · 0.85
rte_mempool_putFunction · 0.85
rte_ring_enqueueFunction · 0.85

Tested by

no test coverage detected