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

Function negative_hmac_sha1_testsuite_setup

dpdk/app/test/test_cryptodev.c:1342–1374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1340}
1341
1342static int
1343negative_hmac_sha1_testsuite_setup(void)
1344{
1345 struct crypto_testsuite_params *ts_params = &testsuite_params;
1346 uint8_t dev_id = ts_params->valid_devs[0];
1347 struct rte_cryptodev_info dev_info;
1348 const enum rte_crypto_cipher_algorithm ciphers[] = {
1349 RTE_CRYPTO_CIPHER_AES_CBC
1350 };
1351 const enum rte_crypto_auth_algorithm auths[] = {
1352 RTE_CRYPTO_AUTH_SHA1_HMAC
1353 };
1354
1355 rte_cryptodev_info_get(dev_id, &dev_info);
1356
1357 if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) ||
1358 ((global_api_test_type == CRYPTODEV_RAW_API_TEST) &&
1359 !(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) {
1360 RTE_LOG(INFO, USER1, "Feature flag requirements for Negative "
1361 "HMAC SHA1 testsuite not met\n");
1362 return TEST_SKIPPED;
1363 }
1364
1365 if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0
1366 && check_auth_capabilities_supported(auths,
1367 RTE_DIM(auths)) != 0) {
1368 RTE_LOG(INFO, USER1, "Capability requirements for Negative "
1369 "HMAC SHA1 testsuite not met\n");
1370 return TEST_SKIPPED;
1371 }
1372
1373 return 0;
1374}
1375
1376static int
1377dev_configure_and_start(uint64_t ff_disable)

Callers

nothing calls this directly

Tested by

no test coverage detected