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

Function l2fwd_crypto_enqueue

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

Crypto enqueue. 8< */

Source from the content-addressed store, hash-verified

367
368/* Crypto enqueue. 8< */
369static int
370l2fwd_crypto_enqueue(struct rte_crypto_op *op,
371 struct l2fwd_crypto_params *cparams)
372{
373 unsigned lcore_id, len;
374 struct lcore_queue_conf *qconf;
375
376 lcore_id = rte_lcore_id();
377
378 qconf = &lcore_queue_conf[lcore_id];
379 len = qconf->op_buf[cparams->dev_id].len;
380 qconf->op_buf[cparams->dev_id].buffer[len] = op;
381 len++;
382
383 /* enough ops to be sent */
384 if (len == MAX_PKT_BURST) {
385 l2fwd_crypto_send_burst(qconf, MAX_PKT_BURST, cparams);
386 len = 0;
387 }
388
389 qconf->op_buf[cparams->dev_id].len = len;
390 return 0;
391}
392/* >8 End of crypto enqueue. */
393
394static int

Callers 1

Calls 2

rte_lcore_idFunction · 0.85
l2fwd_crypto_send_burstFunction · 0.85

Tested by

no test coverage detected