From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 38AE1235 for ; Tue, 21 Nov 2017 14:27:49 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E0A2320AF5; Tue, 21 Nov 2017 08:27:48 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:27:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=E84enMPAlhhWaJTHU TtdSeWcfHmK5m1MN4Wdb3s9FVM=; b=DFT/weYvvNq3gRYGZMhS7gpqRj9sERZxb KC8pH8Lrp3mf85Hi6TtzExlEriAAr/SwdHCqEl4FVihzuGsgVIKWWdgmFuc/I0gb 4JyXf9rhD33Qxv/JcghYcMd4D/c6wmmTPyUY0aSR+9KJ+uE2YmbnalPumruSCFhc g/MwgJ6XGOfgF+Xy/LM/i/Kjmd1bLIOxSjlQjx0npXudGsTgVne3SaAcUPiDkBR/ czZeEmBy15hYQnwC6QczK0zayCBgGghNAb+RY9tUXh/6cfv352RGm3bV6HrnXuQf 6ow1r98gS/LFuoIruch3PQqINgshE0mlYOz0TgDQWai6QpGVja9dQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=E84enMPAlhhWaJTHUTtdSeWcfHmK5m1MN4Wdb3s9FVM=; b=mJAgZ0DC A3/ksMo4wg3kC8n7pIZYb6vn1yyGJ8DRGfY2XInJezZwyQEDhN/kyMj7VBJ9egua T0e8l8hBjazQbxDv6pL797UTqeW05obBP1/8sGQbWgGtnzPv0ERyXJPGTzETElWE Fm+V0Udq0dCcFN6SvvQww02KB57Bxx3Ay6lRleWGyNoBlJvwXlBteAokyiaPKo6p AoBUA44g6fBp5jv71QmOuxAyZg2v6zC+cbEr3lV6pM/tUP8c+0yXT46O9y8TWa+7 J/3ojeXfSTzAKMOgOcY3pAwm/DBhlC66QxiT8n4lVRSPGXUT9R1nD4pLgJIuUzXE 9WPvgRBVs14I4Q== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 0FA4624810; Tue, 21 Nov 2017 08:27:45 -0500 (EST) From: Yuanhan Liu To: Aviad Yehezkel Cc: Radu Nicolau , Pablo de Lara , dpdk stable Date: Tue, 21 Nov 2017 21:17:56 +0800 Message-Id: <1511270333-31002-134-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'examples/ipsec-secgw: fix crypto device mapping' has been queued to stable release 17.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Nov 2017 13:27:49 -0000 Hi, FYI, your patch has been queued to stable release 17.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 4dae0331ced1aa154aefd706bb19950a404f553b Mon Sep 17 00:00:00 2001 From: Aviad Yehezkel Date: Tue, 24 Oct 2017 15:48:57 +0300 Subject: [PATCH] examples/ipsec-secgw: fix crypto device mapping [ upstream commit 15f81cbf65d361e0b922e0d86db381084a2a5124 ] AEAD algorithms were not being added in the mapping between algorithms and crypto devices, only cipher and authentication chained algorithms. Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters") Signed-off-by: Aviad Yehezkel Acked-by: Radu Nicolau Acked-by: Pablo de Lara --- examples/ipsec-secgw/ipsec-secgw.c | 13 +++++++++++-- examples/ipsec-secgw/ipsec.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 99dc270..b431a63 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -1113,7 +1113,8 @@ add_mapping(struct rte_hash *map, const char *str, uint16_t cdev_id, uint16_t qp, struct lcore_params *params, struct ipsec_ctx *ipsec_ctx, const struct rte_cryptodev_capabilities *cipher, - const struct rte_cryptodev_capabilities *auth) + const struct rte_cryptodev_capabilities *auth, + const struct rte_cryptodev_capabilities *aead) { int32_t ret = 0; unsigned long i; @@ -1124,6 +1125,8 @@ add_mapping(struct rte_hash *map, const char *str, uint16_t cdev_id, key.cipher_algo = cipher->sym.cipher.algo; if (auth) key.auth_algo = auth->sym.auth.algo; + if (aead) + key.aead_algo = aead->sym.aead.algo; ret = rte_hash_lookup(map, &key); if (ret != -ENOENT) @@ -1192,6 +1195,12 @@ add_cdev_mapping(struct rte_cryptodev_info *dev_info, uint16_t cdev_id, if (i->op != RTE_CRYPTO_OP_TYPE_SYMMETRIC) continue; + if (i->sym.xform_type == RTE_CRYPTO_SYM_XFORM_AEAD) { + ret |= add_mapping(map, str, cdev_id, qp, params, + ipsec_ctx, NULL, NULL, i); + continue; + } + if (i->sym.xform_type != RTE_CRYPTO_SYM_XFORM_CIPHER) continue; @@ -1204,7 +1213,7 @@ add_cdev_mapping(struct rte_cryptodev_info *dev_info, uint16_t cdev_id, continue; ret |= add_mapping(map, str, cdev_id, qp, params, - ipsec_ctx, i, j); + ipsec_ctx, i, j, NULL); } } diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h index da1fb1b..7d057ae 100644 --- a/examples/ipsec-secgw/ipsec.h +++ b/examples/ipsec-secgw/ipsec.h @@ -150,6 +150,7 @@ struct cdev_key { uint16_t lcore_id; uint8_t cipher_algo; uint8_t auth_algo; + uint8_t aead_algo; }; struct socket_ctx { -- 2.7.4