From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 32CC41B739 for ; Wed, 19 Dec 2018 22:42:49 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2018 13:42:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,374,1539673200"; d="scan'208";a="285107150" Received: from silpixa00398673.ir.intel.com (HELO silpixa00398673.ger.corp.intel.com) ([10.237.223.54]) by orsmga005.jf.intel.com with ESMTP; 19 Dec 2018 13:42:47 -0800 From: Fan Zhang To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Wed, 19 Dec 2018 21:42:43 +0000 Message-Id: <20181219214244.21234-3-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20181219214244.21234-1-roy.fan.zhang@intel.com> References: <20181218135125.68547-1-roy.fan.zhang@intel.com> <20181219214244.21234-1-roy.fan.zhang@intel.com> Subject: [dpdk-dev] [PATCH v4 2/3] test: add aesni-mb gmac test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2018 21:42:49 -0000 This patch adds the GMAC test cases to AESNI-MB crypto unit test. Signed-off-by: Fan Zhang Acked-by: Damian Nowak --- test/test/test_cryptodev.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c index 84065eb49..f17054520 100644 --- a/test/test/test_cryptodev.c +++ b/test/test/test_cryptodev.c @@ -21,6 +21,10 @@ #include #endif +#ifdef RTE_LIBRTE_PMD_AESNI_MB +#include +#endif + #include #include "test.h" @@ -41,6 +45,11 @@ #define VDEV_ARGS_SIZE 100 #define MAX_NB_SESSIONS 4 +#if !defined(IMB_VERSION_NUM) +#define IMB_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c)) +#define IMB_VERSION_NUM IMB_VERSION(0, 49, 0) +#endif + static int gbl_driver_id; struct crypto_testsuite_params { @@ -9228,6 +9237,7 @@ static struct unit_test_suite cryptodev_aesni_mb_testsuite = { .setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { +#if IMB_VERSION_NUM >= IMB_VERSION(0, 51, 0) TEST_CASE_ST(ut_setup, ut_teardown, test_AES_GCM_authenticated_encryption_test_case_1), TEST_CASE_ST(ut_setup, ut_teardown, @@ -9341,6 +9351,20 @@ static struct unit_test_suite cryptodev_aesni_mb_testsuite = { TEST_CASE_ST(ut_setup, ut_teardown, test_AES_GCM_authenticated_decryption_sessionless_test_case_1), + /** AES GMAC Authentication */ + TEST_CASE_ST(ut_setup, ut_teardown, + test_AES_GMAC_authentication_test_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_AES_GMAC_authentication_verify_test_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_AES_GMAC_authentication_test_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_AES_GMAC_authentication_verify_test_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_AES_GMAC_authentication_test_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_AES_GMAC_authentication_verify_test_case_3), +#endif /* IMB_VERSION_NUM >= IMB_VERSION(0, 51, 0) */ TEST_CASE_ST(ut_setup, ut_teardown, test_AES_chain_mb_all), TEST_CASE_ST(ut_setup, ut_teardown, test_AES_cipheronly_mb_all), -- 2.13.6