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 A2EA6A0093 for ; Thu, 21 Apr 2022 14:01:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92D3440040; Thu, 21 Apr 2022 14:01:15 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20057.outbound.protection.outlook.com [40.107.2.57]) by mails.dpdk.org (Postfix) with ESMTP id 57D8640040 for ; Thu, 21 Apr 2022 14:01:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XRm/36vRjjEm7d8QPmWvjnXlTNqpD/Ov8h6+2DoDbXb3UU2U0GTZWSL6JFZVwZno9p8HRlmJ/P6ogiBOZK0tmZkHuNfYqEs9TTC4O4psZ3eSL4Zw8OIgyrOdBYlmA6r1Lfq1Oh3fj0SUpCKgRUp5lEcIkIxodEy0kV/FcvS+eq0LJUgLuJZ6f/EbHDYYs3CNYglxhvI/cF4jDgLGRFz4HAU89U8rK3DrmqzydUyvOLsA5mD52V5i77eWHSI8D3IrNsGLJnx/Fp7fRNrrmCl957sSWlBu36n1XvvX1VLu35xqpbUfZbuqnCtlAsVqf8Aevgg3voBTUS9By3dnFDEHVg== 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=fKqv6VB5mCPQVW8smTtpQsVQbNB6P27vwTjBu6m4uaZlJEiE/Me5BT1qK0Z4wbotuTgNxAtISb5zjARdpic0eRfIEUA/OKiaS1r30soIKLG8jv8lEMidooRDUt22dzZOW828O5/iynE15swgHpxKXeE9wr8FpaHWZjy9DXRXaZ4LojIuzUFw/r9n/CBR3nF7sSxvFjylPlmYCOCi7ZCgFkuWncM97t2Fc86yibh1ZqkdIgBBkCKIjg59zXHSg5++/Hj06xO/IpBjjmzDtgyiAILcmyc0FcOx8+j6ceIKXDF6tT1hQ0L9oyqmIdF8hrk5CnZQMt+4PF/7lfE7h+0PUw== 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=cnyBafSltdT9IagLDPdBxfEJHe27hQtCUhK0X9iX5uik28zJw0BG0rmwuSPPF1Lb1fPdUzWkZJcrI9UsTziqY7cCU14rRnXQt4Ug9buJHr4Nt0yKPexaLbYCiW4hZAMUG1ZOHhnZJXipWBAdYa3br5Y0KiUj1Yg5Td/8OpBKVfQ= 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 AS8PR04MB7816.eurprd04.prod.outlook.com (2603:10a6:20b:2a3::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Thu, 21 Apr 2022 12:01:13 +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.014; Thu, 21 Apr 2022 12:01:13 +0000 From: Gagandeep Singh To: dpdk-up@NXP1.onmicrosoft.com Cc: Vanshika Shukla , stable@dpdk.org Subject: [PATCH 09/15] crypto/dpaa_sec : fix secondary process probe Date: Thu, 21 Apr 2022 17:30:37 +0530 Message-Id: <20220421120043.2565227-9-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220421120043.2565227-1-g.singh@nxp.com> References: <20220421120043.2565227-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR04CA0167.apcprd04.prod.outlook.com (2603:1096:4::29) 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: e748da5a-be0f-4bfe-53db-08da238ea18d X-MS-TrafficTypeDiagnostic: AS8PR04MB7816: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: RY8IcElnDO9vKYGZv4cI1LDQYhpKBg9rsLkpTgK0S0C7zAlmfNxyQQDLqhLT5evNVXXwlVDtyqHzPMFYu/X0KRh7hQprL+++WP0NAUfk7/3cI36vb0nQNu8noR8f1+Q203DmTv7jI89mfOj+B8SEfO0Mntof+lkCjdB6wuiHq4mzu6Xc8kh/kdMLMgKnLJb9y/rlLPtmTwAPc7VhoFcOmBOZJ0kFonHnxxOg+M+lnDWWFdAezkGDnnffbrES4z8FayoiePg1XTSugSsekLJC30Y+zuBYuAeZUTEdmv67l9dxky81HIQNq8Ipo2de/lKYmomdH5sZDrZhNKT2qeNBlxGcfz8kE0irHPdv7FcWWwqCqPlSZVlnKk/VevUJKpqTTA+ED/HuSnpofYmdiK24mVJ26zVGIXxgsfEQmhnXqk6WNWnSAqzrmRdRtmGDNmJd9ZtF83sAqzQb2TtjDpeFUMERwtpLgDyiNAwMDKutp8023VtvJXfsx8Dyygr5OCeIVDo1keA8iJdZybpvZeN1L83nS+DeWo0/eni3Vqa73iSgDrT9vL51p3XxCHFeqEmPKyauHq/8QDV1HjFbTFLLfQ4Te7OHsgF11P79ctyzGMx/4QVhIO0InxJ7hlKlSEuWB4xKPiB5CGQbMDkP6IklIvXQAEppyT8RsmsvJmjoY5QPBrZ6ryCnhl3Kgy6oPsxAS+UFmD7d4Htt6+UERuoBxg== 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)(26005)(2616005)(2906002)(186003)(1076003)(66556008)(66476007)(38100700002)(6486002)(86362001)(34206002)(83380400001)(66946007)(4326008)(38350700002)(52116002)(8936002)(316002)(36756003)(6666004)(5660300002)(6512007)(8676002)(55236004)(6506007)(508600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?mr54hstYWCnfQHobEUTwAVISXKF9MY+Fp/OGO+OT8zYct6+dQHAhxMVTIKHs?= =?us-ascii?Q?TtwKX/fRBssCKYSpwCO9CJAWXNzsq4WTfDTcxhSl2dvhvH1Ns65U/uyAKQQ1?= =?us-ascii?Q?X+AI1Sne63Oj7bLfnINvpHhNnSFEG9CfZXF5/3p82ltfxIVAkf5LvdGbZnNi?= =?us-ascii?Q?6VjRtoVzicxpUhHjnqTIHuY5c9M9fajJRTbiqyWerXBHxjr50wHmBFf4CW7i?= =?us-ascii?Q?PpxDPz8wqRsfYGGns9hQc0nNsjuKWgj57+14XFQsf7duM6vCC0O0/zVjcVCF?= =?us-ascii?Q?SzvkxLkirz5ejwxbsBtcpaYYGJQmjEAa0wsSJQTUVlPIdmeF5vpzpKb/jQEY?= =?us-ascii?Q?DHn3Da5CnLtkQRKTTwzuony+JvnZR2PT74xP01U52OZHlzWSlFZqhBlxsUrX?= =?us-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QOYkmgfjm0bfyNcF?= =?us-ascii?Q?3cIpDsQw0G41C1vQmtYrAMXaCQhnj7wP8jP/QxByQ540THeWJLtWdF0yruT6?= =?us-ascii?Q?6gDmVsswhRi0f2Qn3ghT3aqSgz9ETfy0HEi+XzrEpvKG6z8/Pl8HhPDAeN8S?= =?us-ascii?Q?ybmZ702x+iDiTtfmuL0DPsDJF01krn/gohJ68wSrcFw2K1SpJ2VYKGSPsZkh?= =?us-ascii?Q?3GW8pGtMI84BMRq5vT5xwm7XEQ4feXe7nR3BRaedjcGwafip+DE12SejSglN?= =?us-ascii?Q?OzHA88koR2Xj7+60c3YR2nmKelw+mV4kIhOcUIfR2EFIw4c8z1jCT+m0PK/R?= =?us-ascii?Q?j3sDu1co1TiRLT9zrDy/BZhHAX6d3Zq4Jav6bXYu6Jaky99hBFLCtTEKBjLj?= =?us-ascii?Q?iX8Fe7fBGFEX18WI7cy72R9jZozBjoZvSoOLo+KFfNqp/8qN4sSXLBCjJBYg?= =?us-ascii?Q?vCN9F7peqw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e748da5a-be0f-4bfe-53db-08da238ea18d X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2022 12:01:13.2036 (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: zC5cFoREBd8mFgKvRCXd2PqFc+qr8oLN4o0Uhs9OeBzcVPpUrKqIefDGfAUEbtv/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7816 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 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