From: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
To: pablo.de.lara.guarch@intel.com
Cc: dev@dpdk.org, Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Subject: [dpdk-dev] [PATCH v4 2/2] test/crypto: Add AES-256 DOCSIS test vectors
Date: Fri, 10 Apr 2020 16:03:30 +0100 [thread overview]
Message-ID: <1586531010-32279-2-git-send-email-mairtin.oloingsigh@intel.com> (raw)
In-Reply-To: <1586354671-25703-1-git-send-email-mairtin.oloingsigh@intel.com>
This patch adds test vectors for AES-256 and sets AESNI-MB as the
target PMD
Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Acked-by: Pablo de Lara <Pablo.de.lara.guarch@intel.com>
---
v2: Remove duplicate code
---
app/test/test_cryptodev_aes_test_vectors.h | 81 ++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h
index 08ae09390..df338756f 100644
--- a/app/test/test_cryptodev_aes_test_vectors.h
+++ b/app/test/test_cryptodev_aes_test_vectors.h
@@ -5,6 +5,15 @@
#ifndef TEST_CRYPTODEV_AES_TEST_VECTORS_H_
#define TEST_CRYPTODEV_AES_TEST_VECTORS_H_
+#ifdef RTE_LIBRTE_PMD_AESNI_MB
+#include <intel-ipsec-mb.h>
+#endif
+
+#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
+
/* test vectors */
static const uint8_t plaintext_aes128ctr[] = {
0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96,
@@ -2739,79 +2748,151 @@ static const struct blockcipher_test_case aes_docsis_test_cases[] = {
.test_descr = "AES-256-DOCSIS-BPI Full Block Encryption",
.test_data = &aes_test_data_docsis_4,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI Runt Block Encryption",
.test_data = &aes_test_data_docsis_5,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI Uneven Encryption",
.test_data = &aes_test_data_docsis_6,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI Full Block Decryption",
.test_data = &aes_test_data_docsis_4,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI Runt Block Decryption",
.test_data = &aes_test_data_docsis_5,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI Uneven Decryption",
.test_data = &aes_test_data_docsis_6,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI OOP Full Block Encryption",
.test_data = &aes_test_data_docsis_4,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI OOP Runt Block Encryption",
.test_data = &aes_test_data_docsis_5,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI OOP Uneven Block Encryption",
.test_data = &aes_test_data_docsis_6,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI OOP Full Block Decryption",
.test_data = &aes_test_data_docsis_4,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI OOP Runt Block Decryption",
.test_data = &aes_test_data_docsis_5,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
{
.test_descr = "AES-256-DOCSIS-BPI OOP Uneven Block Decryption",
.test_data = &aes_test_data_docsis_6,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+ .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT |
+ BLOCKCIPHER_TEST_TARGET_PMD_MB
+#else
+
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
+#endif
},
};
#endif /* TEST_CRYPTODEV_AES_TEST_VECTORS_H_ */
--
2.12.3
next prev parent reply other threads:[~2020-04-10 15:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 14:04 [dpdk-dev] [PATCH v3] crypto/aesni_mb: support DOCSIS AES-256 Mairtin o Loingsigh
2020-04-10 15:03 ` [dpdk-dev] [PATCH v4 1/2] " Mairtin o Loingsigh
2020-04-14 8:45 ` De Lara Guarch, Pablo
2020-04-15 9:04 ` [dpdk-dev] [PATCH v5] " Mairtin o Loingsigh
2020-04-15 11:07 ` De Lara Guarch, Pablo
2020-04-15 11:51 ` [dpdk-dev] [PATCH v6] " Mairtin o Loingsigh
2020-04-17 16:31 ` Akhil Goyal
2020-04-17 20:59 ` Akhil Goyal
2020-04-10 15:03 ` Mairtin o Loingsigh [this message]
2020-04-12 16:43 ` [dpdk-dev] [PATCH v4 2/2] test/crypto: Add AES-256 DOCSIS test vectors Thomas Monjalon
2020-04-14 8:49 ` De Lara Guarch, Pablo
2020-04-14 9:06 ` Thomas Monjalon
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=1586531010-32279-2-git-send-email-mairtin.oloingsigh@intel.com \
--to=mairtin.oloingsigh@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@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).