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 B070045495; Wed, 19 Jun 2024 12:02:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DAEB842E36; Wed, 19 Jun 2024 11:59:44 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2132.outbound.protection.outlook.com [40.107.243.132]) by mails.dpdk.org (Postfix) with ESMTP id 7C98A42E73 for ; Wed, 19 Jun 2024 11:59:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ilMijBG6LI9XmY6fEjaR++Vz0Td0f18zr9/VHPb9n218vGvV/gf1gyUA0ZfAZ97jXaiH2FxCS+XgIflkR1hAQSypEajjgq4pb2HfkZtZ/fVvotNlKUPUXry05spolALWVe8CyM0lWsPDw3vfhzOSGtihN7eYF85MZZEmLw76RQJUWTsMzSv0DiFRkaFw1EOlIZndUX8aUdwU3ek2kOBX1QWNQiLKx1j339IEwr6n1ahVA6syz1MQsW+qJJAj5IfYS7Bajsjpy+ltuapAYbbSpOpadicsKyMaw6h1B2lcjL/NEAyN7ZGe5Y470c4wkEWntbtt5UDgMaqagdCw6OFF5Q== 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=Wi8SiTB2i6M6Q4TuqixhZW4/lBaSnFiNVvsUxPJZuoM=; b=YkwWrp3hI3GPXP6UDB84FeuC9MP3QZ62hbhSpYrTxJl+n3An8Ycb5YVrgTLkObchtZT6XMYhDf6CC9t9lZo4YV0tRprOLbxIe1w8V34c3z5K4qFSoF+fsdPBe7ELRTQLzVVgV4cDmo0SjPUh6vvBOHeeE6k5iekeqPwpKlyuqaBCwta/eM0P6zSmt7bk8PbKCHVSzM7OMtfSEf2gbbI88f9W/FyjrYBGGuJwuqciAFeN9fUpfnMAZbd64XKEgaEnvk1pfKHm5hStYmlTmN+hLr9q1e/IsBB2YVr0zxkJ0qqPenHpRTE1gYF4K0OFAISAF5uxikX1JhPVU8106p/1eQ== 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=Wi8SiTB2i6M6Q4TuqixhZW4/lBaSnFiNVvsUxPJZuoM=; b=ET8L/bocm1twrliGy3T2QBbP4Bey+MISv/WzE/m+nnQFSkT47kp2N91XGIdyT2khqxZscYy+TdQCrlzve2KpCP3259oAgL6tvPX5aEFKIv2ARSGa8pD1cyxUQh/by+XVPDUKr7aLF6rLkIM7P8472TTJu5ifYB31Sr0XcGLTLdk= 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 MN2PR13MB3912.namprd13.prod.outlook.com (2603:10b6:208:263::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31; Wed, 19 Jun 2024 09:59:34 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7677.030; Wed, 19 Jun 2024 09:59:33 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Peng Zhang , Chaoyong He , Long Wu Subject: [PATCH 23/23] net/nfp: add support of flower firmware with multiple PF Date: Wed, 19 Jun 2024 17:58:30 +0800 Message-Id: <20240619095830.3479757-24-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240619095830.3479757-1-chaoyong.he@corigine.com> References: <20240619095830.3479757-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0057.namprd13.prod.outlook.com (2603:10b6:a03:2c2::32) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|MN2PR13MB3912:EE_ X-MS-Office365-Filtering-Correlation-Id: ca46afa4-187c-4ce4-adc7-08dc90468531 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|366013|376011|52116011|1800799021|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?mCQpwaPfsgCkmOKkykOzJiVDjmqextqRkTFFlWQFHAdpGT7ALma4UC+CUwzs?= =?us-ascii?Q?QE88ho2VZIGKP5J/yOVaWlqz3GSQiKkaYvzvRzrXRCl1b+3sYLSaL6DNxiFk?= =?us-ascii?Q?gPX6krdb1TkUBT/clXS3qxpcqHERdmDp5ib14BgH8PygiBLpn8wQjPBE12bn?= =?us-ascii?Q?5uHNeFFyQuTKKaPFDNGsx3hPVIogu3O47O2vGikXRRBbCFZWdNi0De0WZdPY?= =?us-ascii?Q?YOAqH5VI+fZJMe3TRJcNJy7HbMo+4p0/KwsHktF6BzwO66GkLEET73OVOqPa?= =?us-ascii?Q?Q6k793uMIhK60+RduTrSnH5l145j/Zd8QWlR5rSTaMH3H+qSoCazpDOyhICX?= =?us-ascii?Q?thiOAZAKGQusaS0emJnjgr9fGsFjaUbWkueWKbub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?sHOhFHLCI9m8F8fJmASni5tCXv/3UfakjukD1YZErUbJisvdH6EWkTilN6ZS?= =?us-ascii?Q?i6S6hTZlUS9zHVz8jmZFVouqvpZ8+TL9fnAygzlSQy/cJWLrZuNke5C9MMYn?= =?us-ascii?Q?yJfZ6RY=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(366013)(376011)(52116011)(1800799021)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?AB7B1DwoLV8UviAqAiidPYc7CAVTtsix8Z6ZrHwaHH9keX+BFr/hGIwksdcw?= =?us-ascii?Q?+W7ilG13D9pbhi0cvPdtLYpua8Z7DfWxv2X/6DPSZhwUlrJwE1+mkopBuylN?= =?us-ascii?Q?cwOdV58eKy2QFX26QuBbp5g6Xw134H/96NE4cSKKlkLVQ8Y5KAsxZd6C/ti2?= =?us-ascii?Q?5hwICy3XmrEy//OCOx97heHHYrWZ+AfsDGML5pRnR+uO8xemASgdz5/vvCFY?= =?us-ascii?Q?6jYOovptiKMlxanikaDfw9Y5AjEnr1fJS31Hh0HBXBhMXRhllhSEfIeAu/Qc?= =?us-ascii?Q?Wr3w5f22VUG+dleMeaa81y6UL6Zlu97zaTAM0U0Y3Zk+Q+s893lNPCpHlUr7?= =?us-ascii?Q?EORhRAgeElkY7A14zSbRfrCYsgZFQy+61dKsT681zLoE6NtabKQM5CLv9lqm?= =?us-ascii?Q?ApEGh/I2Sf/ReSOfw03j51RCe/sT3aUAzV4Be+s7gzEXLdKwGEyn5ii+aemF?= =?us-ascii?Q?j1qZbig/Xr8qww8OBASrLb4uhaRyaBDUVJDVp3dgebRBQsCwlthBK3twifK/?= =?us-ascii?Q?yh/cJKTSEnlh2B7v9a7BNovBF2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4pVbMlqy6KRCdKEOnNjgAOjG3q0a8ruZ5a7SMTXbESNHP7zW3Ko6?= =?us-ascii?Q?LCkS4HVlrl8LOnkzhXGdfYkcrK0PEhq8a/hTmhCi0XV25hJAIuTWeDkvz2bl?= =?us-ascii?Q?1ZXOgyCS7FZRTqC9D5sTzt5IBPDm09hOA05xVQ9e185VbfSr/cO7a/y10pMc?= =?us-ascii?Q?4Q=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca46afa4-187c-4ce4-adc7-08dc90468531 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 09:59:33.9036 (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: Eu7gd/FHdfEcAZIANS5cXvq2PjGYolgbSOnt4xKkpE2PR9bHUuk6sx92/x8VF6d/KngufaJN6ZqB+iPmhxFDxaNUjS9Qt05s7/627plGmPY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR13MB3912 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: Peng Zhang Adjust the logic to also support the flower firmware with multiple PF. Signed-off-by: Peng Zhang Reviewed-by: Chaoyong He Reviewed-by: Long Wu --- drivers/net/nfp/nfp_ethdev.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index d560bd695f..9867db9729 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -1504,6 +1504,9 @@ nfp_enable_multi_pf(struct nfp_pf_dev *pf_dev) struct nfp_cpp_area *area; char name[RTE_ETH_NAME_MAX_LEN]; + if (!pf_dev->multi_pf.enabled) + return 0; + memset(&net_hw, 0, sizeof(struct nfp_net_hw)); /* Map the symbol table */ @@ -1872,12 +1875,6 @@ nfp_fw_app_primary_init(struct nfp_net_hw_priv *hw_priv) switch (pf_dev->app_fw_id) { case NFP_APP_FW_CORE_NIC: - if (pf_dev->multi_pf.enabled) { - ret = nfp_enable_multi_pf(pf_dev); - if (ret != 0) - return ret; - } - PMD_INIT_LOG(INFO, "Initializing coreNIC"); ret = nfp_init_app_fw_nic(hw_priv); if (ret != 0) { @@ -2248,6 +2245,10 @@ nfp_pf_init(struct rte_pci_device *pci_dev) goto mac_stats_cleanup; } + ret = nfp_enable_multi_pf(pf_dev); + if (ret != 0) + goto vf_cfg_tbl_cleanup; + hw_priv->pf_dev = pf_dev; hw_priv->dev_info = dev_info; -- 2.39.1