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 9BB8FA0093; Fri, 22 Apr 2022 05:52:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F38A74281B; Fri, 22 Apr 2022 05:51:49 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20041.outbound.protection.outlook.com [40.107.2.41]) by mails.dpdk.org (Postfix) with ESMTP id 050E342816; Fri, 22 Apr 2022 05:51:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DSOiz7spmA8NwIx3wZYqEHl4XIiNltC2stPn2KFstXRjf33c/LVydXx+Jrdr4PCQF3NDXdkO7UoPg0Xqui/v+a3gm7S0mGK4uWddhb6FIUXsSiRqvNrVVPRf7KYA+vMCuDuRt8zVJfe3u42uRYVXi58ywXes9xI7u6YxQevTM8ufzWS77rhr/m6sGdE2o1cjeh1C4nBFBlf1I3qnzUi3S26ZqbLlmKdEc4FSg4Kk690Ru2hHEgyxZf9Ltm/FHrPWJgZl82Da28Tr4G2rsxrgfSO/TF3CSSpgLHuXO9MCxa6A8W1uDJvbGZMHvrEd8vXdaG8Fff2qvg9fXIZgCnL8VA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZTfHyvb/Ajb/23Jnt+qYdq584XQf2eeIcmxmhAHNuBI=; b=k+He/ofSldikvhk1RTH1UkX1p848Q9KjZB1S0jwC2YvL1F+FNOwz9TyNiSMFZ4p/nHvSVAINKDfjQJpF50ubw/z3+L5m6jwVseQZungKHH6tRO0T0Zll3cEr/pMmWsrnG3ONR9gNWZQ4StkAGKxFTa9kMhiyLyaCUCJXipe+9B5U6Nj1CLs6h8JF3rsyQLjkmZ1r4yw4e2gigDG0GzEJV+oTfaspf4JVTSMlLv9McI0caNE/IrT5TuczPS7sgz0tshGDrBIzRBfBCA+VTUkDtbzIpsb755uAFCiymaoKDPTO/smUEfJzu6jYuMPVE/GAp6REuBpsP5StC9H96EhG9A== 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=ZTfHyvb/Ajb/23Jnt+qYdq584XQf2eeIcmxmhAHNuBI=; b=N2B64dp9VuwkRlrNpLiijAKYFrSJO598XJy1nWSGzMsGiP2iGKfDqPoPh/WeQMo8+h5tpyloM/1HWIL8uA1xi9xFDsurw76j75RV+oll/9qFIPgYUuc4kQU1lL8sB+6J5JpfU9fIF5VwtkgcPmmYvb4pl/l1Ka2SU2dpwxrgKkQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by DB7PR04MB4393.eurprd04.prod.outlook.com (2603:10a6:5:32::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Fri, 22 Apr 2022 03:51:48 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2%7]) with mapi id 15.20.5186.015; Fri, 22 Apr 2022 03:51:47 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Vanshika Shukla , stable@dpdk.org Subject: [PATCH 08/14] crypto/dpaa_sec : fix secondary process probe Date: Fri, 22 Apr 2022 09:20:54 +0530 Message-Id: <20220422035100.3180870-8-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220422035100.3180870-1-g.singh@nxp.com> References: <20220422035100.3180870-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR03CA0127.apcprd03.prod.outlook.com (2603:1096:4:91::31) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8651b7a-5825-4ba8-c2f1-08da24136ced X-MS-TrafficTypeDiagnostic: DB7PR04MB4393:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yiEG0Z439zIlC4ws5CZ3Vqa1+LScTdOPWtiZj4eBK7LBTijXpPygGbZYS/4MBPfXEdCxfGr/Qe8kYTZWtP0pVaMMTUEMQAvXVDc4aDVLlvGLg4dXNasPUy0LQRk8D6717uM85P9O7ZO6mYHQfq8RZz4YXA62ADicua0fdUqefvo46JnRwbxOhLkGDAhcRhAEaAG1tqazMOfz0uqretDTdvAibnZ7G7ti/nVTiWXFVoWCYAGqny8Y9jXd4J20rpeogkTakUTQgyynIX6P+KxA4npTgBSrHMJ2tEnX7TEszJanbX1ytq/xhEj5XVnY5cwub0cmBtxlHjKx2y2RXVoPLNSBnGq4FrhRZzq+V6ASpPDGSab9DdIwpPfTDnFwaBWHFAtAw/TEy5nK+pYlpGSdAsuRD6ELwmSrybiBIeu0lceqaQdeAHcUN4EoIWpJrByuJxwrCHVRq3+RqlYWRA0/tTifDaeo7YUVS945ntof2qOzDREhdQbhH+M9LvO9ttYJxms7kALTxXcVEQ7dpyOMUvXa33dS750A0/Y24tVjuR/AmLuCpsR1Go+chiNKc85Qgb6o/w4+yhIxmL4qerhFkui08KircEyTDquClGl7PWStHT/iUC0sEFRYmwvclXhrqjGQiJGcgzbu83VE65TV/D35/SDd71pRn4MnRqJtUdGpObZl1E79LGdlyDAgINjqMBTrB3iwmR6keVr2QayQMQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(5660300002)(36756003)(2616005)(6486002)(1076003)(8936002)(86362001)(316002)(52116002)(66946007)(26005)(6506007)(6512007)(186003)(66556008)(6666004)(66476007)(83380400001)(38350700002)(38100700002)(508600001)(4326008)(55236004)(2906002)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?YXGAAXFpCBYgWwq2a+eI2zzhSMt3I456MaeI5y8ymvw5hl1t6Sicj7MMaN4F?= =?us-ascii?Q?Im8Eo+Mbm2k0RsXWMFxsDfRRn21798VJTusjlTz7tq965KdZCnshXl+bPxVs?= =?us-ascii?Q?cErWgfRtb4PbTY6pdvebUaM0sFcL5+gwNr3cQ91ZotbIenkL2aavbl1xtX/T?= =?us-ascii?Q?XzcdNfGl0bjbfUbpMA7Y0Gd2ztl4ga/I+0Vtu8BcMigR91p3Ap7uDMg0ccJ6?= =?us-ascii?Q?ZKZO0RD9GePIq0Us0o8Ad2pKQBd200oIU5HZ2G3r3OCjw3KrjGS3g1IAg25q?= =?us-ascii?Q?NUqywUBwp7C2AxeNLHv9RvQn2CnwrW78pwmbHnPaKfdCCAFnjJtEERJMGuHJ?= =?us-ascii?Q?rBW97P+w+FD0XrU2f2r7xXg4bWxlboiD+VYOa9zokRIn7KiXgqZzYQHR5Mfh?= =?us-ascii?Q?xJFy7US+WLYKcQ27mzs3K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1?= =?us-ascii?Q?A/VEjYHy6meXicXnS8hSA8KDxYQfVTHyM90V1xoMe92++CUS5yt1YuVWM8Gz?= =?us-ascii?Q?CjRsXjO51zua6AJAJ8JB7jeTYSB1lk5hruD7WfMP1/RYIKPUouyVbLxdf6bq?= =?us-ascii?Q?e2mjQDs4is01eJUihp7Hdhmnv164D2hgz5tlRddUmz+LVKwYs3nnZbV8MoT1?= =?us-ascii?Q?tZw7rlY0Be4Rp3ltVMpCcjr1Ew/vaBn0IMrebZhXboN8oInfJDc/Rp8GuZLb?= =?us-ascii?Q?HZC4jj64FQm8LYXYuSlCvCm6h61Wrs+VTpjN4vO+f+AKUgKZV8RLbDEHwuvP?= =?us-ascii?Q?y7ZOBjjoTHF7lPVPtONojyIblG9HYlOCUZe5FHdlLpRrTphjy6OB63fwHLhs?= =?us-ascii?Q?y8s8+N89lTtfdTdVq3ECf4myc8IMck4Szu4GZWBIs6g838KBtNVtr7+bBBve?= =?us-ascii?Q?yt5Grb4J5A=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8651b7a-5825-4ba8-c2f1-08da24136ced X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 03:51:47.9189 (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: 9XyT/bYG5fngd/1HSFJKCpi4+mE17GJtLyy6/5KO+howmKyJdwJ9sNDvjI4u+xHf X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4393 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 From: Vanshika Shukla DPAA hardware supports non-i/o performing secondary applications only. So we do not have to probe crypto devices in secondary applications. Fixes: c3e85bdcc6e6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform") Cc: stable@dpdk.org Signed-off-by: Vanshika Shukla --- drivers/crypto/dpaa_sec/dpaa_sec.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 23a94d7e41..6f2b4baf57 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -3766,23 +3766,24 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused, int retval; + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return 0; + snprintf(cryptodev_name, sizeof(cryptodev_name), "%s", dpaa_dev->name); cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id()); if (cryptodev == NULL) return -ENOMEM; - if (rte_eal_process_type() == RTE_PROC_PRIMARY) { - cryptodev->data->dev_private = rte_zmalloc_socket( - "cryptodev private structure", - sizeof(struct dpaa_sec_dev_private), - RTE_CACHE_LINE_SIZE, - rte_socket_id()); + cryptodev->data->dev_private = rte_zmalloc_socket( + "cryptodev private structure", + sizeof(struct dpaa_sec_dev_private), + RTE_CACHE_LINE_SIZE, + rte_socket_id()); - if (cryptodev->data->dev_private == NULL) - rte_panic("Cannot allocate memzone for private " - "device data"); - } + if (cryptodev->data->dev_private == NULL) + rte_panic("Cannot allocate memzone for private " + "device data"); dpaa_dev->crypto_dev = cryptodev; cryptodev->device = &dpaa_dev->device; @@ -3824,8 +3825,7 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused, retval = -ENXIO; out: /* In case of error, cleanup is done */ - if (rte_eal_process_type() == RTE_PROC_PRIMARY) - rte_free(cryptodev->data->dev_private); + rte_free(cryptodev->data->dev_private); rte_cryptodev_pmd_release_device(cryptodev); -- 2.25.1