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

Function zuc_testsuite_setup

dpdk/app/test/test_cryptodev.c:1082–1112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1080}
1081
1082static int
1083zuc_testsuite_setup(void)
1084{
1085 struct crypto_testsuite_params *ts_params = &testsuite_params;
1086 uint8_t dev_id = ts_params->valid_devs[0];
1087 struct rte_cryptodev_info dev_info;
1088 const enum rte_crypto_cipher_algorithm ciphers[] = {
1089 RTE_CRYPTO_CIPHER_ZUC_EEA3
1090 };
1091 const enum rte_crypto_auth_algorithm auths[] = {
1092 RTE_CRYPTO_AUTH_ZUC_EIA3
1093 };
1094
1095 rte_cryptodev_info_get(dev_id, &dev_info);
1096
1097 if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO)) {
1098 RTE_LOG(INFO, USER1, "Feature flag requirements for ZUC "
1099 "testsuite not met\n");
1100 return TEST_SKIPPED;
1101 }
1102
1103 if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0
1104 && check_auth_capabilities_supported(auths,
1105 RTE_DIM(auths)) != 0) {
1106 RTE_LOG(INFO, USER1, "Capability requirements for ZUC "
1107 "testsuite not met\n");
1108 return TEST_SKIPPED;
1109 }
1110
1111 return 0;
1112}
1113
1114static int
1115hmac_md5_auth_testsuite_setup(void)

Callers

nothing calls this directly

Tested by

no test coverage detected