[dpdk-dev,03/11] examples/ipsec-secgw: Fixed create session also for aead
Checks
Commit Message
From: Aviad Yehezkel <aviadye@mellanox.com>
Search for session also with aead key
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
---
examples/ipsec-secgw/ipsec.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Comments
On 10/14/2017 4:27 PM, aviadye@dev.mellanox.co.il wrote:
> From: Aviad Yehezkel <aviadye@mellanox.com>
>
> Search for session also with aead key
>
> Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
> ---
> examples/ipsec-secgw/ipsec.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
> index 0afb9d6..daa1d7b 100644
> --- a/examples/ipsec-secgw/ipsec.c
> +++ b/examples/ipsec-secgw/ipsec.c
> @@ -56,13 +56,17 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
>
> key.cipher_algo = (uint8_t)sa->cipher_algo;
> key.auth_algo = (uint8_t)sa->auth_algo;
> + key.aead_algo = (uint8_t)sa->aead_algo;
>
> ret = rte_hash_lookup_data(ipsec_ctx->cdev_map, &key,
> (void **)&cdev_id_qp);
> if (ret < 0) {
> RTE_LOG(ERR, IPSEC, "No cryptodev: core %u, cipher_algo %u, "
> - "auth_algo %u\n", key.lcore_id, key.cipher_algo,
> - key.auth_algo);
> + "auth_algo %u aead_algo %u\n",
> + key.lcore_id,
> + key.cipher_algo,
> + key.auth_algo,
> + key.aead_algo);
> return -1;
> }
>
Tested-by: Aviad Yehezkel <aviadye@mellanox.com>
> -----Original Message-----
> From: aviadye@dev.mellanox.co.il [mailto:aviadye@dev.mellanox.co.il]
> Sent: Saturday, October 14, 2017 2:28 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 03/11] examples/ipsec-secgw: Fixed create
> session also for aead
>
> From: Aviad Yehezkel <aviadye@mellanox.com>
>
> Search for session also with aead key
>
> Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com
...
%u, cipher_algo
> %u, "
> - "auth_algo %u\n", key.lcore_id,
> key.cipher_algo,
> - key.auth_algo);
> + "auth_algo %u aead_algo %u\n",
You are missing a comma between auth_algo and aead_algo.
Pablo
@@ -56,13 +56,17 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
key.cipher_algo = (uint8_t)sa->cipher_algo;
key.auth_algo = (uint8_t)sa->auth_algo;
+ key.aead_algo = (uint8_t)sa->aead_algo;
ret = rte_hash_lookup_data(ipsec_ctx->cdev_map, &key,
(void **)&cdev_id_qp);
if (ret < 0) {
RTE_LOG(ERR, IPSEC, "No cryptodev: core %u, cipher_algo %u, "
- "auth_algo %u\n", key.lcore_id, key.cipher_algo,
- key.auth_algo);
+ "auth_algo %u aead_algo %u\n",
+ key.lcore_id,
+ key.cipher_algo,
+ key.auth_algo,
+ key.aead_algo);
return -1;
}