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 DF03F235 for ; Tue, 21 Nov 2017 14:26:44 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8128B20B60; Tue, 21 Nov 2017 08:26:44 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:26:44 -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=xT+KSedoBKJd7++pQ dMaf+w9iyJnhwSi9evObLGWsjQ=; b=GA1H5/myNvGg5NHuI5f61FozrpuCpS+U5 b3wh2amKx3KU9s73MQ6am6E/dKtCZD3vM/FSD1rFwJmZvPV1iAP714I/FjsmZdE5 G7JJLGufaHgfXPN4d2MwcYRSDUv9lf2VcVLUStFs1tR1aMf5/x7ZSV99NJWaKa3R PR09BAz3w4FyjTtJIou9AT9NDStK4veG5F/VmlqxqJZrLP+6w3qfsB/4pqpSdCAm IK6Q2lOvxbsHxTSPx8bzxb+AnIoUeOJXUkhqrT++MhWgm11N80/RzNHXpRzHrCgI HJnWvyXCu0KxBx1GIMhvbC6WjDhtyI+IVErQVvooJW24Xz0Edlbig== 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=xT+KSedoBKJd7++pQdMaf+w9iyJnhwSi9evObLGWsjQ=; b=FAkU88aH ai7LhAs2jGIuMvW55oGsus3II6ge/kORHZVajrrfouWG58cXHDLUDk7RrOKmzip0 QuDW/uKgxpmDNenfezhYNoG1Yr3F4wguDk9UKsXPilfboxTJ0vQUaCyXAdGLW68W yiTp3F37QGMbA0kZxmV+KoJ2j/1ODWfeJTDRTMzxq9Kzs3q78q0Qf6t+xWQYkBwf aG5g9Yh4IkH0FojrexDOCUvMMDWBi9NmcvzITYdtvEQtI+CYbndk+HQBJbOPMVav PXJC+lNhVPoJvh9HCBj7i6+MQtQqjCoggmSlBZoPt1pR8QChe3J8rctKOA05zOkd 5tI9+1mzJ7rK+w== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 581C2243B9; Tue, 21 Nov 2017 08:26:39 -0500 (EST) From: Yuanhan Liu To: Pablo de Lara Cc: Fan Zhang , dpdk stable Date: Tue, 21 Nov 2017 21:17:38 +0800 Message-Id: <1511270333-31002-116-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 'crypto/openssl: fix AEAD parameters' 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:26:45 -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 a1dd2f047252c9187027998e5e4265ef666d24e2 Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Thu, 21 Sep 2017 14:11:17 +0100 Subject: [PATCH] crypto/openssl: fix AEAD parameters [ upstream commit 0d21bc3872ae1769cd4908d125e6666a0e04baae ] When using AES-GCM with OpenSSL, cipher direction and authentication operation were being set incorrectly, as the PMD was looking at the cipher and authentication transform, instead of the new AEAD. Fixes: b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms") Signed-off-by: Pablo de Lara Acked-by: Fan Zhang --- drivers/crypto/openssl/rte_openssl_pmd.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 0bd5f98..2bc1570 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -425,8 +425,15 @@ static int openssl_set_session_aead_parameters(struct openssl_session *sess, const struct rte_crypto_sym_xform *xform) { - /* Select cipher direction */ - sess->cipher.direction = xform->cipher.op; + /* Select cipher direction and auth operation */ + if (xform->aead.op == RTE_CRYPTO_AEAD_OP_ENCRYPT) { + sess->cipher.direction = RTE_CRYPTO_CIPHER_OP_ENCRYPT; + sess->auth.operation = RTE_CRYPTO_AUTH_OP_GENERATE; + } else { + sess->cipher.direction = RTE_CRYPTO_CIPHER_OP_DECRYPT; + sess->auth.operation = RTE_CRYPTO_AUTH_OP_VERIFY; + } + /* Select cipher key */ sess->cipher.key.length = xform->aead.key.length; @@ -434,10 +441,6 @@ openssl_set_session_aead_parameters(struct openssl_session *sess, sess->iv.offset = xform->aead.iv.offset; sess->iv.length = xform->aead.iv.length; - /* Select auth generate/verify */ - sess->auth.operation = xform->auth.op; - sess->auth.algo = xform->auth.algo; - /* Select auth algo */ switch (xform->aead.algo) { case RTE_CRYPTO_AEAD_AES_GCM: -- 2.7.4