return TEST_SUCCESS;
}
+static int
+test_AES_chain_nitrox_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->session_priv_mpool,
+ ts_params->valid_devs[0],
+ rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_NITROX_PMD)),
+ BLKCIPHER_AES_CHAIN_TYPE);
+
+ TEST_ASSERT_EQUAL(status, 0, "Test failed");
+
+ return TEST_SUCCESS;
+}
+
static int
test_3DES_cipheronly_octeontx_all(void)
{
}
};
+static struct unit_test_suite cryptodev_nitrox_testsuite = {
+ .suite_name = "Crypto NITROX Unit Test Suite",
+ .setup = testsuite_setup,
+ .teardown = testsuite_teardown,
+ .unit_test_cases = {
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_device_configure_invalid_dev_id),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_device_configure_invalid_queue_pair_ids),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_AES_chain_nitrox_all),
+
+ TEST_CASES_END() /**< NULL terminate unit test array */
+ }
+};
+
static int
test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/)
{
return unit_test_suite_runner(&cryptodev_caam_jr_testsuite);
}
+static int
+test_cryptodev_nitrox(void)
+{
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_NITROX_PMD));
+
+ if (gbl_driver_id == -1) {
+ RTE_LOG(ERR, USER1, "NITROX PMD must be loaded. Check if "
+ "CONFIG_RTE_LIBRTE_PMD_NITROX is enabled "
+ "in config file to run this testsuite.\n");
+ return TEST_FAILED;
+ }
+
+ return unit_test_suite_runner(&cryptodev_nitrox_testsuite);
+}
+
REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat);
REGISTER_TEST_COMMAND(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
REGISTER_TEST_COMMAND(cryptodev_openssl_autotest, test_cryptodev_openssl);
REGISTER_TEST_COMMAND(cryptodev_virtio_autotest, test_cryptodev_virtio);
REGISTER_TEST_COMMAND(cryptodev_octeontx_autotest, test_cryptodev_octeontx);
REGISTER_TEST_COMMAND(cryptodev_caam_jr_autotest, test_cryptodev_caam_jr);
+REGISTER_TEST_COMMAND(cryptodev_nitrox_autotest, test_cryptodev_nitrox);
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_MB |
- BLOCKCIPHER_TEST_TARGET_PMD_QAT
+ BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CTR HMAC-SHA1 Encryption Digest",
BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
BLOCKCIPHER_TEST_TARGET_PMD_CCP |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest "
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 |
BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest "
BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA1 Decryption Digest "
BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
BLOCKCIPHER_TEST_TARGET_PMD_CCP |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA1 Decryption Digest "
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC |
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA1 Decryption Digest "
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 |
BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA256 Encryption Digest",
BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
BLOCKCIPHER_TEST_TARGET_PMD_CCP |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA256 Encryption Digest "
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 |
BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA256 Decryption Digest "
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
BLOCKCIPHER_TEST_TARGET_PMD_CCP |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA256 Decryption Digest "
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8 |
BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA512 Encryption Digest",
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
BLOCKCIPHER_TEST_TARGET_PMD_MB |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA1 Encryption Digest "
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_MB |
- BLOCKCIPHER_TEST_TARGET_PMD_QAT
+ BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA1 Decryption Digest "
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
- BLOCKCIPHER_TEST_TARGET_PMD_MB
+ BLOCKCIPHER_TEST_TARGET_PMD_MB |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA224 Encryption Digest",
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
BLOCKCIPHER_TEST_TARGET_PMD_CCP |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA224 Decryption Digest "
BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC |
BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR |
BLOCKCIPHER_TEST_TARGET_PMD_CCP |
- BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
+ BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
+ BLOCKCIPHER_TEST_TARGET_PMD_NITROX
},
{
.test_descr = "AES-128-CBC HMAC-SHA384 Encryption Digest",
RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD));
int null_pmd = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_NULL_PMD));
+ int nitrox_pmd = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_NITROX_PMD));
int nb_segs = 1;
uint32_t nb_iterates = 0;
driver_id == ccp_pmd ||
driver_id == virtio_pmd ||
driver_id == octeontx_pmd ||
- driver_id == null_pmd) { /* Fall through */
+ driver_id == null_pmd ||
+ driver_id == nitrox_pmd) { /* Fall through */
digest_len = tdata->digest.len;
} else if (driver_id == aesni_mb_pmd ||
driver_id == scheduler_pmd) {
RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD));
int null_pmd = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_NULL_PMD));
+ int nitrox_pmd = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_NITROX_PMD));
switch (test_type) {
case BLKCIPHER_AES_CHAIN_TYPE:
target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX;
else if (driver_id == null_pmd)
target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_NULL;
+ else if (driver_id == nitrox_pmd)
+ target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_NITROX;
else
TEST_ASSERT(0, "Unrecognized cryptodev type");