| 6063 | } |
| 6064 | |
| 6065 | static int |
| 6066 | check_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 | |
| 6092 | static int |
| 6093 | check_auth_capability(const struct crypto_testsuite_params *ts_params, |
no test coverage detected