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

Function cryptodev_id_get

dpdk/app/test/test_pdcp.c:502–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500}
501
502static int
503cryptodev_id_get(bool is_integrity_protected, const struct rte_crypto_sym_xform *c_xfrm,
504 const struct rte_crypto_sym_xform *a_xfrm)
505{
506 int i, nb_devs;
507
508 nb_devs = rte_cryptodev_count();
509
510 /* Check capabilities */
511
512 for (i = 0; i < nb_devs; i++) {
513 if ((crypto_caps_cipher_verify(i, c_xfrm) == 0) &&
514 (!is_integrity_protected || crypto_caps_auth_verify(i, a_xfrm) == 0))
515 break;
516 }
517
518 if (i == nb_devs)
519 return -1;
520
521 return i;
522}
523
524static int
525pdcp_known_vec_verify(struct rte_mbuf *m, const uint8_t *expected, uint32_t expected_pkt_len)

Callers 2

Calls 3

rte_cryptodev_countFunction · 0.85
crypto_caps_auth_verifyFunction · 0.85

Tested by

no test coverage detected