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 846B145C11; Wed, 30 Oct 2024 09:28:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 738E743364; Wed, 30 Oct 2024 09:28:28 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2106.outbound.protection.outlook.com [40.107.102.106]) by mails.dpdk.org (Postfix) with ESMTP id B94E643360 for ; Wed, 30 Oct 2024 09:28:25 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=R7FdjkW/FZS/6no7ioBME7UgGAfWoTpz/MeWgCVusjcaWCplyof0lll2LkMJIrEq3eeFTcYOOIqt6ri9J968mgf4XvLCerLc1KhYlMD0zSLCebGMN3YBcCuHdGzYIdg6NxnUQVcj7EBZ7coSfd4eocsTLNj2WywhL7Y5z/AauMFgzlEqfZg/Vy240F84YAkbNM3Yj9nvgW85BvvmamWSANplbNCCcjgdXNDyEFWu/fQACddCiSYTnqfc8EzGXqowc50ZwSczHAGMnLqrYXFCIchI+cVgv/0sp17BkD4GH3VxETER+TAyxzUnFW7m7mIISnf269joAc409ACyCeLH7A== 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=P7aGfFk+wGIrSllPy9x0CNCie+OyAp0RiW9tb3GZ4Xg=; b=sRsuEmnLUvL8e3jQPyc118wNcdCnU2o/ATQPoZDeSLI4JyPO9nkl/JxErlnx9H66KsXNRS9FwJMnGn3LXXZq2Fnp18Q6YXMCpuMcTEoHc/3VP8isPyEYigSS3GGrvZ38yWSi8SJ/w4En0kPlcaPZsdT3xfzSQBU//st1Y+Pefw4TXA4MDbcf9cUR1W1/6Ay/tKIm5JHSAhcF9UyOpWsplh6aAJJj/zL7K0Gh+uuFYOtfCbHmLZshx4Ne1KXBa6K1OSXsTkUDNuwesNWnAg/qIrBTW4Pb1WTsXQSi7AkLwMIyRCWXnJfUmV8IWdrlf4Y0K1iF+kCSe7KdXq3S8G4CWQ== 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=P7aGfFk+wGIrSllPy9x0CNCie+OyAp0RiW9tb3GZ4Xg=; b=OumdIvki6CCYjhYpIHlqxM2GJk83uoOximtNJmzoDN5umxbQf0OOtfFAasYZ6heIzeGkHPHv42KV96AFeoN9inZLOCuY1fdOxomTR1q3a3hNMMXsOqQ9TuSDk6qgrhQXt98Uf2qUo/D3AvvA+H3uB8tanzIkafd4O8oczRt3D5E= 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 LV8PR13MB6775.namprd13.prod.outlook.com (2603:10b6:408:233::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Wed, 30 Oct 2024 08:28:20 +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.8093.027; Wed, 30 Oct 2024 08:28:19 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , peng.zhang@corigine.com Subject: [PATCH 1/4] net/nfp: fix port index problem Date: Wed, 30 Oct 2024 16:27:56 +0800 Message-ID: <20241030082759.209617-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241030082759.209617-1-chaoyong.he@corigine.com> References: <20241030081910.209308-1-chaoyong.he@corigine.com> <20241030082759.209617-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0120.apcprd02.prod.outlook.com (2603:1096:4:92::36) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|LV8PR13MB6775:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a540852-a79b-4239-22d6-08dcf8bccf55 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?qdaQ3Ql9hMnhVDQ83KwUdoKIirADD26vutUrvB7pjiBQpABqWGtaX2OyY1Nm?= =?us-ascii?Q?jM8q1sRkQ8MppAhBkuZRLtMh6Yq6gzOJxEimOqg8qHw3k1O5o1ouFrCT3Lfs?= =?us-ascii?Q?DccAkMpUPFPjkmblezlFjJLc24MOyCnfHTPJjwC+7TFYYHUsNqjtIYAcblcR?= =?us-ascii?Q?/j94qIBOsioOk8D0nDTqKpkfB0TcBcI781d3TqgdH0A9U3uS1t3oJ5xdGkjD?= =?us-ascii?Q?4LTXYoYI9BXdy0gqZxUQqIPViv5cFEsZB6csh1XZsljv45VqOOT+pKa+7Ofj?= =?us-ascii?Q?I2Vgyx6eDP+8WfmTHGtyCCToURsBglS4IeNOCb5vKUo5IXv+nmBq0bxnCtVB?= =?us-ascii?Q?wnleRRKd5DAGCi6XJXp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Pr1cDC?= =?us-ascii?Q?Otg67JKDV8EJ4nzq+VqVCXIURBZpKp3DBhNju+Nrn1wxo39UhLF96wyZnylL?= =?us-ascii?Q?gVkrr+3L0zveaFysr6uQ6aHKvqbafqE+vqKcekFkMBv/dGYlh1TI400NiK9Z?= =?us-ascii?Q?jMJIl60=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)(366016)(52116014)(376014)(1800799024)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?+PU/clhx8oI0m50O7w+Qd3syiR2axVqqZ5n8b8cTKMq67D+5oEI/SjUlA6e8?= =?us-ascii?Q?ezbJlYYo+jt6wE/cNlgN1oqXe7BIeKjqktLspKCvl3X+iHP2AFNCCdO7g6YD?= =?us-ascii?Q?ZlTPEUOsOdai3VH05FPBqGGeehsR0ADNgC9dEY7LBkjDNX66I27gInxrAadK?= =?us-ascii?Q?PWO9lc+3u4RZaeB+eOeWiR69UvHBTe6iDHIh0C9mrzH2pX2MSNE2dhu8Od/X?= =?us-ascii?Q?dx6J16apH4o22ng/xfJ3a9SkkkGOrhPMRzuSXkzId/qPBcQ21kO1OjN3auGB?= =?us-ascii?Q?YNePCXosf6IFzE5wvfaRkrICTTVF9bSiYqgGhrX1QFiLznhjY96I0zqgpaAQ?= =?us-ascii?Q?gg8C1vxPzURz9kyjDfb2RppulAVSQCMIs7Xv6fpJHdhavOWK2byxlu43NJAr?= =?us-ascii?Q?dXBoTJuhR/gI8Vf4F2xqgZXXfjBGF2TqyFbAVa/vCL/fqri40Zk48+QSfCyW?= =?us-ascii?Q?C2xrFR5/6HSg3PhrNgWAESFtUvW9OpZ2ioOeIKAKcfyOO3D57ZnbGMhhL2X/?= =?us-ascii?Q?Q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ftWg4NpXJajcSHPQS/YKPTIAs6K4?= =?us-ascii?Q?jsuh2CFxlKVc1y4fISOOiPWQZIqUOn7cH3nTaPF7kOowZRHEeYmjWPFw2CeB?= =?us-ascii?Q?pgsdduPQPyyfmXWk/D2wN2G8kNBpNzHfAvpzgy0s0U5jajak0LVg8bU4nohT?= =?us-ascii?Q?LCz5nsLVp3BO1zz5hsIaBG7dbjxG4VmUylvGe+TAHGB7RTn0Q2vlCkZ4p/8/?= =?us-ascii?Q?qA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a540852-a79b-4239-22d6-08dcf8bccf55 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 08:28:19.8333 (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: ojBASgB7cYVcZaSdEZ9SgQXRjuHFXiuupJhLO1/XyffjrmP/iIbjjDCZJHj7/DAytKsKEiStbMJln04JLJQmtrJ1Kqa7aooVYg9USw6zeic= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR13MB6775 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..7c55f0ed21 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 = 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