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

Function check_cipher_capability

dpdk/app/test/test_cryptodev.c:6065–6090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6063}
6064
6065static int
6066check_cipher_capability(const struct crypto_testsuite_params *ts_params,
6067 const enum rte_crypto_cipher_algorithm cipher_algo,
6068 const uint16_t key_size, const uint16_t iv_size)
6069{
6070 struct rte_cryptodev_sym_capability_idx cap_idx;
6071 const struct rte_cryptodev_symmetric_capability *cap;
6072
6073 /* Check if device supports the algorithm */
6074 cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
6075 cap_idx.algo.cipher = cipher_algo;
6076
6077 cap = rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
6078 &cap_idx);
6079
6080 if (cap == NULL)
6081 return -1;
6082
6083 /* Check if device supports key size and IV size */
6084 if (rte_cryptodev_sym_capability_check_cipher(cap, key_size,
6085 iv_size) < 0) {
6086 return -1;
6087 }
6088
6089 return 0;
6090}
6091
6092static int
6093check_auth_capability(const struct crypto_testsuite_params *ts_params,

Callers 5

test_zuc_cipher_authFunction · 0.85
test_zuc_cipherFunction · 0.85
test_zuc_cipher_sglFunction · 0.85
test_zuc_auth_cipherFunction · 0.85
test_zuc_auth_cipher_sglFunction · 0.85

Tested by

no test coverage detected