From patchwork Tue Mar 27 12:00:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 132476 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp4988245ljb; Tue, 27 Mar 2018 05:03:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELuTL8z5Mo0kzWVlhKaMDRbc3ElB4LqydXbnkh3v2WB1OAHZnwywWQXEeqLTgFYC3Z7jvoJI X-Received: by 10.28.158.205 with SMTP id h196mr16903773wme.25.1522152229778; Tue, 27 Mar 2018 05:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522152229; cv=none; d=google.com; s=arc-20160816; b=NS4NwkcVv+rWmbKsZ/MyGsyQlZspFzkiffPHJpkRDDwE0IwX55/m0TvIBPIgdtCzkw IGUUet67Bc0jzJj3xHsr1MqJRxEsuBeEx7XBT62E/F/3vYhp4MsobM8j9h6SkwIBtdWb hPegbqgTP2z+dVJn+fiT/c2KDTywNmdxwkXIt3frxLa+cEaBFJjbb9ZMzcMxSpZ7ypW6 HQmZ32SIOLc4x7DWapXS8Ti048Dige96OnkR0DYeuiHU7elEHkYgHTgoYsudVomMZFLp eu2+4yqd14Ykhq0LrhFrwgDW91gK5QRr4npa54W6dj+73H1hvOPUx/pGQ0qEuBU5r+kZ fYJw== 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=Ph3wK35MHGDqZ1VUrnTu3tNtQeXovaiY6m4gchNfmjxnV84P3rUizby7S1UC2D8mvN efH8ntFt5SZTrC5mEPWU9n4k+m2x3EW8gpqH4mVmlKdsNtc0XXh9ux3M+LBUN76Js87i m5eI8FnnUOVNWxlexxEH9hmqeWWOw+EI6zwvkJit4UHbZ6oiGkR21MSkXqHzZ65dPjrW EsvlVraa5uyt2D+ShopnLzA2UwYFG+PyGO3MaDV9HtC7njhbBszaEvr4uNeMKvwc0xQI KJuUcJXF5RQPB9caXGprQQSid/IibsCqmyFiN5nJW3wH9tn6nkwXNQC6M/tT36aCBNXn c2nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=QyHmP9xp; 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 v185si929471wmd.154.2018.03.27.05.03.49; Tue, 27 Mar 2018 05:03:49 -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=QyHmP9xp; 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 AC6344C8F; Tue, 27 Mar 2018 14:02:53 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0059.outbound.protection.outlook.com [104.47.0.59]) by dpdk.org (Postfix) with ESMTP id 8CF6D4CB3 for ; Tue, 27 Mar 2018 14:02:50 +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=QyHmP9xpVwlI8K9V/qiWlQk20mnOFDGvbALnzklPSR9epHG3hx7y2cz5OM6poOEn0+tfokMoVAKUHt+WAF3bXUqy3hFZlvKoGMnyxRhmXlFn4zKtDBoOQIT0BqyJf992MTyH7hVVApbXjdM1aguutbVSmUAZi1oDPXQne2pYyz0= 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; Tue, 27 Mar 2018 12:02:47 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, akhil.goyal@nxp.com Date: Tue, 27 Mar 2018 17:30:37 +0530 Message-Id: <1522152039-32493-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522152039-32493-1-git-send-email-hemant.agrawal@nxp.com> References: <1522152039-32493-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MA1PR0101CA0016.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::26) 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: b721748c-af58-4090-c19e-08d593daa8b7 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:5ZxcvHZUYzdhXaOqbOgaBqTqrA2Np1o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RgxV0T3P57IxiLc9iHqcsH/+TR9ndnNF7L9wgaVC0qG8Kl/vsrut8xU9EJmQPelLxBw5zRKo77/1di8KSdel40EyhmHJJ0SJ9F12LXVN396285Giwlaoy0AbBt2E7EatRhdJaIfoN05azL9BZi/itfE58lDokh5lPGxgR7hZEN0uaWUOWsyzTomY7OVIa93xTgXP6TMgZJ9lNo6GJeoV1mdm8Ko7fssCO8VRUI9MnAdJuTlszIJC6aM1W5gla5fyyv24ZIGuhBN1cqGvDf1VWxsSSBcXxD7wuxHt1hW1wusd7a8NnJ6qTrHgmDc4TX+VtuLUz5yUscJnImquVxbMB/; 4:tYWucUH3xauQo81B1P9tpiS2iGkTVnibq+DfISfJLuqfGMv9rsYX+2bsACSC5KUw7dTxBpdalEp5iGTtDlI22lhBYNFJE9MWiIfYo0A45HDMUYmyLXlKy2DeME1GJcKU9sDfKQSU7esGcSJKr5uDI9yypefy4STUqpMp8t7Og6bpG/FfcqKsu7T2bKJ8DmPL4ri2KkTZe2/i4NelESjGQSEnJ4sxyVzTaRdPZ5vYT/OPA2XTaIRMeuaLyRzwCXoR8PfYtAkfGWJfM7K5lRgWCNVu9ADsK+VVXSTpSiS1VtMc5otH0G4GvjbNdkM+HhTfB5w3Mmge7ogtnwGA1IlUsoW6x7ksAKRP7DPU4O9Dcx4= 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)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0753; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0753; X-Forefront-PRVS: 0624A2429E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(346002)(39380400002)(39860400002)(376002)(366004)(189003)(199004)(50466002)(6506007)(186003)(11346002)(59450400001)(16526019)(446003)(386003)(26005)(53936002)(55236004)(6116002)(48376002)(5009440100003)(3846002)(66066001)(68736007)(316002)(16586007)(6512007)(476003)(2351001)(47776003)(486005)(76176011)(486005)(956004)(105586002)(2616005)(305945005)(6666003)(7736002)(6916009)(106356001)(4326008)(2361001)(5890100001)(97736004)(52116002)(86362001)(8676002)(8936002)(2906002)(81156014)(81166006)(478600001)(5660300001)(51416003)(36756003)(6486002)(50226002)(25786009)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0753; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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:Izu5dJ4qKCvwkl6l6YU1qE0FAHWrHmiXx45EAE95J?= bl+ltTpGXAjZXyiSkuQleBI1IG1O/UbA87Ftq7b5LEgIgdX8cAXir5t/oCAdyvUBS5Z8+hFMDgXMz/2s5XM0tCJ1P/xmlbvIEoLv7lOEttG3eAJVjEjR8Ka0CKSYEqLmPpr5DbwDO6REy1kWt70OwEJlJfXFOwc1XSQWnGLhzAiMYWQoH1NKK9hpr5YNEGNA68Z60H9LByVEgaIyTB2w93NEnqD0B5wujd7gusoW8waiR1ShiqRGEvt9Ht8IjoSwjxCYtqCWMK8rqRyrnSEUNU+tR3Rx1ZZPYhUiIacZu30X5ltPxdseIMNOy6VAldMSRNmZw3Pr64LJXAk7rX+S+23JLMUEQCtR3FQyGk4oL2hsVSrqLWmp0Cn6UqhW2bNoUUyDsrZBIEzq3NgdNBT8CO6s7nuNUBs+qhvRzKZRyNEWGH+nPLCvb6cUoHHGbUHBHxnSAtxpJO/xjcV34MtxZmyhPeJiUM8U90PK8MLN0QAI/KcYf9kCwfsqv3P1UcRGCxN1iw9ELs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aJmjV44HREPQo79GNZasHpHYdZID9BRcp2Y9Wyah+rGLVgW7rSVzOEgka9acBmM/DqhYPnOBqvazoxnOcd5nrLjN0p3/w6rQCPo6fzWA+wO+GtNRF6IBClMmMPWqUrYhbDyaRbBMvrbNabQnDE7iOMZJ71rZEHWHrdnWE7mPNLeM6kok2atvy8xvdo8Jo7yIu7dLktMT0svAmGbk2aiPku6SPlV6AeYNwtJ0jQIr+B6yAqwH45xu6OdkA2mmeC21/0LagcDMLGzYgTR82MYkHdjGOVzH0qlIWHCdiQz3NCQQCcz3HSlsSN0DFD9wXHRGab42mFicMuUio1cwI00ySJVN0+PbKHYFF/r7sgzWjFxLZQE2wLRxIq/tLDiKJoByqAVGN+GIfSRbJydvhe9lDy9mybdQe03SIHeOpetKyF6m+jOCi4vdw==; 5:yQ5N7qPBN1JhximxlPgBfI0llWS6vI8DwwuT+leehzAQlFgofyt+58MOJOxyUPRt/0gcYk+98e6HfWNrFw3IjtIii/AcF08rW0Ro95hmC1uv55Wbqe/eTnR6zecpd0mDHAKPWrDrFCC5Q5qmpEPVpgvnXWqb/hdNweTUIDGPyxA=; 24:jXrhVQW3sz2r6oZTaa2armr+vA40bqreisvQJQwwK2neNvNWiSpZqVNMe5/Q33MNOmJhVsfeaDtO3beCyLcrxzYE5S+hV50ePrl7tuO/L34= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0753; 7:aWIQdqDG4WulPgSCTgf+Wrgyi4lLDcaBCpkPL2JlCOKHMAK324tX3tJH70CvZdqWN4Txu0kksp44XKHKs0hN++A0/ryxN8691S3kolmN3DqHNXS07i7YgIjkEmGvRdqXuXvcUP6iz9BFk5hCt6IBh5HiPZvqi+WU1szgdiI/MprqSCql0Yospn80S8tqVxKU8FBXeKC8ooW4JNB63NaTpVYnGWEm54IvidTqMSrm/Dr0tJOW5GHXsuPNeLjNBDaC X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2018 12:02:47.4703 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b721748c-af58-4090-c19e-08d593daa8b7 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 5/7] 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)