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

Function aes_chain_setup

dpdk/app/test/test_cryptodev_blockcipher.c:845–886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

843}
844
845static int
846aes_chain_setup(void)
847{
848 uint8_t dev_id = p_testsuite_params->valid_devs[0];
849 struct rte_cryptodev_info dev_info;
850 uint64_t feat_flags;
851 const enum rte_crypto_cipher_algorithm ciphers[] = {
852 RTE_CRYPTO_CIPHER_NULL,
853 RTE_CRYPTO_CIPHER_AES_CTR,
854 RTE_CRYPTO_CIPHER_AES_CBC
855 };
856 const enum rte_crypto_auth_algorithm auths[] = {
857 RTE_CRYPTO_AUTH_NULL,
858 RTE_CRYPTO_AUTH_SHA1_HMAC,
859 RTE_CRYPTO_AUTH_AES_XCBC_MAC,
860 RTE_CRYPTO_AUTH_SHA256_HMAC,
861 RTE_CRYPTO_AUTH_SHA512_HMAC,
862 RTE_CRYPTO_AUTH_SHA224_HMAC,
863 RTE_CRYPTO_AUTH_SHA384_HMAC
864 };
865
866 rte_cryptodev_info_get(dev_id, &dev_info);
867 feat_flags = dev_info.feature_flags;
868
869 if (!(feat_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) ||
870 ((global_api_test_type == CRYPTODEV_RAW_API_TEST) &&
871 !(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) {
872 RTE_LOG(INFO, USER1, "Feature flag requirements for AES Chain "
873 "testsuite not met\n");
874 return TEST_SKIPPED;
875 }
876
877 if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0
878 && check_auth_capabilities_supported(auths,
879 RTE_DIM(auths)) != 0) {
880 RTE_LOG(INFO, USER1, "Capability requirements for AES Chain "
881 "testsuite not met\n");
882 return TEST_SKIPPED;
883 }
884
885 return 0;
886}
887
888static int
889aes_cipheronly_setup(void)

Callers

nothing calls this directly

Tested by

no test coverage detected