Crypto enqueue. 8< */
| 367 | |
| 368 | /* Crypto enqueue. 8< */ |
| 369 | static int |
| 370 | l2fwd_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 | |
| 394 | static int |
no test coverage detected