From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C9537A0613 for ; Wed, 28 Aug 2019 15:42:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BF3461C219; Wed, 28 Aug 2019 15:42:47 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 775B71C219 for ; Wed, 28 Aug 2019 15:42:46 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E256C85545; Wed, 28 Aug 2019 13:42:45 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-52.ams2.redhat.com [10.36.117.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id E75C04D3E; Wed, 28 Aug 2019 13:42:44 +0000 (UTC) From: Kevin Traynor To: Hemant Agrawal Cc: Akhil Goyal , dpdk stable Date: Wed, 28 Aug 2019 14:41:39 +0100 Message-Id: <20190828134234.20547-3-ktraynor@redhat.com> In-Reply-To: <20190828134234.20547-1-ktraynor@redhat.com> References: <20190828134234.20547-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 28 Aug 2019 13:42:45 +0000 (UTC) Subject: [dpdk-stable] patch 'crypto/dpaa2_sec: fix handling of session init failure' has been queued to LTS release 18.11.3 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 09/04/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/9e832db0f96f722ab085733f7c98abb179f2d11b Thanks. Kevin Traynor --- >From 9e832db0f96f722ab085733f7c98abb179f2d11b Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Wed, 17 Jul 2019 21:52:42 +0530 Subject: [PATCH] crypto/dpaa2_sec: fix handling of session init failure [ upstream commit c0ed103a027385f14f352d46ff5450826b2746b7 ] The session init shall return failure if the internal session create fails for any reasons. Fixes: 13273250eec5 ("crypto/dpaa2_sec: support AES-GCM and CTR") Signed-off-by: Hemant Agrawal Acked-by: Akhil Goyal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index a7973cc04..ae06438d4 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2194,4 +2194,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, { dpaa2_sec_session *session = sess; + int ret; PMD_INIT_FUNC_TRACE(); @@ -2209,5 +2210,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER && xform->next == NULL) { session->ctxt_type = DPAA2_SEC_CIPHER; - dpaa2_sec_cipher_init(dev, xform, session); + ret = dpaa2_sec_cipher_init(dev, xform, session); /* Authentication Only */ @@ -2215,5 +2216,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, xform->next == NULL) { session->ctxt_type = DPAA2_SEC_AUTH; - dpaa2_sec_auth_init(dev, xform, session); + ret = dpaa2_sec_auth_init(dev, xform, session); /* Cipher then Authenticate */ @@ -2221,5 +2222,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH) { session->ext_params.aead_ctxt.auth_cipher_text = true; - dpaa2_sec_aead_chain_init(dev, xform, session); + ret = dpaa2_sec_aead_chain_init(dev, xform, session); /* Authenticate then Cipher */ @@ -2227,10 +2228,10 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER) { session->ext_params.aead_ctxt.auth_cipher_text = false; - dpaa2_sec_aead_chain_init(dev, xform, session); + ret = dpaa2_sec_aead_chain_init(dev, xform, session); /* AEAD operation for AES-GCM kind of Algorithms */ } else if (xform->type == RTE_CRYPTO_SYM_XFORM_AEAD && xform->next == NULL) { - dpaa2_sec_aead_init(dev, xform, session); + ret = dpaa2_sec_aead_init(dev, xform, session); } else { @@ -2239,5 +2240,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, } - return 0; + return ret; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-08-28 14:32:31.957651850 +0100 +++ 0004-crypto-dpaa2_sec-fix-handling-of-session-init-failur.patch 2019-08-28 14:32:31.584958631 +0100 @@ -1 +1 @@ -From c0ed103a027385f14f352d46ff5450826b2746b7 Mon Sep 17 00:00:00 2001 +From 9e832db0f96f722ab085733f7c98abb179f2d11b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c0ed103a027385f14f352d46ff5450826b2746b7 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 0d273bb62..26458e5d1 100644 +index a7973cc04..ae06438d4 100644 @@ -22 +23 @@ -@@ -2166,4 +2166,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, +@@ -2194,4 +2194,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, @@ -28 +29 @@ -@@ -2181,5 +2182,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, +@@ -2209,5 +2210,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, @@ -35 +36 @@ -@@ -2187,5 +2188,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, +@@ -2215,5 +2216,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, @@ -42 +43 @@ -@@ -2193,5 +2194,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, +@@ -2221,5 +2222,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, @@ -49 +50 @@ -@@ -2199,10 +2200,10 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, +@@ -2227,10 +2228,10 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, @@ -62 +63 @@ -@@ -2211,5 +2212,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, +@@ -2239,5 +2240,5 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev,