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

Function process_crypto_request

dpdk/app/test/test_cryptodev.c:534–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532}
533
534static struct rte_crypto_op *
535process_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
558static int
559testsuite_setup(void)

Calls 3

rte_pauseFunction · 0.50

Tested by

no test coverage detected