[dpdk-dev,v2,3/6] examples/ipsec-secgw: fix aad_len for for aes-gcm

Message ID 1508439184-17893-3-git-send-email-aviadye@dev.mellanox.co.il (mailing list archive)
State Superseded, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Aviad Yehezkel Oct. 19, 2017, 6:53 p.m. UTC
  From: Aviad Yehezkel <aviadye@mellanox.com>

This cause auth failure issue

Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")
Cc: pablo.de.lara.guarch@intel.com

Issue: None
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
--
v2:
* Fix commit message
---
 examples/ipsec-secgw/sa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

De Lara Guarch, Pablo Oct. 20, 2017, 9:52 a.m. UTC | #1
> -----Original Message-----
> From: aviadye@dev.mellanox.co.il [mailto:aviadye@dev.mellanox.co.il]
> Sent: Thursday, October 19, 2017 7:53 PM
> To: dev@dpdk.org; Gonzalez Monroy, Sergio
> <sergio.gonzalez.monroy@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; aviadye@mellanox.com
> Cc: borisp@mellanox.com; akhil.goyal@nxp.com;
> hemant.agrawal@nxp.com; Nicolau, Radu <radu.nicolau@intel.com>;
> Doherty, Declan <declan.doherty@intel.com>; aviadye@dev.mellanox.co.il;
> liranl@mellanox.com; nelio.laranjeiro@6wind.com; thomas@monjalon.net
> Subject: [dpdk-dev][PATCH v2 3/6] examples/ipsec-secgw: fix aad_len for
> for aes-gcm
> 
> From: Aviad Yehezkel <aviadye@mellanox.com>
> 
> This cause auth failure issue
> 
> Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")
> Cc: pablo.de.lara.guarch@intel.com
> 
> Issue: None
> Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>

Same comments as in patch 1, and also fix the commit title
("for" duplicated) and avoid "_".

For the rest of the patch:

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  
Thomas Monjalon Oct. 20, 2017, 10:52 a.m. UTC | #2
20/10/2017 11:52, De Lara Guarch, Pablo:
> Same comments as in patch 1, and also fix the commit title
> ("for" duplicated) and avoid "_".

The underscore is forbidden in titles to avoid naming variable or
function names instead of giving a clear scope understandable
without digging in the code.
Here "aad_len" can probably be replaced by "AAD length".
  

Patch

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 7be0e62..ef94475 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -431,7 +431,7 @@  parse_sa_tokens(char **tokens, uint32_t n_tokens,
 			rule->aead_algo = algo->algo;
 			rule->cipher_key_len = algo->key_len;
 			rule->digest_len = algo->digest_len;
-			rule->aad_len = algo->key_len;
+			rule->aad_len = algo->aad_len;
 			rule->block_size = algo->block_size;
 			rule->iv_len = algo->iv_len;