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

Function snow3g_testsuite_setup

dpdk/app/test/test_cryptodev.c:1049–1080  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1047}
1048
1049static int
1050snow3g_testsuite_setup(void)
1051{
1052 struct crypto_testsuite_params *ts_params = &testsuite_params;
1053 uint8_t dev_id = ts_params->valid_devs[0];
1054 struct rte_cryptodev_info dev_info;
1055 const enum rte_crypto_cipher_algorithm ciphers[] = {
1056 RTE_CRYPTO_CIPHER_SNOW3G_UEA2
1057
1058 };
1059 const enum rte_crypto_auth_algorithm auths[] = {
1060 RTE_CRYPTO_AUTH_SNOW3G_UIA2
1061 };
1062
1063 rte_cryptodev_info_get(dev_id, &dev_info);
1064
1065 if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO)) {
1066 RTE_LOG(INFO, USER1, "Feature flag requirements for Snow3G "
1067 "testsuite not met\n");
1068 return TEST_SKIPPED;
1069 }
1070
1071 if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0
1072 && check_auth_capabilities_supported(auths,
1073 RTE_DIM(auths)) != 0) {
1074 RTE_LOG(INFO, USER1, "Capability requirements for Snow3G "
1075 "testsuite not met\n");
1076 return TEST_SKIPPED;
1077 }
1078
1079 return 0;
1080}
1081
1082static int
1083zuc_testsuite_setup(void)

Callers

nothing calls this directly

Tested by

no test coverage detected