[dpdk-dev] l2fwd-crypto: add SNOW3G algorithms

Message ID 1458652644-30754-1-git-send-email-pablo.de.lara.guarch@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

De Lara Guarch, Pablo March 22, 2016, 1:17 p.m. UTC
  Since SNOW3G UEA2/UIA2 are supported now by both HW and SW,
l2fwd-crypto may use them, extending the list of algorithms
parsed from command line.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Fiona Trahe March 22, 2016, 3:09 p.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Tuesday, March 22, 2016 1:17 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan; De Lara Guarch, Pablo
> Subject: [dpdk-dev] [PATCH] l2fwd-crypto: add SNOW3G algorithms
> 
> Since SNOW3G UEA2/UIA2 are supported now by both HW and SW, l2fwd-
> crypto may use them, extending the list of algorithms parsed from command
> line.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Acked-by: Fiona Trahe <fiona.trahe@intel.com>
  
De Lara Guarch, Pablo March 22, 2016, 5:41 p.m. UTC | #2
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Tuesday, March 22, 2016 1:17 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan; De Lara Guarch, Pablo
> Subject: [PATCH] l2fwd-crypto: add SNOW3G algorithms
> 
> Since SNOW3G UEA2/UIA2 are supported now by both HW and SW,
> l2fwd-crypto may use them, extending the list of algorithms
> parsed from command line.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Nack, need to change the data length/offset to bits.
  
De Lara Guarch, Pablo March 22, 2016, 9:23 p.m. UTC | #3
New cipher/authentication algorithms are supported in cryptodev,
so L2fwd-crypto needs to have the list of supported algorithms updated.

Changes in v2:
- Added other two algorithms
- Modified offset and length in bits for SNOW3G algorithms

Pablo de Lara (3):
  l2fwd-crypto: add SNOW3G algorithms
  l2fwd-crypto: add AES GCM in auth algo list
  l2fwd-crypto: add NULL in cipher/auth algo list

 examples/l2fwd-crypto/main.c | 59 ++++++++++++++++++++++++++++++++++++--------
 1 file changed, 49 insertions(+), 10 deletions(-)
  
Thomas Monjalon March 24, 2016, 7:53 p.m. UTC | #4
2016-03-22 21:23, Pablo de Lara:
> New cipher/authentication algorithms are supported in cryptodev,
> so L2fwd-crypto needs to have the list of supported algorithms updated.
> 
> Changes in v2:
> - Added other two algorithms
> - Modified offset and length in bits for SNOW3G algorithms
> 
> Pablo de Lara (3):
>   l2fwd-crypto: add SNOW3G algorithms
>   l2fwd-crypto: add AES GCM in auth algo list
>   l2fwd-crypto: add NULL in cipher/auth algo list

Applied, thanks
  

Patch

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 59f8c92..05cdd26 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -835,6 +835,9 @@  parse_cipher_algo(enum rte_crypto_cipher_algorithm *algo, char *optarg)
 	} else if (strcmp("AES_GCM", optarg) == 0) {
 		*algo = RTE_CRYPTO_CIPHER_AES_GCM;
 		return 0;
+	} else if (strcmp("SNOW3G_UEA2", optarg) == 0) {
+		*algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2;
+		return 0;
 	}
 
 	printf("Cipher algorithm  not supported!\n");
@@ -901,6 +904,9 @@  parse_auth_algo(enum rte_crypto_auth_algorithm *algo, char *optarg)
 	} else if (strcmp("SHA512_HMAC", optarg) == 0) {
 		*algo = RTE_CRYPTO_AUTH_SHA512_HMAC;
 		return 0;
+	} else if (strcmp("SNOW3G_UIA2", optarg) == 0) {
+		*algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2;
+		return 0;
 	}
 
 	printf("Authentication algorithm specified not supported!\n");