test/crypto: add mrvl crypto unit tests
Add unit tests for MRVL CRYPTO PMD driver. Signed-off-by: Jacek Siuda <jck@semihalf.com> Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
This commit is contained in:
parent
ceb78f61ce
commit
84e0ded38a
@ -341,6 +341,28 @@ testsuite_setup(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Create a MRVL device if required */
|
||||
if (gbl_driver_id == rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_MRVL_PMD))) {
|
||||
#ifndef RTE_LIBRTE_PMD_MRVL_CRYPTO
|
||||
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO must be"
|
||||
" enabled in config file to run this testsuite.\n");
|
||||
return TEST_FAILED;
|
||||
#endif
|
||||
nb_devs = rte_cryptodev_device_count_by_driver(
|
||||
rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD)));
|
||||
if (nb_devs < 1) {
|
||||
ret = rte_vdev_init(
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD),
|
||||
NULL);
|
||||
|
||||
TEST_ASSERT(ret == 0, "Failed to create "
|
||||
"instance of pmd : %s",
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
|
||||
if (gbl_driver_id == rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD))) {
|
||||
@ -1919,6 +1941,101 @@ test_AES_chain_armv8_all(void)
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
static int
|
||||
test_AES_chain_mrvl_all(void)
|
||||
{
|
||||
struct crypto_testsuite_params *ts_params = &testsuite_params;
|
||||
int status;
|
||||
|
||||
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
|
||||
ts_params->op_mpool,
|
||||
ts_params->session_mpool,
|
||||
ts_params->valid_devs[0],
|
||||
rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD)),
|
||||
BLKCIPHER_AES_CHAIN_TYPE);
|
||||
|
||||
TEST_ASSERT_EQUAL(status, 0, "Test failed");
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
static int
|
||||
test_AES_cipheronly_mrvl_all(void)
|
||||
{
|
||||
struct crypto_testsuite_params *ts_params = &testsuite_params;
|
||||
int status;
|
||||
|
||||
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
|
||||
ts_params->op_mpool,
|
||||
ts_params->session_mpool,
|
||||
ts_params->valid_devs[0],
|
||||
rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD)),
|
||||
BLKCIPHER_AES_CIPHERONLY_TYPE);
|
||||
|
||||
TEST_ASSERT_EQUAL(status, 0, "Test failed");
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
static int
|
||||
test_authonly_mrvl_all(void)
|
||||
{
|
||||
struct crypto_testsuite_params *ts_params = &testsuite_params;
|
||||
int status;
|
||||
|
||||
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
|
||||
ts_params->op_mpool,
|
||||
ts_params->session_mpool,
|
||||
ts_params->valid_devs[0],
|
||||
rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD)),
|
||||
BLKCIPHER_AUTHONLY_TYPE);
|
||||
|
||||
TEST_ASSERT_EQUAL(status, 0, "Test failed");
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
static int
|
||||
test_3DES_chain_mrvl_all(void)
|
||||
{
|
||||
struct crypto_testsuite_params *ts_params = &testsuite_params;
|
||||
int status;
|
||||
|
||||
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
|
||||
ts_params->op_mpool,
|
||||
ts_params->session_mpool,
|
||||
ts_params->valid_devs[0],
|
||||
rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD)),
|
||||
BLKCIPHER_3DES_CHAIN_TYPE);
|
||||
|
||||
TEST_ASSERT_EQUAL(status, 0, "Test failed");
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
static int
|
||||
test_3DES_cipheronly_mrvl_all(void)
|
||||
{
|
||||
struct crypto_testsuite_params *ts_params = &testsuite_params;
|
||||
int status;
|
||||
|
||||
status = test_blockcipher_all_tests(ts_params->mbuf_pool,
|
||||
ts_params->op_mpool,
|
||||
ts_params->session_mpool,
|
||||
ts_params->valid_devs[0],
|
||||
rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD)),
|
||||
BLKCIPHER_3DES_CIPHERONLY_TYPE);
|
||||
|
||||
TEST_ASSERT_EQUAL(status, 0, "Test failed");
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
/* ***** SNOW 3G Tests ***** */
|
||||
static int
|
||||
create_wireless_algo_hash_session(uint8_t dev_id,
|
||||
@ -9417,6 +9534,40 @@ static struct unit_test_suite cryptodev_armv8_testsuite = {
|
||||
}
|
||||
};
|
||||
|
||||
static struct unit_test_suite cryptodev_mrvl_testsuite = {
|
||||
.suite_name = "Crypto Device Marvell Component Test Suite",
|
||||
.setup = testsuite_setup,
|
||||
.teardown = testsuite_teardown,
|
||||
.unit_test_cases = {
|
||||
TEST_CASE_ST(ut_setup, ut_teardown, test_multi_session),
|
||||
TEST_CASE_ST(ut_setup, ut_teardown,
|
||||
test_multi_session_random_usage),
|
||||
TEST_CASE_ST(ut_setup, ut_teardown,
|
||||
test_AES_chain_mrvl_all),
|
||||
TEST_CASE_ST(ut_setup, ut_teardown,
|
||||
test_AES_cipheronly_mrvl_all),
|
||||
TEST_CASE_ST(ut_setup, ut_teardown,
|
||||
test_authonly_mrvl_all),
|
||||
TEST_CASE_ST(ut_setup, ut_teardown,
|
||||
test_3DES_chain_mrvl_all),
|
||||
TEST_CASE_ST(ut_setup, ut_teardown,
|
||||
test_3DES_cipheronly_mrvl_all),
|
||||
|
||||
/** Negative tests */
|
||||
TEST_CASE_ST(ut_setup, ut_teardown,
|
||||
authentication_verify_HMAC_SHA1_fail_data_corrupt),
|
||||
TEST_CASE_ST(ut_setup, ut_teardown,
|
||||
authentication_verify_HMAC_SHA1_fail_tag_corrupt),
|
||||
TEST_CASE_ST(ut_setup, ut_teardown,
|
||||
auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt),
|
||||
TEST_CASE_ST(ut_setup, ut_teardown,
|
||||
auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt),
|
||||
|
||||
TEST_CASES_END() /**< NULL terminate unit test array */
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static int
|
||||
test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/)
|
||||
{
|
||||
@ -9561,6 +9712,22 @@ test_cryptodev_armv8(void)
|
||||
return unit_test_suite_runner(&cryptodev_armv8_testsuite);
|
||||
}
|
||||
|
||||
static int
|
||||
test_cryptodev_mrvl(void)
|
||||
{
|
||||
gbl_driver_id = rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD));
|
||||
|
||||
if (gbl_driver_id == -1) {
|
||||
RTE_LOG(ERR, USER1, "MRVL PMD must be loaded. Check if "
|
||||
"CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO is enabled "
|
||||
"in config file to run this testsuite.\n");
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
return unit_test_suite_runner(&cryptodev_mrvl_testsuite);
|
||||
}
|
||||
|
||||
#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
|
||||
|
||||
static int
|
||||
@ -9630,5 +9797,6 @@ REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
|
||||
REGISTER_TEST_COMMAND(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
|
||||
REGISTER_TEST_COMMAND(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
|
||||
REGISTER_TEST_COMMAND(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
|
||||
REGISTER_TEST_COMMAND(cryptodev_sw_mrvl_autotest, test_cryptodev_mrvl);
|
||||
REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
|
||||
REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
|
||||
|
@ -88,6 +88,7 @@
|
||||
#define CRYPTODEV_NAME_ARMV8_PMD crypto_armv8
|
||||
#define CRYPTODEV_NAME_DPAA2_SEC_PMD crypto_dpaa2_sec
|
||||
#define CRYPTODEV_NAME_SCHEDULER_PMD crypto_scheduler
|
||||
#define CRYPTODEV_NAME_MRVL_PMD crypto_mrvl
|
||||
|
||||
/**
|
||||
* Write (spread) data from buffer to mbuf data
|
||||
|
@ -1198,7 +1198,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CTR HMAC-SHA1 Decryption Digest "
|
||||
@ -1210,7 +1211,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-192-CTR XCBC Encryption Digest",
|
||||
@ -1248,7 +1250,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-256-CTR HMAC-SHA1 Decryption Digest "
|
||||
@ -1260,7 +1263,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest",
|
||||
@ -1272,14 +1276,16 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest "
|
||||
"(short buffers)",
|
||||
.test_data = &aes_test_data_13,
|
||||
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest "
|
||||
@ -1304,14 +1310,16 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA1 Decryption Digest "
|
||||
"Verify (short buffers)",
|
||||
.test_data = &aes_test_data_13,
|
||||
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA256 Encryption Digest",
|
||||
@ -1323,14 +1331,16 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA256 Encryption Digest "
|
||||
"(short buffers)",
|
||||
.test_data = &aes_test_data_12,
|
||||
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA256 Decryption Digest "
|
||||
@ -1343,14 +1353,16 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA256 Decryption Digest "
|
||||
"Verify (short buffers)",
|
||||
.test_data = &aes_test_data_12,
|
||||
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA512 Encryption Digest",
|
||||
@ -1361,7 +1373,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA512 Encryption Digest "
|
||||
@ -1393,7 +1406,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA512 Decryption Digest "
|
||||
@ -1475,7 +1489,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA384 Decryption Digest "
|
||||
@ -1487,7 +1502,8 @@ static const struct blockcipher_test_case aes_chain_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest "
|
||||
@ -1520,7 +1536,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MB |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CBC Decryption",
|
||||
@ -1531,7 +1548,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MB |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-192-CBC Encryption",
|
||||
@ -1572,7 +1590,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MB |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-256-CBC Decryption",
|
||||
@ -1583,7 +1602,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MB |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-256-CBC OOP Encryption",
|
||||
@ -1610,7 +1630,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MB |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CTR Decryption",
|
||||
@ -1621,7 +1642,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MB |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-192-CTR Encryption",
|
||||
@ -1654,7 +1676,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MB |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-256-CTR Decryption",
|
||||
@ -1665,7 +1688,8 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MB |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "AES-128-CTR Encryption (12-byte IV)",
|
||||
|
@ -94,6 +94,8 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
|
||||
RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD));
|
||||
int dpaa_sec_pmd = rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD));
|
||||
int mrvl_pmd = rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD));
|
||||
|
||||
int nb_segs = 1;
|
||||
|
||||
@ -119,7 +121,8 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
|
||||
driver_id == dpaa_sec_pmd ||
|
||||
driver_id == qat_pmd ||
|
||||
driver_id == openssl_pmd ||
|
||||
driver_id == armv8_pmd) { /* Fall through */
|
||||
driver_id == armv8_pmd ||
|
||||
driver_id == mrvl_pmd) { /* Fall through */
|
||||
digest_len = tdata->digest.len;
|
||||
} else if (driver_id == aesni_mb_pmd ||
|
||||
driver_id == scheduler_pmd) {
|
||||
@ -592,6 +595,8 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool,
|
||||
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
|
||||
int qat_pmd = rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD));
|
||||
int mrvl_pmd = rte_cryptodev_driver_id_get(
|
||||
RTE_STR(CRYPTODEV_NAME_MRVL_PMD));
|
||||
|
||||
switch (test_type) {
|
||||
case BLKCIPHER_AES_CHAIN_TYPE:
|
||||
@ -652,6 +657,8 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool,
|
||||
target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC;
|
||||
else if (driver_id == dpaa_sec_pmd)
|
||||
target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC;
|
||||
else if (driver_id == mrvl_pmd)
|
||||
target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_MRVL;
|
||||
else
|
||||
TEST_ASSERT(0, "Unrecognized cryptodev type");
|
||||
|
||||
|
@ -54,6 +54,7 @@
|
||||
#define BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER 0x0010 /* Scheduler */
|
||||
#define BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC 0x0020 /* DPAA2_SEC flag */
|
||||
#define BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC 0x0040 /* DPAA_SEC flag */
|
||||
#define BLOCKCIPHER_TEST_TARGET_PMD_MRVL 0x0080 /* Marvell flag */
|
||||
|
||||
#define BLOCKCIPHER_TEST_OP_CIPHER (BLOCKCIPHER_TEST_OP_ENCRYPT | \
|
||||
BLOCKCIPHER_TEST_OP_DECRYPT)
|
||||
|
@ -853,7 +853,8 @@ static const struct blockcipher_test_case des_cipheronly_test_cases[] = {
|
||||
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MB |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "DES-CBC Decryption",
|
||||
@ -861,7 +862,8 @@ static const struct blockcipher_test_case des_cipheronly_test_cases[] = {
|
||||
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MB |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
|
||||
};
|
||||
@ -1100,7 +1102,8 @@ static const struct blockcipher_test_case triple_des_chain_test_cases[] = {
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "3DES-192-CBC HMAC-SHA1 Decryption Digest Verify",
|
||||
@ -1109,19 +1112,22 @@ static const struct blockcipher_test_case triple_des_chain_test_cases[] = {
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "3DES-192-CBC SHA1 Encryption Digest",
|
||||
.test_data = &triple_des192cbc_sha1_test_vector,
|
||||
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "3DES-192-CBC SHA1 Decryption Digest Verify",
|
||||
.test_data = &triple_des192cbc_sha1_test_vector,
|
||||
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "3DES-128-CTR HMAC-SHA1 Encryption Digest",
|
||||
@ -1237,7 +1243,8 @@ static const struct blockcipher_test_case triple_des_cipheronly_test_cases[] = {
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "3DES-192-CBC Decryption",
|
||||
@ -1246,7 +1253,8 @@ static const struct blockcipher_test_case triple_des_cipheronly_test_cases[] = {
|
||||
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_QAT |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
|
||||
BLOCKCIPHER_TEST_TARGET_PMD_MRVL
|
||||
},
|
||||
{
|
||||
.test_descr = "3DES-128-CTR Encryption",
|
||||
|
Loading…
Reference in New Issue
Block a user