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 8831943220; Sat, 28 Oct 2023 08:54:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4EED840A72; Sat, 28 Oct 2023 08:53:52 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2097.outbound.protection.outlook.com [40.107.101.97]) by mails.dpdk.org (Postfix) with ESMTP id 8C7CE4064C for ; Sat, 28 Oct 2023 08:53:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mdrK4h8Ab12FifwUm8BuqPT8LX8xj6h9Z5bsNi4yO7zhB75+tTlG1uR04xuz+YM/rMcwIRO/NnkG7rMZ+6OfqO8FywFeJqSKtiZIhDrRKf2Nv+NgkkASR9kmjHy39+S+pB0nyWU+WZD5z+ni+9BzllVwfdwAxKHXw0PKN+Ab8u46Xpdd1z4Nr263cvDThGjXfay5P2kz4EA4qyxJ/tx0CyIX43Ti0cbd4t4CullKvjYT7U+MClA8Dt34Wp2vyXITKksHCKCVjCaibVIUhv4i5jKASJx6cl/Xnq//t61rW2FST6yHrsJ/AfLmu0KMMNPzog48EIjvwnhfCsnPZIDlMA== 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=aLEB/FpLnzsSlDV9C3kW0Nf6SUK9yUwbC+uQqJbaK9bVfJz0f0c02+ejLBBPsTWbXYEV0IMtqy0LBwB/G9kiAGmtXKz9m79F+3YmsAeK5UpdfLD448uXExViTjWIOFH7ciDnk2PS4ts9QJ8CGxFTgdSwFOcMGdaoXHiAyCrCOlrWgy2HfhPziDLUUcpELv/M/mRaT7xN4fkTxlNMaCP/SmTKaH9hQI3Tr5nT/96DqAP7SchDTl0Q3Ns/QFKtsqJs3d045Smw8bV8ipXukh3RChSBnoNPEEafV7IiN6+aKI3VgqnC9FTGLKsjXBYn54bszE77r8Nn8YhHJqIngjksPw== 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=MWoSt6upo4sxARONecVlQCUQLc//TLkpEMWBWxvCLVkBXJsPOsBoB9YfeKHz6+9nQ+3Yo6undaxOycEQq1nB9FSyr0vLSemP3qYBxPLcpyHNDRHZ1ODOPTsFo26DK58d8qbCBtErKfvWw8q174tORC1tPRkJIc2Z22fnGk65DPk= 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 SA1PR13MB6055.namprd13.prod.outlook.com (2603:10b6:806:338::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Sat, 28 Oct 2023 06:53:48 +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:53:48 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Peng Zhang Subject: [PATCH v2 03/11] net/nfp: remove the unneeded check of process type Date: Sat, 28 Oct 2023 14:53:07 +0800 Message-Id: <20231028065315.1937188-4-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231028065315.1937188-1-chaoyong.he@corigine.com> References: <20231028061558.1842855-1-chaoyong.he@corigine.com> <20231028065315.1937188-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SA0PR11CA0020.namprd11.prod.outlook.com (2603:10b6:806:d3::25) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SA1PR13MB6055:EE_ X-MS-Office365-Filtering-Correlation-Id: 22ddf9a9-3499-43fa-53ee-08dbd782a29e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L23Kfor0F0RGjogmQv4gxYDS0ChJtp0AoQAH6D4ApSNRrbnXBSScFMgF0hvwlg4FyhfLTu/C95J9aPFfORZJfhPXWd89FX3DXXuHlDCBkSmKqtRMC6Z6lKw7s2VyacE5+tHGfuQPeVD2LRLyB2XjKImUpKWjQHWJJm4dA/b6y5kdisZI2e8SUbZ5XJL+8fXQr61rlmi3JNAIjmD21yxpL0u6jSz9isBX8U29kJ1+Up4hpotQUQbHFMRRKiz/CFftpUPzMTl/jYKW+o3sOp6I99KPCNgXC2YBDziSb3xjzRrAezD97UbG5XBpOFPj8/VwjkMn60AXRv5ZCMpvOEHOUPvuST/0/kskm2fkn6UxovBJxhSNw5V+0JVzipMHlshYRAATzikz06RnlhPSyS2hw5hg/JmV9MBJS6+rm8jBX2KyytFVTI4khigH11V0UhLsDRBg6MQooN8ghhGbp0cre4mL2PDOwJoGxKT1IsLl62hvDqNFtynwOMiQzSxMmGxuSOkRzg/OLmP3GccnrF1bcdlQgT1TSw+Q9HVPo9ZQvzvzSE6JfKGLjKx+8bWNdZxvRylV+H3uZ160+3tqbxyApWaP6L+07uw/nhXen0Dcx0lr202EeJRvNUG0xqfiHC9UyG+AsvZKDvH7oKHty9fJ46Q/oxv53PPr2EiyK4GfN94= 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)(346002)(136003)(396003)(366004)(39830400003)(376002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(6486002)(8676002)(8936002)(478600001)(6666004)(54906003)(66476007)(66946007)(66556008)(86362001)(4326008)(41300700001)(5660300002)(6916009)(2906002)(44832011)(316002)(6506007)(52116002)(38100700002)(36756003)(2616005)(1076003)(107886003)(6512007)(26005)(38350700005)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?itzwlSppgUVF3z8vijXPoNkymgbBIWvGTz+nNn+GcILa2/ObbZeZ0+Y9ovfl?= =?us-ascii?Q?FJz+Z/200gbDS+NFSJJknDDJGOVSAIwTRw6ScgUaqb3HwfwcD8VoAqDw+VPJ?= =?us-ascii?Q?skx+YVXinIuAFx7wYpzXP/r9VgeW5Hbb0pP/6CCvbO2IG0gIezRqZ03/8flB?= =?us-ascii?Q?WoGXxINV8vg7IgvQ5sDYTS6D1wKiF0JVb3xXZgGaYGl8BZUOLP76tYtEf8OE?= =?us-ascii?Q?Wefshj1LhnX7TomTJUjReY8J31Dz6idhywD/qLPvI4OsJJ7OTjL/I76YsIfF?= =?us-ascii?Q?2DAbHhVK4aHVXAGZjw3PM/2DQlBCxUK7IHNZlCRtTbeHR2mRD0+q+OiaQV1P?= =?us-ascii?Q?oAMYy5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CiQjn?= =?us-ascii?Q?pVSyuhOfzzrgOBMwNATpIOt3S+W3KwaoRQ5nirFUYd/DAKbV87P5o6M4jY59?= =?us-ascii?Q?rPJF+CqDH+diRvq7iNtsUNKnQ7XrglIgPN96wNadSDQ3ER0Dmgf+naPzkfCy?= =?us-ascii?Q?vNG5EzdRlWUTOvfzR/u+Ldi3Kg564Dcw4/gtrUhKPLZ1IBmZw/5gwUxjUf83?= =?us-ascii?Q?NgEMOpwZahO/L0Od4lmRiqBoI8vwnR1uJkEr+ZAqUKoZpMXAPuDUUkJJ35NE?= =?us-ascii?Q?f4IUKpZEmrwp4MvZDgs6c/gt54uESWzsuE1eXDFmJdOq/767KY0f6lQlgMCT?= =?us-ascii?Q?gnMKuXEab+8KmhV80RAZBjZG0OssLeV1gP2r/OBKRDE8qP7SKSwpCXg4IAAF?= =?us-ascii?Q?uw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22ddf9a9-3499-43fa-53ee-08dbd782a29e 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:53:48.0131 (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: gM0i4EPhq4/mqfb/FLkEModRonJ+q4kaTFeqOymILNCpizdgvIbNzkr5VioSNSJScon4qwcEYAc6j/EM76CjYtUKjiyA9J//+sHFtKh/3xg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB6055 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