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 6AAB943220; Sat, 28 Oct 2023 08:16:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B7C4402F1; Sat, 28 Oct 2023 08:16:37 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2124.outbound.protection.outlook.com [40.107.220.124]) by mails.dpdk.org (Postfix) with ESMTP id 17CF8402D8 for ; Sat, 28 Oct 2023 08:16:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dPaQ1QHQw3dpgGRhG8pRuLZtRtNU1PWnqp3EbogGFXdU8pf9qhqLnlvrqf2Ywvq4zZI5+hdHnxFclDcYtu1xIJriuVd2u2fVNONaiOkr9lrNB6y8l0OWE3lLql073oZrJi0KfpRVHOyX/mqJf31//8GUPrOeFN5JEnzNAOVPBQ1CuN6Sl3fqPyObefrOkLPBocbUIeiFEsYBu9fUViEi9xzyJkM7UQ8f225fWvrkMC8rSToHNILqHof6XHsGgvFU8VIXbObg3QNTl9Kxyi6ccpJQEpapw8mIItYYr+WsGmaqe6L5EATmBOlRE3ns7IHrdOQ24KJweX5v5yi8lKRaxQ== 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=oKH4OsNZEtPzm9zWiEFhNnb5pPu+qMN4eP/Lf9lzYDE=; b=OJoFDYnW8IlAg/Hb+lp07v8mgAdkUHVYxBaR+WRCv7p7k1NmQ7muumkKNRhUk5YgiYDR8ilSIsaqG0IVWgIUp1JDSzobFWO+Up1eaYi0jvMiAdHO3w0mQs+b2zseL842TWIgi3ZjiKdRBj0/LQ/9gIJaMD334AqUrbR1XyIdwuTxkocJCixc6xxzjOP/7HQFCcpxd99BTIulmCiNuHpPQMryO0wTEBJCzgkOq7lDp82jTn/Ux7IA3MpLi4jXlJv0Y1uzZ26N7REzg3lC70ndCfIVn6hXDrygAoa2DD3J0BmtT+zzxl9fx6HMROXp0XiUUS+rkJrRiGXuKSHSgGx62Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oKH4OsNZEtPzm9zWiEFhNnb5pPu+qMN4eP/Lf9lzYDE=; b=C0aCRfhn816kgsyu+H/nm9nQ2Fl5zMIC+9/wTZZl3TY4vlnvCfKI+b8lJ2FcUO63pst10hGQOAN98BT0oX28T1QczjIlL5rwGG/P6b+bMpgJbapRMq7P+TE5IplNDvUaoP0OpJ4KOQNBXfxgonZgU9LMlSpLZie1iLBTl9Vuaf0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by PH7PR13MB5551.namprd13.prod.outlook.com (2603:10b6:510:139::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.29; Sat, 28 Oct 2023 06:16:31 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.6933.022; Sat, 28 Oct 2023 06:16:31 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Peng Zhang Subject: [PATCH 03/11] net/nfp: remove the unneeded check of process type Date: Sat, 28 Oct 2023 14:15:50 +0800 Message-Id: <20231028061558.1842855-4-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231028061558.1842855-1-chaoyong.he@corigine.com> References: <20231028061558.1842855-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0246.namprd03.prod.outlook.com (2603:10b6:a03:3a0::11) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB5551:EE_ X-MS-Office365-Filtering-Correlation-Id: 121c3617-b587-4ffe-c43a-08dbd77d6dc7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gSE/vM1MOBlrOaNai9ejHqLveXLmw/EHkS1hJ/GrSv77HhMflJPIUFE74cukx9I9TdV4BsQUZbaQyFUWIduLSWp4cvEBNPtDkmHzu0tS2sjA05s6X5lTVIW0UoeVvp7d9SNWNqlrapYfmHQF2ZCx9mvrH4+GTpCcPeYn30Cs/7NhLFnmrQfBmM5j8NvQc/wmo8WRPAJ0jnZt4XJDx0VbDe+FhJZavMBBLP/eCQwUK4B5KTCMFLml8mGKS9ck0W0JtAYasvOLvGoKOaLT7/flfN+AzZlELEUTbPTRIuPjEwecFMdDTpOnlMzXnj8++rithUAEal/JmUqwFD7YhXqrZb/VBurSJGfRoQbuqbuZIzxAYrs9ifJloRW1LjPIJlOGURlM0U87b1OA8LBZutW9AuPmE6DWzVS/Xqr75RUSIs+4Pv7Wx4kMLRHzpoUg9BeY+b+hQgt0pkl18hD2arhqHZMSa0LjtKVZvCWx3FavHEoop89m+qfssVZa2Ocwm83x6v+OTIuYQcYgtzravHuThfDLu0bmOWqsMqYtO3tAltw6qVcC0bMMQ3FqpDuhi3/sYesQT335VVonLZ6JLjjpWJ2ilXm2XAnkGOwhp9MU/ISZCKp1D5aQqV59ZxG6FdcpS3XZrh/8Oyb3xWbeaiQTzJtdGILS582SKCYkd0rKfKM= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(39830400003)(346002)(136003)(366004)(396003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(6512007)(54906003)(107886003)(6506007)(26005)(6666004)(52116002)(83380400001)(2906002)(44832011)(5660300002)(4326008)(8676002)(2616005)(6486002)(41300700001)(478600001)(8936002)(66476007)(38100700002)(6916009)(316002)(66946007)(86362001)(66556008)(36756003)(1076003)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?CawOHxXwDopqhy1J4HW6tmz+KUCsTZu/U1HwV2YV9tLH6+ctfT2c125qrMj1?= =?us-ascii?Q?iYvBWO4EZO055t/8DgFoOaOlknWG/dPTd99ViMM9nI/8mYlzRamfBc2ArIDC?= =?us-ascii?Q?D7zUfhpoZfwVDGl59RlDF87WJiNPmYSxCQmDHx+fNkp4mA8+NeTe5Izoxu16?= =?us-ascii?Q?cvvzAg91usUcOPiyKNUXY4LM01KHCLHg/0Qsl1KnLNDP3yMQQ70Z9hYj6ss5?= =?us-ascii?Q?CDaNhNrJ7EdTUJkv2rdXVC3946o3mClGVGlXe6NxIzZkG0fERwrCFHbBUmPH?= =?us-ascii?Q?YG8xyzRD4Nkc7fPuMxGgHEZTbW+HhVRkwPy1TteutwwkLadOzTtgPCY/zIeI?= =?us-ascii?Q?0fPcEhzceEJp3XdDI9OL5+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?Q?CkvxXTlsUw0z/iiIC3H++nURfIGYGlaTKnh5+wPsTVPMFcJ93PaWDlUa4wHa?= =?us-ascii?Q?BzDDasvjLMfSvmzWUBb2rIIuwDCiQDvdGq8rNTwncdrSi3qvGJ+L1i4DO598?= =?us-ascii?Q?HCQG6PA9rmmX9uFPeuCGZefapl73vR2D6973QEeajyGK1J3mzjEIGHEjzAJt?= =?us-ascii?Q?d8tqr7OljI3apf6wTqouVyBmUwADYZOzfZdiZr5+4IAdDZ3HZzzgfz1Cde2U?= =?us-ascii?Q?jRCeUGano5UYBbOyL8E/R6JnkZRvaUjjLBHK3FqbUWlGrpha9cdU239DyFGj?= =?us-ascii?Q?GWNZd1P47LagQoCsJXh+5yfvklvjEPY1q4obImC/615/elNwSVQdZquTOZ+3?= =?us-ascii?Q?qg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 121c3617-b587-4ffe-c43a-08dbd77d6dc7 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2023 06:16:31.8523 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kBAN4XdUOYrBAECj7dNTEydxdt86RMetdYJu3ubg3j5lQUKyWh6AKNsxvSr6pi00mF0yegRtd6s0AdQfHVMQ4YoOIckpXBqktserACN5Fnk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB5551 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 Remove the unneeded secondary call of 'rte_eal_process_type()' in 'nfp_netvf_init()', because the first call of it already make sure only the primary process can continue run the rest logic. Signed-off-by: Chaoyong He Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_ethdev_vf.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index b9cfb48021..e24fec861d 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -344,15 +344,13 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) pci_dev->id.device_id, RTE_ETHER_ADDR_BYTES(&hw->mac_addr)); - if (rte_eal_process_type() == RTE_PROC_PRIMARY) { - /* Registering LSC interrupt handler */ - rte_intr_callback_register(pci_dev->intr_handle, - nfp_net_dev_interrupt_handler, (void *)eth_dev); - /* Telling the firmware about the LSC interrupt entry */ - nn_cfg_writeb(hw, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX); - /* Recording current stats counters values */ - nfp_net_stats_reset(eth_dev); - } + /* Registering LSC interrupt handler */ + rte_intr_callback_register(pci_dev->intr_handle, + nfp_net_dev_interrupt_handler, (void *)eth_dev); + /* Telling the firmware about the LSC interrupt entry */ + nn_cfg_writeb(hw, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX); + /* Recording current stats counters values */ + nfp_net_stats_reset(eth_dev); return 0; -- 2.39.1