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

Function aes_cipheronly_setup

dpdk/app/test/test_cryptodev_blockcipher.c:888–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

886}
887
888static int
889aes_cipheronly_setup(void)
890{
891 uint8_t dev_id = p_testsuite_params->valid_devs[0];
892 struct rte_cryptodev_info dev_info;
893 uint64_t feat_flags;
894 const enum rte_crypto_cipher_algorithm ciphers[] = {
895 RTE_CRYPTO_CIPHER_NULL,
896 RTE_CRYPTO_CIPHER_AES_CTR,
897 RTE_CRYPTO_CIPHER_AES_CBC,
898 RTE_CRYPTO_CIPHER_AES_ECB,
899 RTE_CRYPTO_CIPHER_AES_XTS
900 };
901 const enum rte_crypto_auth_algorithm auths[] = {
902 RTE_CRYPTO_AUTH_NULL,
903 RTE_CRYPTO_AUTH_SHA1_HMAC,
904 RTE_CRYPTO_AUTH_AES_XCBC_MAC
905 };
906
907 rte_cryptodev_info_get(dev_id, &dev_info);
908 feat_flags = dev_info.feature_flags;
909
910 if (!(feat_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) ||
911 ((global_api_test_type == CRYPTODEV_RAW_API_TEST) &&
912 !(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) {
913 RTE_LOG(INFO, USER1, "Feature flag requirements for AES Cipheronly "
914 "testsuite not met\n");
915 return TEST_SKIPPED;
916 }
917
918 if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0
919 && check_auth_capabilities_supported(auths,
920 RTE_DIM(auths)) != 0) {
921 RTE_LOG(INFO, USER1, "Capability requirements for AES Cipheronly "
922 "testsuite not met\n");
923 return TEST_SKIPPED;
924 }
925
926 return 0;
927}
928
929static int
930aes_docsis_setup(void)

Callers

nothing calls this directly

Tested by

no test coverage detected