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 AB44DA0524 for ; Fri, 4 Jun 2021 07:10:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F3744003C; Fri, 4 Jun 2021 07:10:03 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 64F154003C for ; Fri, 4 Jun 2021 07:10:02 +0200 (CEST) Received: from mail-qk1-f200.google.com ([209.85.222.200]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lp25q-0006Ue-21 for stable@dpdk.org; Fri, 04 Jun 2021 05:10:02 +0000 Received: by mail-qk1-f200.google.com with SMTP id s20-20020ae9f7140000b02903a98afb6313so5795156qkg.21 for ; Thu, 03 Jun 2021 22:10:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZelLAMYgvnwwg3TrEH3ucf8vhgopwI4By84Aa60ToHo=; b=qyG+EMbO6wh4gQRkwikXUHban/R08kGBzcURYd34vwNGOKCQ0HtHcv685NkgInMMSA agqwWsBtsOfCbaGN9dOYGkQJpnBMjTQXYhjOZU+Zv7qnKAvvMBkFStVI4m1GducIrlWg n2KzMYnjhgBo+a1FVJRo1zXpW9mAtxQOuQcrM5iv0QZTj1tB/qY2LssaUSCNaapiqntM PexO8KEjkWta2+05m1OUqm1LVDPloEM8l1H8IOCQ093zEPrEsDRgOe4sRo1ioLu7hApX 4F1NHjQW9ex/YMOaq7B/PDyK2jg123lhlScd5B3YWPZCLcnprRSqHARWdyHOnS7s5m+O SYFQ== X-Gm-Message-State: AOAM531auWaMVDIThzVMYFfBK33S186t1QLlWrft7kH+F5FVwK9dhDis l98NH8yqZ/jaLkiKwNNXayLDwS5PJjhNmonbsVqupLnqwxcUkkDq4gKa545vlc09ER7kW6F9IAC ipcCEGRj6DdIjDlOqAKUC3TRV8N+sCjkU4nZqAN5P X-Received: by 2002:a05:6214:2467:: with SMTP id im7mr3083599qvb.59.1622783401185; Thu, 03 Jun 2021 22:10:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXBFc2v36FrQPeWcHNmnn9Je3BiRBDDqTZOPcYREi0GN4kpr3kqpeHx9qaHDCS1ycqN0JarLKwf4+8y+vzMZs= X-Received: by 2002:a05:6214:2467:: with SMTP id im7mr3083589qvb.59.1622783400997; Thu, 03 Jun 2021 22:10:00 -0700 (PDT) MIME-Version: 1.0 References: <20210603121728.30576-1-hemant.agrawal@nxp.com> In-Reply-To: <20210603121728.30576-1-hemant.agrawal@nxp.com> From: Christian Ehrhardt Date: Fri, 4 Jun 2021 07:09:35 +0200 Message-ID: To: Hemant Agrawal Cc: dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [19.11 PATCH] crypto/dpaa_sec: affine the thread portal affinity 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" On Thu, Jun 3, 2021 at 2:19 PM Hemant Agrawal wrote: > > 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") > Cc: stable@dpdk.org > > Signed-off-by: Hemant Agrawal Applied to 19.11.x - thanks! > --- > 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..6e454273ee 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(!RTE_PER_LCORE(dpaa_io))) { > + 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(!RTE_PER_LCORE(dpaa_io))) { > + 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.17.1 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd