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 8150345C2A; Mon, 4 Nov 2024 02:35:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D056040678; Mon, 4 Nov 2024 02:35:22 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2103.outbound.protection.outlook.com [40.107.101.103]) by mails.dpdk.org (Postfix) with ESMTP id 881F84014F for ; Mon, 4 Nov 2024 02:35:19 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CSK3l0FnVColNm52zWv081aHNNN1S8dJU+ToD/2NNp8fl6wqeQy1oenjRV5LmFD8u1aEWWldJjuL3kIWdIL6ZqBnpFZJiOmomQQHoWuk9NZYN+HHEACxJMmj0Z+JrZHht6cr/BuB/SbY/Xnp0C62d2LHbGPtyv0WJ5Y6dNIHdQHjkW7kwFvvCUedDZNQLzlpogfc6N5Z8UV+4cVZcfpRubgb+y0HXNVt6MfOpThGrlMQk2mf7PZ4zNUVbXp3tnpz3WwUjakiwW2cEI671Y08svjRmgPY8pxXNU6P9ulTF++aBEFNLJ7ZhSd7xpqHH86GmDdb3vUixA5Sea6awUCDzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=/uHewTUvOlF241tjf3hK5AXazJw3Eblo234RPyAJv8g=; b=sxvcEes05xL7gli/Ay3Yk318tmMYh8ZjAHdK9I0C/uSChlJZI56dL1MCYGvjXidONjN/GuieDjm+3tMOI4eqOxr7x4drrTo1wovBs8RWBV1hPIqZkmD5wu952g1ddilPF1k0R7FrH+tEj5DeKH4+VvUpGQYpk/ybE7pX1/MCGTXO6coONyyL1oUUbqzUgjQ1hBGxyaDPBxF0CTsKs5tyvqyZcrf0/nJJP+jd71WdPkpKrhsOx8vq8kAqucHMYgN1ODCxz9501Tt5M4GNrfx2YCnu+j0hQdp0klaot+cLgLeFIPzeZa7jkyV0j6ByuTlkB5p8sFwnEpl/fKKtXXhnqg== 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=/uHewTUvOlF241tjf3hK5AXazJw3Eblo234RPyAJv8g=; b=o3LlzIAOsVxfmdGMwyeJ+zrZTw531CWfkU4EhA9PW545chcAP/oeuWIujpGbzE0Aos3wNY/8XSMjgnu5FKiIzTQBMMGxWZ5zeHKq4m3YhItstybDpIw3I5H7xn31qoNfhn3uukAWA+ZA0vvj9dwQwKZDJ5Wq1D3vV/dJiU+Gkm0= 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 SN7PR13MB6158.namprd13.prod.outlook.com (2603:10b6:806:323::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 01:35:17 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%5]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 01:35:17 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , peng.zhang@corigine.com Subject: [PATCH v4 1/4] net/nfp: fix port index problem Date: Mon, 4 Nov 2024 09:34:39 +0800 Message-ID: <20241104013442.308780-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241104013442.308780-1-chaoyong.he@corigine.com> References: <20241101025713.290462-1-chaoyong.he@corigine.com> <20241104013442.308780-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR06CA0009.apcprd06.prod.outlook.com (2603:1096:4:186::17) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SN7PR13MB6158:EE_ X-MS-Office365-Filtering-Correlation-Id: fc418c89-4c4e-4552-f948-08dcfc70f028 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Xle+BrzJrgDPyffihabSvQBAJj/61xYh09K6ihj+39K3l+CQ1XL8t+VvdaQq?= =?us-ascii?Q?Gsno4cZBq7ODnPb9PjULIOFCieEj1iRX06TCdD6IdiCe4PpiI2ksqiyHUTLi?= =?us-ascii?Q?SNfDwt7xJSDQoSr1YeonWEiJwRI2ZzR3bURAxEAIK1eBwMcx+8GplnJJmC1U?= =?us-ascii?Q?wQnnfnWalwtOXuzBuNv+9rVzgOwU9MK/bl5pS5UGRjb+G/x7K6dtkWCtYHW6?= =?us-ascii?Q?IgXZibg33KbOIB4mL9N5BVjUo+UK8PzpCIP0wOCFsijI/HnLvTrkIPt83KCu?= =?us-ascii?Q?4Wc1SNSxcRhkEV/1qFnh/c1DFV/+kl6j3r/kZownFb3kEopmqkOux2YCyImT?= =?us-ascii?Q?21k5Tu3NryTNxsjwgwf1Cz/k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ascii?Q?/zyjlAm7glPiO+NDu2fBGhNAjAX4du29VRvivxv6vlHYoL4IPzgs4ubEJ/1v?= =?us-ascii?Q?C/ZWG+SCO61LpND0uTFaRxvklAL3xNE1oM/5Z8Yo9nO0OEs+OZCh0XGO5nAs?= =?us-ascii?Q?LnKalZ0=3D?= 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:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?J+/V0YpiUq+NNydLXwAqJwyAKq9fFkznbPzuro4sYurPwkB+Clwbuxy+JAT2?= =?us-ascii?Q?y/bxbwChRgbn2lWZXtMVK/MKwf+8qd2x+DWLcXuUdc3+cNIur4lk0NdZK31X?= =?us-ascii?Q?bKWp/kaPWY1HhCwLvKa/qy1VtIUCpJE9HJf0Ko3JaBhDHxuMWLQ53Lx6llE1?= =?us-ascii?Q?wZ6bZCmag2TApnLHRCw3xwgE89SsOgqmw0ywnIUdv/Qf63kSHe+GRFerkkB0?= =?us-ascii?Q?N3wynoyVtSvuuH/NewVnEAm+DeTA3wPcjovYzmgFpfXsKnapHNSI7kRa/tZv?= =?us-ascii?Q?LezX4GAlpPdw1jmrwlSDH7GtbdEHuaoy1xtDjGBVfGilTTMTZtLT5XUo4Xxh?= =?us-ascii?Q?myAKjZXtlfgFqcSGyOQYlucKu4UZCRO1XqWMSC1/BOKCU+7p5Bgt81XEVc8H?= =?us-ascii?Q?Zv/AzumsNjiX7GfYtIZNtjSdqxLgFfIShudqnwAfo/nTlWsQEveDEjXgVVm3?= =?us-ascii?Q?alWN4My40dnepJVjV/t/6EVwZiTTwfTXKXJUPyZDUc8d9VpHkXj/M5zaJhUQ?= =?us-ascii?Q?OuV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?= =?us-ascii?Q?Jmx6BT4ME5KPJeRfw4Ag7DvPrse1qiJMJ5FjvrHpLmspHlIDydYPYIysBGag?= =?us-ascii?Q?/5WqPa83eSo41ZAOSb3kmGfzpObmJnMyWTW3HPRVVrkUyPIMx4mt71ZOKuiy?= =?us-ascii?Q?iwwRpIOqjwJzTiSLcplkyx0rEp3VzD0/rRLYB9oJYltVaHWpb0UGmEbSKUZy?= =?us-ascii?Q?PQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc418c89-4c4e-4552-f948-08dcfc70f028 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 01:35:17.7429 (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: HaKOl0eO+eAlpW+UrHY2x5A66//8MEmCw6EhuHH7Zmtah491s/r4AY+YQ2coHywmazhcIF15WPyIM/yOE5RUpOX8Ysp9s5+KCh+JAX0mUsw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR13MB6158 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 Fix one port index problem imported by mistake. Fixes: 97b6825d9a7b ("net/nfp: extract function to allocate PHY") Fixes: fd1ec7bc8f0a ("net/nfp: extract function to initialize PF") Fixes: bb9f9fdcbe00 ("net/nfp: extract function to allocate PF") Fixes: c8e29c168c20 ("net/nfp: extract function to allocate VF") Cc: peng.zhang@corigine.com Signed-off-by: Chaoyong He --- drivers/net/nfp/flower/nfp_flower_representor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c index 1f1b462b41..56690ec42b 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.c +++ b/drivers/net/nfp/flower/nfp_flower_representor.c @@ -672,6 +672,7 @@ nfp_flower_repr_base_init(struct rte_eth_dev *eth_dev, init_repr_data = repr_init->flower_repr; /* Copy data here from the input representor template */ + repr->idx = init_repr_data->idx; repr->vf_id = init_repr_data->vf_id; repr->switch_domain_id = init_repr_data->switch_domain_id; repr->port_id = init_repr_data->port_id; @@ -930,6 +931,7 @@ nfp_flower_phy_repr_alloc(struct nfp_net_hw_priv *hw_priv, flower_repr->repr_type = NFP_REPR_TYPE_PHYS_PORT; flower_repr->port_id = nfp_flower_get_phys_port_id(eth_port->index); flower_repr->nfp_idx = eth_port->index; + flower_repr->idx = id; /* Copy the real mac of the interface to the representor struct */ rte_ether_addr_copy(ð_port->mac_addr, &flower_repr->mac_addr); @@ -985,6 +987,7 @@ nfp_flower_vf_repr_alloc(struct nfp_net_hw_priv *hw_priv, NFP_FLOWER_CMSG_PORT_VNIC_TYPE_VF, i + pf_dev->vf_base_id, 0); flower_repr->nfp_idx = 0; flower_repr->vf_id = i; + flower_repr->idx = nfp_function_id_get(pf_dev, 0); /* VF reprs get a random MAC address */ rte_eth_random_addr(flower_repr->mac_addr.addr_bytes); @@ -1022,6 +1025,7 @@ nfp_flower_pf_repr_alloc(struct nfp_net_hw_priv *hw_priv, /* Create a rte_eth_dev for PF vNIC representor */ flower_repr->repr_type = NFP_REPR_TYPE_PF; + flower_repr->idx = 0; /* PF vNIC reprs get a random MAC address */ rte_eth_random_addr(flower_repr->mac_addr.addr_bytes); -- 2.43.5