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 1E65C45C22; Fri, 1 Nov 2024 03:57:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B30FE43492; Fri, 1 Nov 2024 03:57:38 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2096.outbound.protection.outlook.com [40.107.236.96]) by mails.dpdk.org (Postfix) with ESMTP id 794BA43283 for ; Fri, 1 Nov 2024 03:57:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lQsIutm9JudJJo967zP3R7u60pyvkTByy8K7tkLpBJoviwRIy0XHPJXhRbSoSB1+2usOkhK8Rl5VZtDwUKMMCjH/4lA0wcUMsPDDklaLQgA5U3NdTwsTLPyfjJFD/gLfFRm1GF+zRjejC/FG72KHGnpagC5rTVDmEgfW5meZZwDFoRDwgUt3vPfUmEniMMPsp4DoWffGhpnJTL1JuiFlXyW4j4U7FiYA5dbyFvUbeD7Fz4UrovjCynb2zvOSqT3j/Lsi0xZ2bfPPc9GihmTR7xDU6spdAL8SPKv2+L8by2Rsj/24P9Zl81LeMx11Keyn2QcWlFm9bedP0ifvE07r+g== 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=JQ2oQLhe9/T3MZOUgsucXNeoC1WxN6IA7mQuRd91WH7jB2UnYIlN095WaIGve04Z2VK+nuJRi28dRNJA+AbbYEp51hJsZIwumuv0iA3LFGCQYdrwvNNn7cINgdrC5SxyjPfbIHgy/gkUircdnAkhSsB28lSgMZy2u/ZAeJrVd0mPhJ9GnrexNhItSOzLzpSzRM9gFzDcfBPU9g9MO5dtLOsUCCE9dsKnIEw5nPihKcA8sepfPl43H5bjHEE025MddsKqFoJXgoZnC44Qi3v0E58u16fRBD9PwR2+c1sn/2Z+IE5TsITBpgkDmUKIOlRTdSBQj+YqWQNeCvuGF8Gr+g== 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=bjTPEVTT1DHVNApXfPOv36LZtSe9ehYj/ece1OdqimQtwDw9Mtv19OINGV8shHLRe9Mu4illrynjqBnGfzeJO83y/cFYtohOqK+h1sy2u1QE1Ordi3ysjW/kOrVEWhdqprFpW1IrUutLK9B/PV0lijmrqF+3M+Lv30kJzx22Vbs= 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 PH0PR13MB4891.namprd13.prod.outlook.com (2603:10b6:510:96::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Fri, 1 Nov 2024 02:57:33 +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; Fri, 1 Nov 2024 02:57:33 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , peng.zhang@corigine.com Subject: [PATCH v3 1/4] net/nfp: fix port index problem Date: Fri, 1 Nov 2024 10:57:10 +0800 Message-ID: <20241101025713.290462-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241101025713.290462-1-chaoyong.he@corigine.com> References: <20241030082759.209617-1-chaoyong.he@corigine.com> <20241101025713.290462-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TP0P295CA0031.TWNP295.PROD.OUTLOOK.COM (2603:1096:910:4::12) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH0PR13MB4891:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f363d67-1867-48f7-2182-08dcfa20ee9c 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?G1BOnT9NpHt0Wgz1suufI9iJGuOwWp1gaZ+3PHbmcDbI49/eu8LRTMqRnX5R?= =?us-ascii?Q?9CLhBDIh7+i4py6klwrUHmXC2YPpvzsImimBKKxDqNPxOybtAHrZBNIGIs85?= =?us-ascii?Q?Elj1RSTG67Xy2w43Y01xaDdIbLt5HPVdmhTwzAdjtsR0WOWSl+MU/qLVSFbK?= =?us-ascii?Q?eXDylAZa6ZhhWwBWse9srZmQnGD8LKn5HRQy6BmVuN+iC0xloiziKsBPNwJg?= =?us-ascii?Q?iyCWtzIRJUi0HyBJl7Ax/URnFG5oEalaNE2jGBt7ldpzuFA8l3xSA5jM/vdO?= =?us-ascii?Q?nbouSjY68C1fWV2Mn/GLi9ANWc9EsJMILMI+wB82rvw2ebIrK6T+2lW1n+Kp?= =?us-ascii?Q?nztwif3SHnIYZ2Q0mEjqdBi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=?us-ascii?Q?E6tYhYgd/DdBgfqALnvicq5+Jb1aPF7tx8ZhslBUUF545K+cTzheafFuY/fM?= =?us-ascii?Q?7osi1WFZ93hHZdd82HXZZL4jz5A4BbMhiIXIdUVGi4e8E8ucGtMZIUXQCIi/?= =?us-ascii?Q?zTcm3RA=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?8GpF1wRJttIbfiGtWOAh5p3Bub1ookthpbvQn16WfwPnpx15Ay07itaaoIdi?= =?us-ascii?Q?KnGtfuCb6WuK9Tf0h+1yCt6Hb/CxJQX2cPtJ9byhYqPwu5KHSYo1HlIOttZm?= =?us-ascii?Q?qFeDAcjOAZDfMs8bDm62fYC0Ch2OixizuF6ZL1lOSgU+V5oG4L8JnZFR6cQd?= =?us-ascii?Q?fFAK9OywAOeFusku7hw4mZ46Ho5VfllGQizkp0ZOluqDFCLNlkGfyHATOa79?= =?us-ascii?Q?9lAEjIz/UJ9sjMHvrnYZl0oalHhFE+4GemJTyr1l3bc3j+QsW2Djxhcpi/+s?= =?us-ascii?Q?SVzHqIFR3xfhJ59PEbWob+Oq0h46NdDwC+pVBlAgONalu6281Z1ERM6sTzYS?= =?us-ascii?Q?mnsIXG8Ra9GEtLn2DN7pGwmfbNbqe8flX3f5R0ZUHvm7KrlYCbaHgShn2nNy?= =?us-ascii?Q?qAlk4j5NXzaE3olhYVKRDtkeGyj8w86i+kXow7TaE4Tn0ShNLhDfwDpL9g83?= =?us-ascii?Q?hOCFOBXF8myUdKBnhqltTEO8bX29Om1xWjQQLyekUdL2IVz4AbBuYoVNJWTu?= =?us-ascii?Q?dGOXk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wc/CUV0Kze9mK?= =?us-ascii?Q?JL7f/LD1xoNamw7aSz71jcDlanXWSUiK65xTK2S2/GGRRHJ6Elf2YyV234gw?= =?us-ascii?Q?2vYfGpR10qUW8p+oea5cm5Krz5fRHOf0hIyFnUhbP4rgT2l+wjdAzlIdED9s?= =?us-ascii?Q?OtcYQ/pNwQSPElhOp+unNzMEnUJ7wcPOMqaAOcYextfuVk4BCWWhFijEq6yq?= =?us-ascii?Q?lw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f363d67-1867-48f7-2182-08dcfa20ee9c X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2024 02:57:33.0725 (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: fbgq1IaRq12GVaQt9mmSSYp9gKevZchHtYSnbtlAENDJcEgL9SXxh9Nnv+Z3Hnl8U0Rm4V725YEqy2EbsvOt6Y3mFR9I3rXZA5XiAjrHa9U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR13MB4891 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