From patchwork Mon Apr 2 07:36:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 132651 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp2290305ljb; Mon, 2 Apr 2018 00:39:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+87ScLz9kZAnys4OrUzSTWE5e4IOHYZXVVdHzOY8ci+YWb5ML4MgMhpNk/GkaPdhngXgEW X-Received: by 10.28.211.3 with SMTP id k3mr49211wmg.39.1522654753048; Mon, 02 Apr 2018 00:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522654753; cv=none; d=google.com; s=arc-20160816; b=MizAQp7YVcP7HqMcFTWXxU0Jlx90eYsA54FLv4cYOhx3t2RvwCPoTgI/2bzWzsxcH7 vlVpnBQyC4N3GMWpKZpY3kR6LgyEyilAbfm584eyYBY9F/RtevCvUehbIMMizSkqN2Mw XSuFq4XCtnLI+L7IvIfMSpW2mTE3RzGHVlg3PPddIEfmUopaRUoEQM9M8Bre3LfF3L+/ 0dDAbwQErpaR60eVDR0V33U1TUPB2vqor4quJIoCMLz/XR7/VE396cbhxPPLURWLiY/E G3XX6py9IHWYX0YimRYJg9E2evXQcUfWESRt5yM78wt06C6+StEOGcxtZlPTLQ+7Iuhz deQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=WP4NXAF9Ayii9D9pSAi0ZoUd2By3WRhKBiDPMzsmD5Q=; b=Nr7flUYGG4K6kdh3dAXrDik8AeKNPooxgF4jzzU+G+OFiZHhMT0VU0G5VySTLp5ngP 4mFGAZhKxPwjiOZih0xziKhX9+hvUMyMJMQUenFka/ZusCCY6WMO1ALJYQY+s2q2whxI CxEICp6lqLciYIMBCo0E756+Hf2So/++0CpcgdWrhpG5M8KNBGbP5+On96GYpgMZ+KOu Nadi8tiRh/Clwkdwb/IPKitHXnmdUjS+v8jI7TGy7KL8le04CwSJqsUDhuBXOeL4gNhm Ka5rMy9Y59xp9+tUK06IDIj+YwICk+9IrpFn/XCeoEgzhRPaZcd5vDkAFbe1beO33ngx rLug== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=q2PNfWo7; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id c129si10997wmh.277.2018.04.02.00.39.12; Mon, 02 Apr 2018 00:39:13 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=q2PNfWo7; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7FF94AACD; Mon, 2 Apr 2018 09:38:36 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0051.outbound.protection.outlook.com [104.47.0.51]) by dpdk.org (Postfix) with ESMTP id 407A2AABD for ; Mon, 2 Apr 2018 09:38:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=WP4NXAF9Ayii9D9pSAi0ZoUd2By3WRhKBiDPMzsmD5Q=; b=q2PNfWo7AgZFCMkvOe7tQzd00QG4/p1ca9qbb9dmJY/v/NRj7l9xjNnSRuOt295yBPawmd5auZfB2n7d2JOtvdHGuZiixy2JGL6jH7HRGVltSCg3qjZbbhWhXkP/6avf8P01/4OCrzeWMYbTagqfD2e669j+F94h/tE8WkCfhJM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0753.eurprd04.prod.outlook.com (2a01:111:e400:8411::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10; Mon, 2 Apr 2018 07:38:30 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, akhil.goyal@nxp.com Date: Mon, 2 Apr 2018 13:06:31 +0530 Message-Id: <1522654594-2757-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522654594-2757-1-git-send-email-hemant.agrawal@nxp.com> References: <1522152039-32493-1-git-send-email-hemant.agrawal@nxp.com> <1522654594-2757-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MA1PR0101CA0048.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::34) To AM2PR04MB0753.eurprd04.prod.outlook.com (2a01:111:e400:8411::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 17215ac8-353a-4869-c656-08d5986cbbbc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0753; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0753; 3:BlcBqu4OcSm7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byZ1q/wRDxCx5wbyNALzmWXnO4mci5yXMDGYJt2nC9kgSuzmT3d7xseFZr/FXjDbH7tyTdlwxlB3UkDnzi9FQWXyMM6qIjLOY7mzkqPSkBfyvIryE0Rzkxc4BZZPdhcvzGdcTZ8711qy42BZ9L0wx8+Vgig2dTakgWz+IB18qC7V3DpiEvKHuyGIxGpmzboL21+V6aKJ/b1BIAVdCnLqUIU9KGm9BYAdKueWP6pdAc1Tle1olKEC+ZniMktgT6xUiT7a859hZ2JUt1dFXsru/5dDWXwrrCSloMmIMyMT10DK2RroI5gi57NZh/ALhI3iN1DntyAj8MlvM/NR5LDUu2sxkRYGh18yzbj; 4:lQrNO3T+1AUJQdDu9rrKmvMp9R8yVH2ME+kbSW4BusZstvybbgvvF3nXcfOubQ1GTR9k+sO7gHJe+Y1ZbH4lDqtLNwDGqvvhjMmbw7zrWbftoV2kUvb1Nw2NbNuuXdTf1ZuWE4qwtoUu7Vr/TE8pbFhnF7eVOPT5PbZpvcHVR4Vmaw+iVXbPpZTtPbpvHOdaRxs87XJXrdMpSg9fbvFthff3ZejziUig27xLvRAN+ryuy55oMl/prB2kkB/J8HnxCvfpj5qH7Dcl06SKqSOdDi0PnRrL1MHvWcsJCNeO+6wpaVnEOz0pMAWRXhKEiW1tkM1EHRIr/KhLZ2f/cCxXezBZ+DdlevjnhINCUNkXBdc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0753; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0753; X-Forefront-PRVS: 0630013541 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(346002)(39380400002)(366004)(396003)(376002)(39860400002)(199004)(189003)(2616005)(106356001)(76176011)(68736007)(16526019)(50466002)(59450400001)(486005)(5009440100003)(55236004)(6116002)(48376002)(3846002)(11346002)(47776003)(16586007)(53936002)(66066001)(305945005)(316002)(386003)(6512007)(956004)(446003)(105586002)(7736002)(6506007)(186003)(486005)(2351001)(6916009)(26005)(476003)(5890100001)(4326008)(2361001)(36756003)(86362001)(478600001)(2906002)(5660300001)(8676002)(50226002)(8936002)(81156014)(81166006)(51416003)(6486002)(25786009)(97736004)(52116002)(110426004)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0753; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0753; 23:XoAJt+Tk4oAm6en+s86Ad0p1jAKazHyiQgcGpsU9g?= aEfDoI+EQPauDJGOrBlJTaU4fF9XZQDvbNMhCBIaIjUfOKgh8OQLFAilf+to3aHbmFxHUtMbI3wnx0il7M1ZrXZbBLhfPP1ib5gCM4hmTKQD03g2doakuUKdoV2cMBTSa1L5meDqpelr2d/hBenxI5cFUwqjHnJ6WsYD6LcVzeo7yae3M31iXBLySD4qTfSQ7sI3s7x4jXwTkVtl2HqcorSbHYwPZhSzshD10WavUvnDDn1VV2i7kzICNJpuPkXkwrZwGgB7sMnT6z0GcloabEnc52EhDkCaS7PZiAuWp7vNUm+Q9tCR1YSWVWVgsKAuvPgJHMsodeA2jQHhrDR/9J9k09cdq0/mKgktc2jEFT8H9y+Nvn5CmQTfe7i5seX4DLfchHgf8rum4zXhvsvJcPdGuvGHwyLgpiOetIZYfN8RPFgDHiG7o2tbOM+6mRtYWfaSGBA8wxag3bd0iYeESY0/F63leAEmMGp/Qa5YFgRhfU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LZDENbdNPSd8iPtfqeLgKtkWvknm8rmnM9UMXNYhR8EN7IEiTlBrQ21fgMEvpShs4pqQKygLUmB8AhhS89EwY/wZ5Fn0tomelyIw0Q1Xdp0ijHaCETP3M4/lq X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2018 07:38:30.5595 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 17215ac8-353a-4869-c656-08d5986cbbbc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0753 Subject: [dpdk-dev] [PATCH v2 5/8] crypto/dpaa_sec: fix to check the portal presence X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Ashish Jain Adding a check to do portal configuration if not already configured before packet enqueue. This check is only done during dpaa_sec_attach_sess_q for initial packets, so this change wont affect the data path and hence performance. Fixes: e79416d10fa3 ("crypto/dpaa_sec: support multiple sessions per queue pair") Cc: stable@dpdk.org Signed-off-by: Ashish Jain --- drivers/crypto/dpaa_sec/dpaa_sec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index c5191ce..eebb905 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -1759,7 +1759,13 @@ dpaa_sec_attach_sess_q(struct dpaa_sec_qp *qp, dpaa_sec_session *sess) PMD_DRV_LOG(ERR, "Unable to prepare sec cdb"); return -1; } - + if (unlikely(!RTE_PER_LCORE(dpaa_io))) { + ret = rte_dpaa_portal_init((void *)0); + if (ret) { + PMD_DRV_LOG(ERR, "Failure in affining portal"); + return ret; + } + } ret = dpaa_sec_init_rx(sess->inq, dpaa_mem_vtop(&sess->cdb), qman_fq_fqid(&qp->outq)); if (ret)