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

Function get_ccp_session

dpdk/drivers/crypto/ccp/rte_ccp_pmd.c:49–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47};
48
49static struct ccp_session *
50get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
51{
52 struct ccp_session *sess = NULL;
53
54 if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
55 if (unlikely(op->sym->session == NULL))
56 return NULL;
57
58 sess = CRYPTODEV_GET_SYM_SESS_PRIV(op->sym->session);
59 } else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
60 struct rte_cryptodev_sym_session *_sess;
61 struct ccp_private *internals;
62
63 if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
64 return NULL;
65
66 sess = (void *)_sess->driver_priv_data;
67
68 internals = (struct ccp_private *)qp->dev->data->dev_private;
69 if (unlikely(ccp_set_session_parameters(sess, op->sym->xform,
70 internals) != 0)) {
71 rte_mempool_put(qp->sess_mp, _sess);
72 sess = NULL;
73 }
74 op->sym->session = _sess;
75 }
76
77 return sess;
78}
79
80static uint16_t
81ccp_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,

Callers 1

ccp_pmd_enqueue_burstFunction · 0.85

Calls 3

rte_mempool_getFunction · 0.85
rte_mempool_putFunction · 0.85

Tested by

no test coverage detected