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 E4BFBA0562; Mon, 3 May 2021 10:41:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DACB40691; Mon, 3 May 2021 10:41:32 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00084.outbound.protection.outlook.com [40.107.0.84]) by mails.dpdk.org (Postfix) with ESMTP id A591040041; Mon, 3 May 2021 10:41:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gqds26va9qaqbHwbOZ/tT5GKgTtql2mAXnd/GFIWjnPeyA/Pgt+WEjHJ8dGdS0QVpQq84P6u73Wj9x9alrgCeBIyfOahnUm0wWko5VqmOeG/rlVUSPWcIdNLch9Hq28ddaJYQY3F+7hFdHIPfpelDTpcSKq/ItEVBTsQ2VtWybIgO43Ukg1mLYlB60lD2kDl3lkjxBKQRYi/Qnkraw1K+7QWTbTWItAra4Ug5EHuQ1hEPKaC1kfJ909DplyNdmUirplhHHO9FwQOznJJmUWtZ/QSRpy0+hZSgOhsgv92Jmx8lCzvJxCBSVpClUf1+sWKXTrfeuagtC/wc4wBU5553A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mahD6CC0ogrjoH8rT4L1/5MFM08ENWCsznQty1dCeps=; b=efA/SXiOSLoDpB2+XPnmcHkAJck2G0UG+CVD1Zu4Ee94OfMYNUOnyJNvovpoeTzwo6xJiOYP7umAiZrLQtT2jbVxjby9jYQlUFJ+8qIWICpySqdH6v0gDFqJfHX+AmokKrIcwIiELY6FpNddcyY4OXcav32YRza0FOWaY9Fcki6+KX3Cc5x6G0kXKXD60XXUAHs6gOJQTus7gv0BC2p5IhZ3jXuMQZ0w2KjdfaRB5aKd6GdlLYafzD/lkq4Ej149LQnb+Y6MKkxJxoXAZLBXjcY8PD5hNDu+os/BQNQMaMWjk+w/z2n5bwIBNV6WStgSVaWFZHZ4TMSvVcY70q8Olw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mahD6CC0ogrjoH8rT4L1/5MFM08ENWCsznQty1dCeps=; b=cr1Ghr9heFPFVrx0MVz766d/omLq/G3NXqzw7LIah2hrX0BAWr2kVYvcdVPIlAfjyV6A7ui4jPHNtBb1ODH9cQ20p2rRojN5Jxk7Ph6eaTiYqW69L+u85szn2ULkVdk0zYB+2BHQjARbHpsOSATu2XsprgekD76xKIxJYtsWYAE= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM6PR0402MB3895.eurprd04.prod.outlook.com (2603:10a6:209:1a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.44; Mon, 3 May 2021 08:41:29 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%6]) with mapi id 15.20.4065.037; Mon, 3 May 2021 08:41:29 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Hemant Agrawal , stable@dpdk.org Date: Mon, 3 May 2021 14:09:53 +0530 Message-Id: <20210503083953.13570-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-Originating-IP: [92.120.0.67] X-ClientProxiedBy: HK2PR0401CA0001.apcprd04.prod.outlook.com (2603:1096:202:2::11) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by HK2PR0401CA0001.apcprd04.prod.outlook.com (2603:1096:202:2::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.33 via Frontend Transport; Mon, 3 May 2021 08:41:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e54d7c78-ee03-4ac3-9654-08d90e0f3ec8 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3895: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rR6Vw3V5wLnh1fq9Mwb/x690lzyM9TKrdyvtrfRMvVm1YqidyebVNk8z3B1zPZiej1aalXPf1qvRsZpCmjFRH918/XlY01W9BRVHwlGrcuezguZezF4APNxAfI0btggRA5FkmVDe6uogiIgvlha20ceRjPBjWtMZgrUUK9oKgeO3lix/e7t+/+Ky6wp0De30A1dz2BkyLAA0Qvj6PHGNHrNi2bk3b9OeovI8/Tm4qA+483I2Q5Hv7TtHez6xxuy7+ds1KJ8bxfpM2ZFOgZYGgMJh+Y+srZR4f+OGlnE02CQT1cBM+Ypvpn6lpaQ/zk50Cx/zdAAQehXhSwX9S6Aa32EYS/sLEbgsD3YZuWyMq1vfrD7xQHmb4LfMgeU33tChODL/svorIwzHiTMJMPLapDPiHFauHJlvfzKN7d24ca19Ahc5fZ/7QmV+3ygOewybV43aFi2d3UeC6Vc52r2Eha8rX+8kwHjzFgo2YydJxytK1ivpNNOP7wq31TM9eTwHjgW8YfbqF2hreyyxHBgtz6uWnddZS7OrgHImUAHxsEOOUGM4VAX3zeEP1sxY0uWzr/cGI1XIxQOzSMsXvywI8N1/+jtwvhGBx6jm1Q9rxrLZuSYTyMmy5/zaG9ILS3NA5p4OEmK7/YJaLh16S9/0B550ChHMnGxx2Px3gf/stIA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(39860400002)(346002)(366004)(136003)(396003)(38350700002)(38100700002)(83380400001)(6506007)(36756003)(6666004)(16526019)(2906002)(44832011)(186003)(26005)(316002)(478600001)(6486002)(6512007)(4326008)(8676002)(66946007)(8936002)(52116002)(2616005)(66476007)(66556008)(956004)(5660300002)(1076003)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?b/L9MZKX4r+EFn6wujzEzMDQyc2Yw5L92qiAdZK/XdoodQDxJF+aT43ooPFZ?= =?us-ascii?Q?JVNWcNTKDX3SdIF3jUy67WDqcpv8mnjp++hrRcIhlcp+MWgyWTovz1bV7MN+?= =?us-ascii?Q?BTAt6o8lGPUSG9ffpZD03GvnzT97wWJlJ7ykxlp/1UIScjn5DkbN6PjC2CIp?= =?us-ascii?Q?csm66hz21IcKDdrl23ADYJhjfrphNe0R43jCHclRInB0JbxKTU88Ai2DoH/w?= =?us-ascii?Q?cuuMNlceBgqwz9zBhSt96oiyO6x3MMC+MZJYzZ29ruFsLaIkgszxLq//+ecD?= =?us-ascii?Q?52C7uyN4dQpeGsryrgzWeANgOl7n+sJoyIisTqZk/E2VU82kRygSdF0T3ZlJ?= =?us-ascii?Q?yBr5VestsJeiNtommk4ILtHL6uc02COwMd1+6lQHnVQ2XrOQc9rObwVBcdYj?= =?us-ascii?Q?Ui40NuLfre1erA6q5jg7jJR2pfdhPi+OUK2eQXIBwDEgdOSikM3NotyiySY2?= =?us-ascii?Q?+e3B8nvSucFdoplqfGiTW931hQj+U1ABGZ8BRtvN+PawmhmqbmihznTyKtDy?= =?us-ascii?Q?FIMcl9tvBrGMZmuEx91vur1G1uW82zIptodzE9YQSQ45vugIEabdpOPIYUvT?= =?us-ascii?Q?5AXKO2YXLTiZGIoocpQwEOhP1+Hf3OW6PMcOrAOSfH4FkGSlcoqFS044B6tH?= =?us-ascii?Q?s+F5OXiBzFk7A0OlI2p6B/o6JSsNAYcv6rct9/8oLf+WVZQm19K1ZBAeyVvg?= =?us-ascii?Q?ddyBqryAWuSgvllsRheQs9B9Xxewndg43JJy9erreOA/e/+nxIS/+Hn9toFW?= =?us-ascii?Q?wWYyLLb5l1kbQqZwWwP+Ducmvo20hIWh77DZwLCcaA/VfU79RZk5xqUoEtJZ?= =?us-ascii?Q?Th9ljqMV2Pdi/e0le62LgtGBc4/Og+V2PaqCaNnKEcPZYixGU5VW5wPMN5vk?= =?us-ascii?Q?Kla5HHRriwHTCJNr55GtJruTTubDxim9YaSvCrb3ACshtenpanbtHM77/GGq?= =?us-ascii?Q?wGH27JG9cb+faHqDHlYEBtZVk+p5u5djseUU4n4tI8MB62elyf1m3+uMLtKh?= =?us-ascii?Q?zeA+5d44fT8YXfs0RHoiFMwsMk757bd9fCP+ShKgTDUnP7GgF9R5cKumpGT2?= =?us-ascii?Q?b9TbmZ51pPcbVIjmFpsjxlZHN9clnt53heq7MD0/fbgO13jMihZoWaXCLQEq?= =?us-ascii?Q?VtJHd0HoUJPWDJGrVuU0xOd+85mbnVrdIKCt6E4wcY6Kerp5MA4qGdrUfHWk?= =?us-ascii?Q?qnoQkt3wP7hM+S7c+1AJ0mfn21EREFz+P62hyK5zCneBJyq/MzojJBRFCODy?= =?us-ascii?Q?xloZKaZ81cLxqtWIDlbz9rciu4LYNYd0+5rgLdt06GOEoeCbZ/VVj6Axnihw?= =?us-ascii?Q?ck0xSUcnmQw2KQTkuj+LPss3?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e54d7c78-ee03-4ac3-9654-08d90e0f3ec8 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2021 08:41:29.3515 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kFt6QE+/1eDZu+TQtd5b4MsC0aPM8vBgKJbqHYV5wu+FIh0VQEXptxNzdG5wCBq9ji9V97GiohdcI66Vfrkf/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3895 Subject: [dpdk-dev] [PATCH] crypto/dpaa_sec: fix to affine the thread portal affinity X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" 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 --- 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 43363ba6ba..19d4684e24 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -1717,6 +1717,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; @@ -1917,6 +1924,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.17.1