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

Function l2fwd_crypto_send_burst

dpdk/examples/l2fwd-crypto/main.c:342–365  ·  view source on GitHub ↗

l2fwd_crypto_send_burst 8< */

Source from the content-addressed store, hash-verified

340
341/* l2fwd_crypto_send_burst 8< */
342static int
343l2fwd_crypto_send_burst(struct lcore_queue_conf *qconf, unsigned n,
344 struct l2fwd_crypto_params *cparams)
345{
346 struct rte_crypto_op **op_buffer;
347 unsigned ret;
348
349 op_buffer = (struct rte_crypto_op **)
350 qconf->op_buf[cparams->dev_id].buffer;
351
352 ret = rte_cryptodev_enqueue_burst(cparams->dev_id,
353 cparams->qp_id, op_buffer, (uint16_t) n);
354
355 crypto_statistics[cparams->dev_id].enqueued += ret;
356 if (unlikely(ret < n)) {
357 crypto_statistics[cparams->dev_id].errors += (n - ret);
358 do {
359 rte_pktmbuf_free(op_buffer[ret]->sym->m_src);
360 rte_crypto_op_free(op_buffer[ret]);
361 } while (++ret < n);
362 }
363
364 return 0;
365}
366/* >8 End of l2fwd_crypto_send_burst. */
367
368/* Crypto enqueue. 8< */

Callers 2

l2fwd_crypto_enqueueFunction · 0.85
l2fwd_main_loopFunction · 0.85

Calls 3

rte_pktmbuf_freeFunction · 0.85
rte_crypto_op_freeFunction · 0.85

Tested by

no test coverage detected