From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 47EB61B911 for ; Thu, 20 Dec 2018 00:24:20 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2018 15:24:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,374,1539673200"; d="scan'208";a="131409335" Received: from silpixa00398673.ir.intel.com (HELO silpixa00398673.ger.corp.intel.com) ([10.237.223.54]) by fmsmga001.fm.intel.com with ESMTP; 19 Dec 2018 15:24:18 -0800 From: Fan Zhang To: dev@dpdk.org Cc: akhil.goyal@nxp.com, Damian Nowak , Lukasz Krakowiak Date: Wed, 19 Dec 2018 23:24:15 +0000 Message-Id: <20181219232416.38542-3-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20181219232416.38542-1-roy.fan.zhang@intel.com> References: <20181213151817.27478-1-roy.fan.zhang@intel.com> <20181219232416.38542-1-roy.fan.zhang@intel.com> Subject: [dpdk-dev] [PATCH v3 2/3] test: add aesni-mb sha 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 23:24:20 -0000 This patch adds the plain SHA* test cases to AESNI-MB crypto unit test. The tests are enabled only for intel-ipsec-mb library version 0.52 or older. Signed-off-by: Damian Nowak Signed-off-by: Lukasz Krakowiak Signed-off-by: Fan Zhang --- test/test/test_cryptodev_hash_test_vectors.h | 65 +++++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 5 deletions(-) diff --git a/test/test/test_cryptodev_hash_test_vectors.h b/test/test/test_cryptodev_hash_test_vectors.h index 8964a3bac..21bf347f6 100644 --- a/test/test/test_cryptodev_hash_test_vectors.h +++ b/test/test/test_cryptodev_hash_test_vectors.h @@ -96,7 +96,8 @@ sha1_test_vector = { 0x35, 0x62, 0xFB, 0xFA, 0x93, 0xFD, 0x7D, 0x70, 0xA6, 0x7D, 0x45, 0xCA }, - .len = 20 + .len = 20, + .truncated_len = 20 } }; @@ -140,7 +141,8 @@ sha224_test_vector = { 0x39, 0x26, 0xDF, 0xB5, 0x78, 0x62, 0xB2, 0x6E, 0x5E, 0x8F, 0x25, 0x84 }, - .len = 28 + .len = 28, + .truncated_len = 28 } }; @@ -186,7 +188,8 @@ sha256_test_vector = { 0x1F, 0xC7, 0x84, 0xEE, 0x76, 0xA6, 0x39, 0x15, 0x76, 0x2F, 0x87, 0xF9, 0x01, 0x06, 0xF3, 0xB7 }, - .len = 32 + .len = 32, + .truncated_len = 32 } }; @@ -234,7 +237,8 @@ sha384_test_vector = { 0xAD, 0x41, 0xAB, 0x15, 0xB0, 0x03, 0x15, 0xEC, 0x9E, 0x3D, 0xED, 0xCB, 0x80, 0x7B, 0xF4, 0xB6 }, - .len = 48 + .len = 48, + .truncated_len = 48 } }; @@ -288,7 +292,8 @@ sha512_test_vector = { 0x64, 0x4E, 0x15, 0x68, 0x12, 0x67, 0x26, 0x0F, 0x2C, 0x3C, 0x83, 0x25, 0x27, 0x86, 0xF0, 0xDB }, - .len = 64 + .len = 64, + .truncated_len = 64 } }; @@ -428,7 +433,12 @@ static const struct blockcipher_test_case hash_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_CCP | BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | +#if IMB_VERSION(0, 52, 0) > IMB_VERSION_NUM BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX +#else + BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#endif }, { .test_descr = "SHA1 Digest Verify", @@ -437,7 +447,12 @@ static const struct blockcipher_test_case hash_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_CCP | BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | +#if IMB_VERSION(0, 52, 0) > IMB_VERSION_NUM BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX +#else + BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#endif }, { .test_descr = "HMAC-SHA1 Digest", @@ -496,7 +511,12 @@ static const struct blockcipher_test_case hash_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_CCP | BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | +#if IMB_VERSION(0, 52, 0) > IMB_VERSION_NUM BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX +#else + BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#endif }, { .test_descr = "SHA224 Digest Verify", @@ -505,7 +525,12 @@ static const struct blockcipher_test_case hash_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_CCP | BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | +#if IMB_VERSION(0, 52, 0) > IMB_VERSION_NUM BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX +#else + BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#endif }, { .test_descr = "HMAC-SHA224 Digest", @@ -542,7 +567,12 @@ static const struct blockcipher_test_case hash_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_CCP | BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | +#if IMB_VERSION(0, 52, 0) > IMB_VERSION_NUM BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX +#else + BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#endif }, { .test_descr = "SHA256 Digest Verify", @@ -551,7 +581,12 @@ static const struct blockcipher_test_case hash_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_CCP | BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | +#if IMB_VERSION(0, 52, 0) > IMB_VERSION_NUM BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX +#else + BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#endif }, { .test_descr = "HMAC-SHA256 Digest", @@ -590,7 +625,12 @@ static const struct blockcipher_test_case hash_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_CCP | BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | +#if IMB_VERSION(0, 52, 0) > IMB_VERSION_NUM BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX +#else + BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#endif }, { .test_descr = "SHA384 Digest Verify", @@ -599,7 +639,12 @@ static const struct blockcipher_test_case hash_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_CCP | BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | +#if IMB_VERSION(0, 52, 0) > IMB_VERSION_NUM BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX +#else + BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#endif }, { .test_descr = "HMAC-SHA384 Digest", @@ -638,7 +683,12 @@ static const struct blockcipher_test_case hash_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_CCP | BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | +#if IMB_VERSION(0, 52, 0) > IMB_VERSION_NUM BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX +#else + BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#endif }, { .test_descr = "SHA512 Digest Verify", @@ -647,7 +697,12 @@ static const struct blockcipher_test_case hash_test_cases[] = { .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | BLOCKCIPHER_TEST_TARGET_PMD_CCP | BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | +#if IMB_VERSION(0, 52, 0) > IMB_VERSION_NUM BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX +#else + BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX | + BLOCKCIPHER_TEST_TARGET_PMD_MB +#endif }, { .test_descr = "HMAC-SHA512 Digest", -- 2.13.6