From: Fan Zhang <roy.fan.zhang@intel.com>
To: dev@dpdk.org
Cc: akhil.goyal@nxp.com, Damian Nowak <damianx.nowak@intel.com>,
Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Subject: [dpdk-dev] [PATCH v3 2/3] test: add aesni-mb sha test
Date: Wed, 19 Dec 2018 23:24:15 +0000 [thread overview]
Message-ID: <20181219232416.38542-3-roy.fan.zhang@intel.com> (raw)
In-Reply-To: <20181219232416.38542-1-roy.fan.zhang@intel.com>
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 <damianx.nowak@intel.com>
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
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
next prev parent reply other threads:[~2018-12-19 23:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 17:24 [dpdk-dev] [PATCH] crypto/aesni_mb: add SHA support Fan Zhang
2018-12-13 15:18 ` [dpdk-dev] [PATCH v2] crypto/aesni_mb: add plain sha support Fan Zhang
2018-12-18 10:30 ` Akhil Goyal
2018-12-19 23:24 ` [dpdk-dev] [PATCH v3 0/3] " Fan Zhang
2018-12-19 23:24 ` [dpdk-dev] [PATCH v3 1/3] " Fan Zhang
2018-12-19 23:24 ` Fan Zhang [this message]
2018-12-19 23:24 ` [dpdk-dev] [PATCH v3 3/3] doc: update release note and PMD information Fan Zhang
2018-12-20 12:22 ` [dpdk-dev] [PATCH v4] crypto/aesni_mb: support plain SHA Fan Zhang
2018-12-20 17:52 ` Trahe, Fiona
2019-01-09 22:32 ` De Lara Guarch, Pablo
2019-01-10 14:11 ` De Lara Guarch, Pablo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181219232416.38542-3-roy.fan.zhang@intel.com \
--to=roy.fan.zhang@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=damianx.nowak@intel.com \
--cc=dev@dpdk.org \
--cc=lukaszx.krakowiak@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).