test/crypto: add DPAA2 crypto performance test
authorAkhil Goyal <akhil.goyal@nxp.com>
Thu, 20 Apr 2017 05:44:26 +0000 (11:14 +0530)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 20 Apr 2017 09:32:45 +0000 (11:32 +0200)
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
test/test/test_cryptodev_perf.c

index f4406dc..9d9919b 100644 (file)
@@ -207,6 +207,8 @@ static const char *pmd_name(enum rte_cryptodev_type pmd)
                return RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD);
        case RTE_CRYPTODEV_SNOW3G_PMD:
                return RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD);
+       case RTE_CRYPTODEV_DPAA2_SEC_PMD:
+               return RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD);
        default:
                return "";
        }
@@ -4649,6 +4651,17 @@ static struct unit_test_suite cryptodev_testsuite  = {
        }
 };
 
+static struct unit_test_suite cryptodev_dpaa2_sec_testsuite  = {
+       .suite_name = "Crypto Device DPAA2_SEC Unit Test Suite",
+       .setup = testsuite_setup,
+       .teardown = testsuite_teardown,
+       .unit_test_cases = {
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                            test_perf_aes_cbc_encrypt_digest_vary_pkt_size),
+               TEST_CASES_END() /**< NULL terminate unit test array */
+       }
+};
+
 static struct unit_test_suite cryptodev_gcm_testsuite  = {
        .suite_name = "Crypto Device AESNI GCM Unit Test Suite",
        .setup = testsuite_setup,
@@ -4774,6 +4787,14 @@ perftest_sw_armv8_cryptodev(void /*argv __rte_unused, int argc __rte_unused*/)
        return unit_test_suite_runner(&cryptodev_armv8_testsuite);
 }
 
+static int
+perftest_dpaa2_sec_cryptodev(void)
+{
+       gbl_cryptodev_perftest_devtype = RTE_CRYPTODEV_DPAA2_SEC_PMD;
+
+       return unit_test_suite_runner(&cryptodev_dpaa2_sec_testsuite);
+}
+
 REGISTER_TEST_COMMAND(cryptodev_aesni_mb_perftest, perftest_aesni_mb_cryptodev);
 REGISTER_TEST_COMMAND(cryptodev_qat_perftest, perftest_qat_cryptodev);
 REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_perftest, perftest_sw_snow3g_cryptodev);
@@ -4785,3 +4806,5 @@ REGISTER_TEST_COMMAND(cryptodev_qat_continual_perftest,
                perftest_qat_continual_cryptodev);
 REGISTER_TEST_COMMAND(cryptodev_sw_armv8_perftest,
                perftest_sw_armv8_cryptodev);
+REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_perftest,
+                     perftest_dpaa2_sec_cryptodev);