Hi Radu,
Please see my comments inline.
Regards,
Nithin Sen
> +static int
> +nxan_testsuite_setup(void)
> +{
> + struct crypto_testsuite_params *ts_params = &testsuite_params;
> + uint8_t dev_id = ts_params->valid_devs[0];
> + struct rte_cryptodev_info dev_info;
> + const enum rte_crypto_cipher_algorithm ciphers[] = {
> + RTE_CRYPTO_CIPHER_SNOW5G_NEA4,
> + RTE_CRYPTO_CIPHER_AES_NEA5,
> + RTE_CRYPTO_CIPHER_ZUC_NEA6
> + };
> + const enum rte_crypto_auth_algorithm auths[] = {
> + RTE_CRYPTO_AUTH_SNOW5G_NIA4,
> + RTE_CRYPTO_AUTH_AES_NIA5,
> + RTE_CRYPTO_AUTH_ZUC_NIA6
> + };
> + const enum rte_crypto_aead_algorithm aeads[] = {
> + RTE_CRYPTO_AEAD_SNOW5G_NCA4,
> + RTE_CRYPTO_AEAD_AES_NCA5,
> + RTE_CRYPTO_AEAD_ZUC_NCA6
> + };
> +
> + rte_cryptodev_info_get(dev_id, &dev_info);
> +
> + if (!(dev_info.feature_flags &
> RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) ||
> + ((global_api_test_type ==
> CRYPTODEV_RAW_API_TEST) &&
> + !(dev_info.feature_flags &
> RTE_CRYPTODEV_FF_SYM_RAW_DP))) {
> + RTE_LOG(INFO, USER1, "Feature flag requirements for
> NxA4/5/6 "
> + "testsuite not met\n");
> + return TEST_SKIPPED;
> + }
> +
> + if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) !=
> 0 ||
> + check_auth_capabilities_supported(auths,
> RTE_DIM(auths)) != 0 ||
> + check_aead_capabilities_supported(aeads,
> RTE_DIM(aeads)) != 0) {
> + RTE_LOG(INFO, USER1, "Capability requirements for
> NxA4/5/6 "
> + "testsuite not met\n");
[Nithinsen] We currently support cipher and auth. And hence aead check would
fail. Similarly if anyone supports only cipher, they wouldn’t be able to run
NEA cases. So could you separate out this check ?
> + return TEST_SKIPPED;
> + }
> +
> + return 0;
> +}
> +