From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17198A0A02 for ; Mon, 17 May 2021 18:22:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DA1B410F1; Mon, 17 May 2021 18:22:07 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id F0F5A410F7 for ; Mon, 17 May 2021 18:22:05 +0200 (CEST) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lig0L-0000Tq-Gu; Mon, 17 May 2021 16:22:05 +0000 From: Christian Ehrhardt To: Hemant Agrawal Cc: dpdk stable Date: Mon, 17 May 2021 18:21:22 +0200 Message-Id: <20210517162125.3178901-18-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517162125.3178901-1-christian.ehrhardt@canonical.com> References: <20210517162125.3178901-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'crypto/dpaa_sec: affine the thread portal affinity' has been queued to stable release 19.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 stable release 19.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/19/21. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/3439157d98e7d73d51dc4829aeeb4a32858cef1d Thanks. Christian Ehrhardt --- >From 3439157d98e7d73d51dc4829aeeb4a32858cef1d Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Mon, 3 May 2021 14:09:53 +0530 Subject: [PATCH] crypto/dpaa_sec: affine the thread portal affinity [ upstream commit 22629f05f8832358d01872414e0e30c2c81e43d4 ] DPAA requires the I/O shall be done in a HW portal context only. The portal affinity is currently only being done in session create and config APIs with the assumption that same thread will be used for IO. This is causing issue. This patch add support during I/O to check the HW portal affinity and affine portal- if not affined already. Fixes: 9a984458f755 ("crypto/dpaa_sec: rewrite Rx/Tx path") Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa_sec/dpaa_sec.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index a650313cdb..021c8db847 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -1690,6 +1690,13 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, uint32_t index, flags[DPAA_SEC_BURST] = {0}; struct qman_fq *inq[DPAA_SEC_BURST]; + if (unlikely(!DPAA_PER_LCORE_PORTAL)) { + if (rte_dpaa_portal_init((void *)0)) { + DPAA_SEC_ERR("Failure in affining portal"); + return 0; + } + } + while (nb_ops) { frames_to_send = (nb_ops > DPAA_SEC_BURST) ? DPAA_SEC_BURST : nb_ops; @@ -1890,6 +1897,13 @@ dpaa_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops, uint16_t num_rx; struct dpaa_sec_qp *dpaa_qp = (struct dpaa_sec_qp *)qp; + if (unlikely(!DPAA_PER_LCORE_PORTAL)) { + if (rte_dpaa_portal_init((void *)0)) { + DPAA_SEC_ERR("Failure in affining portal"); + return 0; + } + } + num_rx = dpaa_sec_deq(dpaa_qp, ops, nb_ops); dpaa_qp->rx_pkts += num_rx; -- 2.31.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-17 17:40:37.462109590 +0200 +++ 0207-crypto-dpaa_sec-affine-the-thread-portal-affinity.patch 2021-05-17 17:40:29.595812816 +0200 @@ -1 +1 @@ -From 22629f05f8832358d01872414e0e30c2c81e43d4 Mon Sep 17 00:00:00 2001 +From 3439157d98e7d73d51dc4829aeeb4a32858cef1d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 22629f05f8832358d01872414e0e30c2c81e43d4 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 43363ba6ba..19d4684e24 100644 +index a650313cdb..021c8db847 100644 @@ -25 +26 @@ -@@ -1717,6 +1717,13 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, +@@ -1690,6 +1690,13 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, @@ -39 +40 @@ -@@ -1917,6 +1924,13 @@ dpaa_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops, +@@ -1890,6 +1897,13 @@ dpaa_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,