* [dpdk-dev] [PATCH 0/3] L2fwd-crypto fixes
@ 2017-07-18 7:58 Pablo de Lara
2017-07-18 7:58 ` [dpdk-dev] [PATCH 1/3] examples/l2fwd-crypto: fix digest length Pablo de Lara
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Pablo de Lara @ 2017-07-18 7:58 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara
After the changes added to include AEAD algorithm
specific parameters, there were some parameters
that were being set wrong or not even set.
Pablo de Lara (3):
examples/l2fwd-crypto: fix digest length
examples/l2fwd-crypto: fix AEAD IV setting
examples/l2fwd-crypto: fix AEAD key setting
examples/l2fwd-crypto/main.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
--
2.9.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 1/3] examples/l2fwd-crypto: fix digest length
2017-07-18 7:58 [dpdk-dev] [PATCH 0/3] L2fwd-crypto fixes Pablo de Lara
@ 2017-07-18 7:58 ` Pablo de Lara
2017-07-18 7:58 ` [dpdk-dev] [PATCH 2/3] examples/l2fwd-crypto: fix AEAD IV setting Pablo de Lara
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Pablo de Lara @ 2017-07-18 7:58 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara
Digest length was not being set when using authentication
algorithms.
Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
examples/l2fwd-crypto/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 84b727b..664e0e0 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -752,6 +752,8 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
port_cparams[i].hash_verify = 0;
port_cparams[i].auth_algo = options->auth_xform.auth.algo;
+ port_cparams[i].digest_length =
+ options->auth_xform.auth.digest_length;
/* Set IV parameters */
if (options->auth_iv.length) {
options->auth_xform.auth.iv.offset =
--
2.9.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/3] examples/l2fwd-crypto: fix AEAD IV setting
2017-07-18 7:58 [dpdk-dev] [PATCH 0/3] L2fwd-crypto fixes Pablo de Lara
2017-07-18 7:58 ` [dpdk-dev] [PATCH 1/3] examples/l2fwd-crypto: fix digest length Pablo de Lara
@ 2017-07-18 7:58 ` Pablo de Lara
2017-07-18 7:58 ` [dpdk-dev] [PATCH 3/3] examples/l2fwd-crypto: fix AEAD key setting Pablo de Lara
2017-07-19 8:05 ` [dpdk-dev] [PATCH 0/3] L2fwd-crypto fixes De Lara Guarch, Pablo
3 siblings, 0 replies; 5+ messages in thread
From: Pablo de Lara @ 2017-07-18 7:58 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara
IV was not being set for AEAD algorithms.
Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
examples/l2fwd-crypto/main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 664e0e0..da2f509 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -764,6 +764,11 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
}
if (port_cparams[i].do_aead) {
+ port_cparams[i].aead_iv.data = options->aead_iv.data;
+ port_cparams[i].aead_iv.length = options->aead_iv.length;
+ if (!options->aead_iv_param)
+ generate_random_key(port_cparams[i].aead_iv.data,
+ port_cparams[i].aead_iv.length);
port_cparams[i].aead_algo = options->aead_xform.aead.algo;
port_cparams[i].digest_length =
options->aead_xform.aead.digest_length;
--
2.9.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 3/3] examples/l2fwd-crypto: fix AEAD key setting
2017-07-18 7:58 [dpdk-dev] [PATCH 0/3] L2fwd-crypto fixes Pablo de Lara
2017-07-18 7:58 ` [dpdk-dev] [PATCH 1/3] examples/l2fwd-crypto: fix digest length Pablo de Lara
2017-07-18 7:58 ` [dpdk-dev] [PATCH 2/3] examples/l2fwd-crypto: fix AEAD IV setting Pablo de Lara
@ 2017-07-18 7:58 ` Pablo de Lara
2017-07-19 8:05 ` [dpdk-dev] [PATCH 0/3] L2fwd-crypto fixes De Lara Guarch, Pablo
3 siblings, 0 replies; 5+ messages in thread
From: Pablo de Lara @ 2017-07-18 7:58 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara
AEAD key was being set using the cipher key parameters,
instead of the AEAD key parameters.
Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
examples/l2fwd-crypto/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index da2f509..8d4a10a 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2038,7 +2038,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
* is supported by the algorithm chosen.
*/
} else if (options->aead_key_random_size != -1) {
- if (check_supported_size(options->ckey_random_size,
+ if (check_supported_size(options->aead_key_random_size,
cap->sym.aead.key_size.min,
cap->sym.aead.key_size.max,
cap->sym.aead.key_size.increment)
@@ -2047,7 +2047,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
return -1;
}
options->aead_xform.aead.key.length =
- options->ckey_random_size;
+ options->aead_key_random_size;
/* No size provided, use minimum size. */
} else
options->aead_xform.aead.key.length =
--
2.9.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 0/3] L2fwd-crypto fixes
2017-07-18 7:58 [dpdk-dev] [PATCH 0/3] L2fwd-crypto fixes Pablo de Lara
` (2 preceding siblings ...)
2017-07-18 7:58 ` [dpdk-dev] [PATCH 3/3] examples/l2fwd-crypto: fix AEAD key setting Pablo de Lara
@ 2017-07-19 8:05 ` De Lara Guarch, Pablo
3 siblings, 0 replies; 5+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-19 8:05 UTC (permalink / raw)
To: Doherty, Declan; +Cc: dev
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Tuesday, July 18, 2017 8:58 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH 0/3] L2fwd-crypto fixes
>
> After the changes added to include AEAD algorithm specific parameters,
> there were some parameters that were being set wrong or not even set.
>
> Pablo de Lara (3):
> examples/l2fwd-crypto: fix digest length
> examples/l2fwd-crypto: fix AEAD IV setting
> examples/l2fwd-crypto: fix AEAD key setting
>
> examples/l2fwd-crypto/main.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> --
> 2.9.4
Applied to dpdk-next-crypto.
Pablo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-19 8:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-18 7:58 [dpdk-dev] [PATCH 0/3] L2fwd-crypto fixes Pablo de Lara
2017-07-18 7:58 ` [dpdk-dev] [PATCH 1/3] examples/l2fwd-crypto: fix digest length Pablo de Lara
2017-07-18 7:58 ` [dpdk-dev] [PATCH 2/3] examples/l2fwd-crypto: fix AEAD IV setting Pablo de Lara
2017-07-18 7:58 ` [dpdk-dev] [PATCH 3/3] examples/l2fwd-crypto: fix AEAD key setting Pablo de Lara
2017-07-19 8:05 ` [dpdk-dev] [PATCH 0/3] L2fwd-crypto fixes 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).