| 532 | } |
| 533 | |
| 534 | static struct rte_crypto_op * |
| 535 | process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op) |
| 536 | { |
| 537 | |
| 538 | RTE_VERIFY(gbl_action_type != RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO); |
| 539 | |
| 540 | if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) { |
| 541 | RTE_LOG(ERR, USER1, "Error sending packet for encryption\n"); |
| 542 | return NULL; |
| 543 | } |
| 544 | |
| 545 | op = NULL; |
| 546 | |
| 547 | while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) == 0) |
| 548 | rte_pause(); |
| 549 | |
| 550 | if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) { |
| 551 | RTE_LOG(DEBUG, USER1, "Operation status %d\n", op->status); |
| 552 | return NULL; |
| 553 | } |
| 554 | |
| 555 | return op; |
| 556 | } |
| 557 | |
| 558 | static int |
| 559 | testsuite_setup(void) |
no test coverage detected