| 1233 | } |
| 1234 | |
| 1235 | static int |
| 1236 | mixed_cipher_hash_testsuite_setup(void) |
| 1237 | { |
| 1238 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 1239 | uint8_t dev_id = ts_params->valid_devs[0]; |
| 1240 | struct rte_cryptodev_info dev_info; |
| 1241 | uint64_t feat_flags; |
| 1242 | const enum rte_crypto_cipher_algorithm ciphers[] = { |
| 1243 | RTE_CRYPTO_CIPHER_NULL, |
| 1244 | RTE_CRYPTO_CIPHER_AES_CTR, |
| 1245 | RTE_CRYPTO_CIPHER_ZUC_EEA3, |
| 1246 | RTE_CRYPTO_CIPHER_SNOW3G_UEA2 |
| 1247 | }; |
| 1248 | const enum rte_crypto_auth_algorithm auths[] = { |
| 1249 | RTE_CRYPTO_AUTH_NULL, |
| 1250 | RTE_CRYPTO_AUTH_SNOW3G_UIA2, |
| 1251 | RTE_CRYPTO_AUTH_AES_CMAC, |
| 1252 | RTE_CRYPTO_AUTH_ZUC_EIA3 |
| 1253 | }; |
| 1254 | |
| 1255 | rte_cryptodev_info_get(dev_id, &dev_info); |
| 1256 | feat_flags = dev_info.feature_flags; |
| 1257 | |
| 1258 | if (!(feat_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || |
| 1259 | (global_api_test_type == CRYPTODEV_RAW_API_TEST)) { |
| 1260 | RTE_LOG(INFO, USER1, "Feature flag requirements for Mixed " |
| 1261 | "Cipher Hash testsuite not met\n"); |
| 1262 | return TEST_SKIPPED; |
| 1263 | } |
| 1264 | |
| 1265 | if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0 |
| 1266 | && check_auth_capabilities_supported(auths, |
| 1267 | RTE_DIM(auths)) != 0) { |
| 1268 | RTE_LOG(INFO, USER1, "Capability requirements for Mixed " |
| 1269 | "Cipher Hash testsuite not met\n"); |
| 1270 | return TEST_SKIPPED; |
| 1271 | } |
| 1272 | |
| 1273 | return 0; |
| 1274 | } |
| 1275 | |
| 1276 | static int |
| 1277 | esn_testsuite_setup(void) |
nothing calls this directly
no test coverage detected