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 542D2A04FF; Thu, 28 Apr 2022 13:49:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A533E42855; Thu, 28 Apr 2022 13:48:16 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2086.outbound.protection.outlook.com [40.107.20.86]) by mails.dpdk.org (Postfix) with ESMTP id DBDEB4284F; Thu, 28 Apr 2022 13:48:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UVbv2HbEZTaQGfpM6LjU8fohTTi70UhaocRZ+Wakrkty0OcptWL6Gjke8jspRibHgrDQkJ+MglXPYyW877gBtjMwt3tttvL8SruavNIuR3WLtNto+6LixCT1mMEoXQ37XAeFw0vyRBICON7QEgyYuV/cd6nsiCj/0soEkLgz8In07uTasakvsTjkXSes8Ix8C9FNOhl+FXRDQTta+bYP8ZOpdH7/nSczEPRqgkTCsbUrzoVWWyDczKwuxkhx2RWPpNqKars9mERkxWy6rQt9PARtOdazNaC2/LD0TGPTlmDzmqByiGJv25y+GgcfiPxMV4luBpnHpa5EdNqq5pFU5Q== 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=M4p0aZlsFvuxUaoYR0G1A6r9vlzblwC/FR5uvXhF7pc+FKPs8fnHwJ/OPZy7CQlNsfuwVQ0O723eWep8SsmtPdNNtDgL6Hrhuk9ogeji4U4nYBzl1k//xTBz1ImfWvma6bvdQzlfpMRKQMr4e2ycgVwa0+w1B/d2YzyJZ/WYyZifs164Ymv4BU5gwPr3TuTpJelCudMx1Al9pN2PvsEOsyG3Fu/asdhnAfXVgB9oZaMjzpaUW4dmScsJ6QUO0YMl3L9aS7vTp4E4LE5fFoC2zCwskq0M68TjApM2wClZPS8wSAya/X5R+5xPOGImYWLJ16H2Y2ntDNWikz1B229A+Q== 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=A/09yz96O93QEY65xevDG11SvfXyn5Ox4vGOnKg0QwVuCqm4L6nvwo8KUGYapXGKvy28VmIoeM8GQr2TO/u3Ogcm5AYmM78B8XW+oZ+jPRAAzWqZOkvGnloM6R1fx2kt1OeVN+hYm4SjryHfiDOFmQ7OlXsp+uu25QSvR2/bugg= 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 AM9PR04MB8162.eurprd04.prod.outlook.com (2603:10a6:20b:3e3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.13; Thu, 28 Apr 2022 11:48:14 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2%9]) with mapi id 15.20.5206.014; Thu, 28 Apr 2022 11:48:14 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Vanshika Shukla , stable@dpdk.org Subject: [PATCH v2 08/14] crypto/dpaa_sec: fix secondary process probe Date: Thu, 28 Apr 2022 17:17:27 +0530 Message-Id: <20220428114733.1419957-9-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220428114733.1419957-1-g.singh@nxp.com> References: <20220422035100.3180870-1-g.singh@nxp.com> <20220428114733.1419957-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:194::22) 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: f7d8eb72-7121-46a2-0fd2-08da290cf9fa X-MS-TrafficTypeDiagnostic: AM9PR04MB8162: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: 54hydYIhcjSJqC6NVoxXFhP1ZoP+p7EnIndJHZVtf5fNevMIDLJzTNMfGMmPuFvr2UCycWZTlbB1OZOPsK5P+odjY9xbdMp7ENY6+fmS3QdILxLK0hcRPRyQZUHrS9S2gmcVylC0+BiBOS2zXHgrbL6LjbvjkZyvkADseaQQSdsWRMkWq7jhwTKQBVoyjj+rzk0d1FCDYlWHTe1GAx3biDojrsuDW3Xnq+h8jq6a6Pv005RACgPXDm62k+qQz+jYX0+H6Z1bZqWGWo1VS8WOko+SMn88sWYgRr7k+5jBRhC2cXXzNAjW9Y5DXDEoUNlyqk6cMmxepLJj+lbHXiMSOvBYBqPOHqv3xjjmF9jC4ir4Erg+yd0AfLNOjNdAjHNKFfGsQNZVOmbLC9LHYNsHSL5UtTpNcDJNJdz0Hr0Jh7IQJuQhHNJ2Jvr1fLxJfSX7PLwaW+FkDNsZgqs/7gOSRe6Ckq7kXrCEApksEx89d8sN1apAokfNUpily52Gn37OXCcHDMO30bKnE/pWUR4YReUrYFdqhkP9JF8AicwD5h3LL8rqecB4tobF+h47qxH2fzzpoqcsorO28Xk+zIMeef9yO/DPnjudShxM+3x3EKgLH3f7rdMmcaI7t4F62xvjDmWpz3Fw3n9YPvMuIqirCpl7825ueVw1Ug2pe3VUji5nTiYCVm/tEWLbntOhqXSGCdVus1X/7woJkLuRYSyCP8JZv6R5gIzqxsUAttBl10cUmyNV+BEfQrWPRDB700a5 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)(6486002)(508600001)(8676002)(4326008)(66476007)(66556008)(86362001)(66946007)(316002)(55236004)(2906002)(38100700002)(6512007)(38350700002)(26005)(6666004)(6506007)(52116002)(5660300002)(2616005)(1076003)(186003)(83380400001)(8936002)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?WQ0rYR/XcLI3wWHZ9IlAQvKimUwDOdCvkDfsG8OLLki8Z14QNT7rx+z37FEo?= =?us-ascii?Q?DLWqEVb9K1cQomCMo/5kff4gnCS7Peg7Y5All3TcyPgL6dkjfqShI23lB2X0?= =?us-ascii?Q?KQQmA1WLhypqdoqt9PpoPqIZiSOeM7JhriR/w4zmNS92DWRhxKnagqTQQawS?= =?us-ascii?Q?JYerTiG2XNkBrLW9rkn88WSO3WacvyLZQGz+eIFsH5GjfzS+afJqPy+PvjK4?= =?us-ascii?Q?czaBE/DidAXhXBFNGdmJr2MCjnmcVIFJ4KqNDMqjCaCQEhQuCps+m0zLgWYa?= =?us-ascii?Q?bYBT4GBM1ApfFS6C+tgj+1KmpOVOQH/nUOecbObYFLjl2LoJSlb4n2Xd16E9?= =?us-ascii?Q?7/KQuSLCoBXm+SHjrFjtw3Xcz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Q?FiHXcxxVz5XjmpStart1gcGOKeT1UpvO8zoyGdkcRhrmllCpvkayVlyOLpW0?= =?us-ascii?Q?0067HMPR/8xemU0Bb9NfFeGpixfvj14dynVmOT3e2KIn0OccjIHeOLN957hj?= =?us-ascii?Q?PlsQ4//CDd1gpGfAsIaj1ccQUeKQOvEjU1IUpjHEfUvccN4Yxchb+1wnMWjA?= =?us-ascii?Q?5nmMG0UcDpD7RlXZbcj9406N4IzTrvwkErJ27IhDpBjcDPblajOVdz6ogntz?= =?us-ascii?Q?3H+OXeix+zrmjC8x7icu5p7HUy9ci5pyvVWBKAA310dv5zrTt8bpqR2egVId?= =?us-ascii?Q?fYjQ6uLR7C/Qfi8gk1P4CKg0PZyYAJAZNAjceutyw0HwW25Xa/r2Oxgh4qk1?= =?us-ascii?Q?/iFH9lpxIJiG3BSOdtPE2HQkIfCBo0JY0sgg39KFnnzQUKNPN2Z/jVQSo3P5?= =?us-ascii?Q?8ycJgVqIhhqtJgJSv84BE6lCzG+IyyLGb/dKzFyDS0npzxJYnmwIQOJB32xb?= =?us-ascii?Q?UNFjLzcFVA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7d8eb72-7121-46a2-0fd2-08da290cf9fa X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2022 11:48:13.9746 (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: he9Bx7n8HBZ2h/c45hNdJeG8DGyq0jlY2Px40ZeF2mR8VB68o1wF7UOYXvbszdX4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8162 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