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

Function ccp_pmd_dequeue_burst

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

Source from the content-addressed store, hash-verified

131}
132
133static uint16_t
134ccp_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
135 uint16_t nb_ops)
136{
137 struct ccp_qp *qp = queue_pair;
138 uint16_t nb_dequeued = 0, i, total_nb_ops;
139
140 nb_dequeued = process_ops_to_dequeue(qp, ops, nb_ops, &total_nb_ops);
141
142 if (total_nb_ops) {
143 while (nb_dequeued != total_nb_ops) {
144 nb_dequeued = process_ops_to_dequeue(qp,
145 ops, nb_ops, &total_nb_ops);
146 }
147 }
148
149 /* Free session if a session-less crypto op */
150 for (i = 0; i < nb_dequeued; i++)
151 if (unlikely(ops[i]->sess_type ==
152 RTE_CRYPTO_OP_SESSIONLESS)) {
153 struct ccp_session *sess =
154 CRYPTODEV_GET_SYM_SESS_PRIV(ops[i]->sym->session);
155
156 memset(sess, 0, sizeof(*sess));
157 rte_mempool_put(qp->sess_mp,
158 ops[i]->sym->session);
159 ops[i]->sym->session = NULL;
160 }
161 qp->qp_stats.dequeued_count += nb_dequeued;
162
163 return nb_dequeued;
164}
165
166/*
167 * The set of PCI devices this driver supports

Callers

nothing calls this directly

Calls 3

process_ops_to_dequeueFunction · 0.85
memsetFunction · 0.85
rte_mempool_putFunction · 0.85

Tested by

no test coverage detected