DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2 1/2] crypto/aesni_mb: support DOCSIS AES-256
@ 2020-04-06 15:35 Mairtin o Loingsigh
  2020-04-06 15:35 ` [dpdk-dev] [PATCH v2 2/2] test/crypto: Add AES-256 DOCSIS test vectors Mairtin o Loingsigh
  2020-04-06 17:47 ` [dpdk-dev] [PATCH v2 1/2] crypto/aesni_mb: support DOCSIS AES-256 De Lara Guarch, Pablo
  0 siblings, 2 replies; 4+ messages in thread
From: Mairtin o Loingsigh @ 2020-04-06 15:35 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: dev, Mairtin o Loingsigh

This patch adds support for DOCSIS AES-256 when using AESNI-MB

Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 845661174..0d555ec29 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -319,8 +319,14 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 				},
 				.iv_size = {
 					.min = 16,
+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)
+					.max = 32,
+					.increment = 16
+#else
 					.max = 16,
 					.increment = 0
+#endif
+
 				}
 			}, }
 		}, }
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2 2/2] test/crypto: Add AES-256 DOCSIS test vectors
  2020-04-06 15:35 [dpdk-dev] [PATCH v2 1/2] crypto/aesni_mb: support DOCSIS AES-256 Mairtin o Loingsigh
@ 2020-04-06 15:35 ` Mairtin o Loingsigh
  2020-04-06 18:23   ` De Lara Guarch, Pablo
  2020-04-06 17:47 ` [dpdk-dev] [PATCH v2 1/2] crypto/aesni_mb: support DOCSIS AES-256 De Lara Guarch, Pablo
  1 sibling, 1 reply; 4+ messages in thread
From: Mairtin o Loingsigh @ 2020-04-06 15:35 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: dev, Mairtin o Loingsigh

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>
---
 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.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/2] crypto/aesni_mb: support DOCSIS AES-256
  2020-04-06 15:35 [dpdk-dev] [PATCH v2 1/2] crypto/aesni_mb: support DOCSIS AES-256 Mairtin o Loingsigh
  2020-04-06 15:35 ` [dpdk-dev] [PATCH v2 2/2] test/crypto: Add AES-256 DOCSIS test vectors Mairtin o Loingsigh
@ 2020-04-06 17:47 ` De Lara Guarch, Pablo
  1 sibling, 0 replies; 4+ messages in thread
From: De Lara Guarch, Pablo @ 2020-04-06 17:47 UTC (permalink / raw)
  To: O'loingsigh, Mairtin; +Cc: dev



> -----Original Message-----
> From: O'loingsigh, Mairtin <mairtin.oloingsigh@intel.com>
> Sent: Monday, April 6, 2020 4:36 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; O'loingsigh, Mairtin <mairtin.oloingsigh@intel.com>
> Subject: [PATCH v2 1/2] crypto/aesni_mb: support DOCSIS AES-256
> 
> This patch adds support for DOCSIS AES-256 when using AESNI-MB
> 
> Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>

Acked-by: Pablo de Lara <Pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/2] test/crypto: Add AES-256 DOCSIS test vectors
  2020-04-06 15:35 ` [dpdk-dev] [PATCH v2 2/2] test/crypto: Add AES-256 DOCSIS test vectors Mairtin o Loingsigh
@ 2020-04-06 18:23   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 4+ messages in thread
From: De Lara Guarch, Pablo @ 2020-04-06 18:23 UTC (permalink / raw)
  To: O'loingsigh, Mairtin; +Cc: dev



> -----Original Message-----
> From: O'loingsigh, Mairtin <mairtin.oloingsigh@intel.com>
> Sent: Monday, April 6, 2020 4:36 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; O'loingsigh, Mairtin <mairtin.oloingsigh@intel.com>
> Subject: [PATCH v2 2/2] test/crypto: Add AES-256 DOCSIS test vectors
> 
> 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>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-06 18:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 15:35 [dpdk-dev] [PATCH v2 1/2] crypto/aesni_mb: support DOCSIS AES-256 Mairtin o Loingsigh
2020-04-06 15:35 ` [dpdk-dev] [PATCH v2 2/2] test/crypto: Add AES-256 DOCSIS test vectors Mairtin o Loingsigh
2020-04-06 18:23   ` De Lara Guarch, Pablo
2020-04-06 17:47 ` [dpdk-dev] [PATCH v2 1/2] crypto/aesni_mb: support DOCSIS AES-256 De Lara Guarch, Pablo

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).