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

Function crypto_caps_cipher_verify

dpdk/app/test/test_pdcp.c:461–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461static int
462crypto_caps_cipher_verify(uint8_t dev_id, const struct rte_crypto_sym_xform *c_xfrm)
463{
464 const struct rte_cryptodev_symmetric_capability *cap;
465 struct rte_cryptodev_sym_capability_idx cap_idx;
466 int ret;
467
468 cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
469 cap_idx.algo.cipher = c_xfrm->cipher.algo;
470
471 cap = rte_cryptodev_sym_capability_get(dev_id, &cap_idx);
472 if (cap == NULL)
473 return -1;
474
475 ret = rte_cryptodev_sym_capability_check_cipher(cap, c_xfrm->cipher.key.length,
476 c_xfrm->cipher.iv.length);
477
478 return ret;
479}
480
481static int
482crypto_caps_auth_verify(uint8_t dev_id, const struct rte_crypto_sym_xform *a_xfrm)

Callers 1

cryptodev_id_getFunction · 0.85

Tested by

no test coverage detected