DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/nitrox: add 3DES-CBC support
@ 2020-03-13 11:43 Nagadheeraj Rottela
  2020-03-25 18:48 ` Akhil Goyal
  0 siblings, 1 reply; 6+ messages in thread
From: Nagadheeraj Rottela @ 2020-03-13 11:43 UTC (permalink / raw)
  To: akhil.goyal; +Cc: dev, jsrikanth, Nagadheeraj Rottela

This patch adds 3DES CBC mode cipher algorithm.

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
---
 app/test/test_cryptodev.c                       |  1 +
 app/test/test_cryptodev_des_test_vectors.h      |  6 ++++--
 doc/guides/cryptodevs/features/nitrox.ini       |  1 +
 doc/guides/cryptodevs/nitrox.rst                |  2 ++
 drivers/crypto/nitrox/nitrox_sym.c              |  4 ++++
 drivers/crypto/nitrox/nitrox_sym_capabilities.c | 21 ++++++++++++++++++++-
 6 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 7b1ef5c86..e8dd8f754 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -13117,6 +13117,7 @@ static struct unit_test_suite cryptodev_nitrox_testsuite  = {
 		TEST_CASE_ST(ut_setup, ut_teardown,
 				test_device_configure_invalid_queue_pair_ids),
 		TEST_CASE_ST(ut_setup, ut_teardown, test_AES_chain_all),
+		TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_chain_all),
 
 		TEST_CASES_END() /**< NULL terminate unit test array */
 	}
diff --git a/app/test/test_cryptodev_des_test_vectors.h b/app/test/test_cryptodev_des_test_vectors.h
index 0a362d980..d8a62d2b5 100644
--- a/app/test/test_cryptodev_des_test_vectors.h
+++ b/app/test/test_cryptodev_des_test_vectors.h
@@ -1115,7 +1115,8 @@ static const struct blockcipher_test_case triple_des_chain_test_cases[] = {
 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
-			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
+			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2 |
+			BLOCKCIPHER_TEST_TARGET_PMD_NITROX
 	},
 	{
 		.test_descr = "3DES-192-CBC HMAC-SHA1 Decryption Digest Verify",
@@ -1129,7 +1130,8 @@ static const struct blockcipher_test_case triple_des_chain_test_cases[] = {
 			BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 			BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
-			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
+			BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2 |
+			BLOCKCIPHER_TEST_TARGET_PMD_NITROX
 	},
 	{
 		.test_descr = "3DES-192-CBC SHA1 Encryption Digest",
diff --git a/doc/guides/cryptodevs/features/nitrox.ini b/doc/guides/cryptodevs/features/nitrox.ini
index ddc3c05f4..183494731 100644
--- a/doc/guides/cryptodevs/features/nitrox.ini
+++ b/doc/guides/cryptodevs/features/nitrox.ini
@@ -20,6 +20,7 @@ OOP LB  In LB  Out     = Y
 AES CBC (128)  = Y
 AES CBC (192)  = Y
 AES CBC (256)  = Y
+3DES CBC       = Y
 
 ;
 ; Supported authentication algorithms of the 'nitrox' crypto driver.
diff --git a/doc/guides/cryptodevs/nitrox.rst b/doc/guides/cryptodevs/nitrox.rst
index f8a527c05..85f5212b6 100644
--- a/doc/guides/cryptodevs/nitrox.rst
+++ b/doc/guides/cryptodevs/nitrox.rst
@@ -18,6 +18,7 @@ Nitrox crypto PMD has support for:
 Cipher algorithms:
 
 * ``RTE_CRYPTO_CIPHER_AES_CBC``
+* ``RTE_CRYPTO_CIPHER_3DES_CBC``
 
 Hash algorithms:
 
@@ -29,6 +30,7 @@ Limitations
 -----------
 
 * AES_CBC Cipher Only combination is not supported.
+* 3DES Cipher Only combination is not supported.
 * Session-less APIs are not supported.
 
 Installation
diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c
index 56410c44d..c7aa3fd1b 100644
--- a/drivers/crypto/nitrox/nitrox_sym.c
+++ b/drivers/crypto/nitrox/nitrox_sym.c
@@ -314,6 +314,10 @@ get_flexi_cipher_type(enum rte_crypto_cipher_algorithm algo, bool *is_aes)
 		type = CIPHER_AES_CBC;
 		*is_aes = true;
 		break;
+	case RTE_CRYPTO_CIPHER_3DES_CBC:
+		type = CIPHER_3DES_CBC;
+		*is_aes = false;
+		break;
 	default:
 		type = CIPHER_INVALID;
 		NITROX_LOG(ERR, "Algorithm not supported %d\n", algo);
diff --git a/drivers/crypto/nitrox/nitrox_sym_capabilities.c b/drivers/crypto/nitrox/nitrox_sym_capabilities.c
index 47ceead73..dc4df9185 100644
--- a/drivers/crypto/nitrox/nitrox_sym_capabilities.c
+++ b/drivers/crypto/nitrox/nitrox_sym_capabilities.c
@@ -88,7 +88,26 @@ static const struct rte_cryptodev_capabilities nitrox_capabilities[] = {
 			}, }
 		}, }
 	},
-
+	{	/* 3DES CBC */
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+		{.sym = {
+			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+			{.cipher = {
+				.algo = RTE_CRYPTO_CIPHER_3DES_CBC,
+				.block_size = 8,
+				.key_size = {
+					.min = 24,
+					.max = 24,
+					.increment = 0
+				},
+				.iv_size = {
+					.min = 8,
+					.max = 8,
+					.increment = 0
+				}
+			}, }
+		}, }
+	},
 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };
 
-- 
2.13.6


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

* Re: [dpdk-dev] [PATCH] crypto/nitrox: add 3DES-CBC support
  2020-03-13 11:43 [dpdk-dev] [PATCH] crypto/nitrox: add 3DES-CBC support Nagadheeraj Rottela
@ 2020-03-25 18:48 ` Akhil Goyal
  2020-03-27  6:38   ` Nagadheeraj Rottela
  0 siblings, 1 reply; 6+ messages in thread
From: Akhil Goyal @ 2020-03-25 18:48 UTC (permalink / raw)
  To: Nagadheeraj Rottela; +Cc: dev, jsrikanth

> 
> This patch adds 3DES CBC mode cipher algorithm.
> 
> Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
> ---
Is it worth mentioning in release notes?


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

* Re: [dpdk-dev] [PATCH] crypto/nitrox: add 3DES-CBC support
  2020-03-25 18:48 ` Akhil Goyal
@ 2020-03-27  6:38   ` Nagadheeraj Rottela
  2020-04-01 14:08     ` Akhil Goyal
  0 siblings, 1 reply; 6+ messages in thread
From: Nagadheeraj Rottela @ 2020-03-27  6:38 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: dev, Srikanth Jampala

> -----Original Message-----
> From: Akhil Goyal <akhil.goyal@nxp.com>
> Sent: Thursday, March 26, 2020 12:18 AM
> To: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
> Cc: dev@dpdk.org; Srikanth Jampala <jsrikanth@marvell.com>
> Subject: [EXT] RE: [PATCH] crypto/nitrox: add 3DES-CBC support
> 
> External Email
> 
> ----------------------------------------------------------------------
> >
> > This patch adds 3DES CBC mode cipher algorithm.
> >
> > Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
> > ---
> Is it worth mentioning in release notes?

I added that description to avoid below checkpatch warning:

### crypto/nitrox: add 3DES-CBC support

WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

total: 0 errors, 1 warnings, 83 lines checked

0/1 valid patch


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

* Re: [dpdk-dev] [PATCH] crypto/nitrox: add 3DES-CBC support
  2020-03-27  6:38   ` Nagadheeraj Rottela
@ 2020-04-01 14:08     ` Akhil Goyal
  2020-04-03  9:20       ` Nagadheeraj Rottela
  0 siblings, 1 reply; 6+ messages in thread
From: Akhil Goyal @ 2020-04-01 14:08 UTC (permalink / raw)
  To: Nagadheeraj Rottela; +Cc: dev, Srikanth Jampala

> > ----------------------------------------------------------------------
> > >
> > > This patch adds 3DES CBC mode cipher algorithm.
> > >
> > > Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
> > > ---
> > Is it worth mentioning in release notes?
> 
> I added that description to avoid below checkpatch warning:
> 
> ### crypto/nitrox: add 3DES-CBC support
> 
> WARNING:COMMIT_MESSAGE: Missing commit description - Add an
> appropriate one
> 
> total: 0 errors, 1 warnings, 83 lines checked
> 
> 0/1 valid patch

I think you misinterpreted my comment.
I was talking about release notes and not patch description.


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

* Re: [dpdk-dev] [PATCH] crypto/nitrox: add 3DES-CBC support
  2020-04-01 14:08     ` Akhil Goyal
@ 2020-04-03  9:20       ` Nagadheeraj Rottela
  2020-04-05 17:02         ` Akhil Goyal
  0 siblings, 1 reply; 6+ messages in thread
From: Nagadheeraj Rottela @ 2020-04-03  9:20 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: dev, Srikanth Jampala

> -----Original Message-----
> From: Akhil Goyal <akhil.goyal@nxp.com>
> Sent: Wednesday, April 1, 2020 7:38 PM
> To: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
> Cc: dev@dpdk.org; Srikanth Jampala <jsrikanth@marvell.com>
> Subject: [EXT] RE: [PATCH] crypto/nitrox: add 3DES-CBC support
> 
> External Email
> 
> ----------------------------------------------------------------------
> > > --------------------------------------------------------------------
> > > --
> > > >
> > > > This patch adds 3DES CBC mode cipher algorithm.
> > > >
> > > > Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
> > > > ---
> > > Is it worth mentioning in release notes?
> >
> > I added that description to avoid below checkpatch warning:
> >
> > ### crypto/nitrox: add 3DES-CBC support
> >
> > WARNING:COMMIT_MESSAGE: Missing commit description - Add an
> > appropriate one
> >
> > total: 0 errors, 1 warnings, 83 lines checked
> >
> > 0/1 valid patch
> 
> I think you misinterpreted my comment.
> I was talking about release notes and not patch description.

I haven't added that description in the release notes.
I only added description in the Limitations section.

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

* Re: [dpdk-dev] [PATCH] crypto/nitrox: add 3DES-CBC support
  2020-04-03  9:20       ` Nagadheeraj Rottela
@ 2020-04-05 17:02         ` Akhil Goyal
  0 siblings, 0 replies; 6+ messages in thread
From: Akhil Goyal @ 2020-04-05 17:02 UTC (permalink / raw)
  To: Nagadheeraj Rottela; +Cc: dev, Srikanth Jampala

> > > > --
> > > > >
> > > > > This patch adds 3DES CBC mode cipher algorithm.
> > > > >
> > > > > Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
> > > > > ---
> > > > Is it worth mentioning in release notes?
> > >
> > > I added that description to avoid below checkpatch warning:
> > >
> > > ### crypto/nitrox: add 3DES-CBC support
> > >
> > > WARNING:COMMIT_MESSAGE: Missing commit description - Add an
> > > appropriate one
> > >
> > > total: 0 errors, 1 warnings, 83 lines checked
> > >
> > > 0/1 valid patch
> >
> > I think you misinterpreted my comment.
> > I was talking about release notes and not patch description.
> 
> I haven't added that description in the release notes.
> I only added description in the Limitations section.

OK, it seems you do not want to add this in release notes.

Applied to dpdk-next-crypto

Thanks.

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

end of thread, other threads:[~2020-04-05 17:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-13 11:43 [dpdk-dev] [PATCH] crypto/nitrox: add 3DES-CBC support Nagadheeraj Rottela
2020-03-25 18:48 ` Akhil Goyal
2020-03-27  6:38   ` Nagadheeraj Rottela
2020-04-01 14:08     ` Akhil Goyal
2020-04-03  9:20       ` Nagadheeraj Rottela
2020-04-05 17:02         ` Akhil Goyal

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