| 560 | } |
| 561 | |
| 562 | static struct rte_crypto_op * |
| 563 | crypto_request_process(uint8_t dev_id, struct rte_crypto_op *op) |
| 564 | { |
| 565 | struct rte_crypto_op *res = NULL; |
| 566 | |
| 567 | if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) { |
| 568 | RTE_LOG(ERR, USER1, "Error sending packet for encryption\n"); |
| 569 | return NULL; |
| 570 | } |
| 571 | |
| 572 | while (rte_cryptodev_dequeue_burst(dev_id, 0, &res, 1) == 0) |
| 573 | rte_pause(); |
| 574 | |
| 575 | if (res->status != RTE_CRYPTO_OP_STATUS_SUCCESS) { |
| 576 | RTE_LOG(ERR, USER1, "Operation status %d\n", res->status); |
| 577 | return NULL; |
| 578 | } |
| 579 | |
| 580 | if (res != op) { |
| 581 | RTE_LOG(ERR, USER1, "Unexpected operation received!\n"); |
| 582 | rte_crypto_op_free(res); |
| 583 | return NULL; |
| 584 | } |
| 585 | |
| 586 | return res; |
| 587 | } |
| 588 | |
| 589 | static struct rte_cryptodev_sym_session* |
| 590 | session_create(const struct crosscheck_test_profile *profile, uint8_t dev_id, |
no test coverage detected