examples/ipsec-secgw: fix session creation
authorAviad Yehezkel <aviadye@mellanox.com>
Tue, 24 Oct 2017 12:48:58 +0000 (15:48 +0300)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 25 Oct 2017 16:11:00 +0000 (18:11 +0200)
Search for session also with AEAD algorithms.

Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")
Cc: stable@dpdk.org
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
examples/ipsec-secgw/ipsec.c

index 0afb9d6..36fb8c8 100644 (file)
@@ -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;
        }