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 2793243DFA; Thu, 4 Apr 2024 15:45:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E21F440268; Thu, 4 Apr 2024 15:45:56 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2131.outbound.protection.outlook.com [40.107.96.131]) by mails.dpdk.org (Postfix) with ESMTP id C09D54025D for ; Thu, 4 Apr 2024 15:45:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ajGXiZhyr/DVTGdnLIp5zI7j627d6wVaHy8np6srCfwz5kgq5Kd87Ld+CcwmXQEYn0PYSkJtmdUTo4eX494Y/gEsuSN/aItTlEtGmi6sDYQycGZvY9NxhClLV0s52j1GylMzF6Pr/Xquucd0N3dapWI3SpC8zXt4dFKnEwx3+NEEZ5M/dSG42Gurp6iex7rTFbFcygs35sJ5lM/G6cOc+/jQOoYse4UCX9N2TS1bpn8Fa0zYpFaD4CyLYeRn4hNrYMwlhDBAR1MNgCWfsXkIY81/4eZ2Ws8jSWFIpQ4vWhvV1XA0epMgW46O9qOXk/UTGWGQk7z7OallxeWIAIXM0w== 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=gOxWO6AIBHrPdPU7w6uQU0Ib/9kmwhnm4SUzqObSP0k=; b=S1oQOxFVnw8CYANqbLOVq/OB3GoUsFkbpmMunLi/qCS/oZ/kLFf21yD/uHmItvXEN6RBzg3AH5mLIHj6lktcKlA0lMOiFQSN+Cy/e01oNR5/Gmlo0RJirzlzSNe85t0Gt6aHx5xbSCNBEdbUKbEvZInIF+/xr+JJnMgo47ykOZPh2zst+5d6As+JBTpJM4wA7sUnYkAmYWtidvaVtIAbxcPVXvuS6R598LT13d1/cp6+/KQXdLeOAe5thLU5Eg2eSsjerTVwH2eUG+SoTUUkaazTAYayDSkjfBZ36nO/a2Mtv3f7wBUsBX954MdOeAV4uqUwUcoa9u2QIwqofSx8Xw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gOxWO6AIBHrPdPU7w6uQU0Ib/9kmwhnm4SUzqObSP0k=; b=mUwNo9ZlUi+HfmtjgQ3ecXaDDdJxoY6dQE0h9DB7BvIC5Lr+l8unw6o8jdpymiGYpksYPJ/yvvJclBdWN+i5rujv95Pqc/FORrSCi217AF2oRjWJ45rGlMSvJRXCgZhh4NNZXDo3bgKMxuSVxwGAADFYQoQDAjC9141b/3W5028= Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB5723.namprd12.prod.outlook.com (2603:10b6:8:5e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Thu, 4 Apr 2024 13:45:52 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3%7]) with mapi id 15.20.7409.042; Thu, 4 Apr 2024 13:45:51 +0000 Message-ID: <50320bcc-4ac9-4fd9-a7f1-25bb809f790d@amd.com> Date: Thu, 4 Apr 2024 14:45:46 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/6] ethdev: support setting lanes To: huangdengdui , Thomas Monjalon , Damodharam Ammepalli Cc: Ajit Khaparde , "lihuisong (C)" , roretzla@linux.microsoft.com, dev@dpdk.org, aman.deep.singh@intel.com, yuying.zhang@intel.com, andrew.rybchenko@oktetlabs.ru, stephen@networkplumber.org, jerinjacobk@gmail.com, liuyonglong@huawei.com, fengchengwen@huawei.com, haijie1@huawei.com References: <20240312075238.3319480-4-huangdengdui@huawei.com> <5d2ab42c-4b56-4a40-8e0c-3ac9a5e34ec6@huawei.com> <4326199.QLehXeTyEo@thomas> <5f97ce5c-156e-4250-930f-01c5befdb681@huawei.com> Content-Language: en-US From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8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ZE6igdvkjfYmh+QOrHGZvpWXLTmffVf/AQ81wspzbfxJ7sYM4P8Mg5kKOsaoUdyA/2qVe cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <5f97ce5c-156e-4250-930f-01c5befdb681@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0132.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c6::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB5723:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JIDsPftUD81VfSSBYz/7s4+YVxGtkKcDQu1jn7kgXMBhEwbvK/l7hPzVAbzSSbEVlWrvt88XlNPSDq0bLHznHG5YfB8hZh39wexuWUT8vW2j4ue+s85fqjDR1iYDZhla5HVWp3QOFUvsGz1l2kJMESU/E5GKbWpbAbx57jw/VIJy3uZgjaG8npLTM/4WdL8eOb7TXmQxKiMAD6SBfW4s7SuMtu7IO+xE/wFtwV1nvjDlFbZCfC9/F5HGU9cOxZyEAGeG/V+7hAdyJsVPfRyLhc1FijtmeWubws7N4v0fhJ/THrHu9a4PYrGGkYWICq6IiVeFLbE9PKYHpMKunfUvrGjH7if23667gaaIKgZ2u4mi4nmZkf1CsbR42lpSr6J6PSzUo9zCu87nX7Q1+oe2TvbN259KRk79Q3n/t7lhOmIlBaQY238MLswd93nobNZ/u4rHdIl9mssoicHTikjl3bWwduHhp1gPUQQJ4wPk9VqIkR2zTqKi+ab/jYlM+gZJ0Q3aIv18A2WtgqW2WM89CUVNVbbl7IirDVb7eBp+PoprUcFAJiUCmpAzj5U5l+UqDjsmmUh29DpWxjp8OafnmwENfXqkBvJrsroXZeT3EU2PmI1ebr56U7NxO9tH1krOm3q7QLnq6fFjtYrqFrzdBh2NjOUi+lZbWRaEbeEfRlY= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(7416005)(366007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WWNIUytpVldiNWY2QXpNcXJxU2JEZS96Q1d1TWJBY0JGei9rN1lRaXBkOTZt?= =?utf-8?B?SzVyR1JMRVJXamR4MjE2WWFtcUNPTUJHYjIyUXlOZGlvejRvOTlwSFdpTVdT?= =?utf-8?B?ZEJhN3Z5ZDJnZWNxRGVRKytiQXZZTDBtVTd4a1d3NE1NQURUS1NxZ1VGbVF1?= =?utf-8?B?cElGU0t2ck8vQi9hQkRUMHdlSjJjdHVNYTZsaWRlTjlUYkF6Q284QkhCVUdS?= =?utf-8?B?d0lGVnZFSGw0RXdkSmNRTWhkTHpVRms3L1BwVHUza1ZaV2Z1OHZOTmpwK0JW?= =?utf-8?B?T3VVUzZNdkg2UUlzd2dQUXZRN1JDWVhXRjRzNGQzeDJyZWdsKzdaN0prYzZ6?= =?utf-8?B?OTM2bFhWZXpaRU96M0xUVkRyMXBYNFlnNE1XZlY3ZmNqdU1xbFZrVWxZektK?= =?utf-8?B?dkZBbGJEaUF4NHJGakNsM1MrUzZhakFTL1dZMExZMDlkanpOL3MxL1F6N0o4?= =?utf-8?B?blpSeVVxUWxSTUxxaCtxRGM3NGs3MnFZb3VWQnVVRHRQRFZ2RjhSRXpTR1BT?= =?utf-8?B?ZEFoM0dmOGQ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?elduVm9NZmxwVGI2c1VYWDhOOFAyM1g1di91VklqTEc0SC82M1RtME1QOGdW?= =?utf-8?B?T0dIa0lyVm41S0EzS1hpT3hzNXVRNURlWTEzcFN0aVQ0ZExYWHlXUGJWNy9V?= =?utf-8?B?cVZlNjMxKzQzNVVjQzduUkNNTXBLZ1lpKzN4dlptOGNxVFRpWGhtUkRXbVND?= =?utf-8?B?b2g2WFN1SDJnR0lrWVg3dWt2QnlNaWlzVWFlQWZndVVlSE5veTY2aGwwbjdm?= =?utf-8?B?dXRwL0RVYU1PT2xYTEViaDNhVWZSV2tDOFMwTnZEZjBPUlB3Q1pRWEJWQ3I3?= =?utf-8?B?dEl0T2NDWkJjYW5LdEYxRVJ1RDl6dmtOSHl3U2RqSThNeHJSWjhpN0w2RlJa?= =?utf-8?B?djVRSGNIRXdBNCtOeitxdGtMVS8ydk1tZkRLdnNPUzgrc296UHhkOHMxM2RN?= =?utf-8?B?ZTluWVRNdWk1NGtrU3ZaVktJK21TSEc1Tzg0aXBxWnI2TmZRbURYdkN6ci9L?= =?utf-8?B?VlgvTnRzN2xST29FSW1kV2NybXA3a3VYai9xWFBNUDBuK1hSd3A2d2pnVWZF?= =?utf-8?B?QklGbWIvMk1KSVJlUi9vZkY3K1pZR0Q2TzJjSG80d3hIcDZyVW9Mbk1aelRl?= =?utf-8?B?RW9BcTJpV2xzV20ybTZWM1lCSUxsb2FvWTRrZ0Z2c2tIKzJ1b1JKZEFEb3cr?= =?utf-8?Q?ZSAQ1bKdsXWd1saks8Q0iAa4r?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f038e97-050f-420f-6950-08dc54ad8aec X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2024 13:45:51.9110 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jb0tx6mZlvvF7bTBPyp5ydelnsx//dHy5x5Vm/cS+y06bE3gJv5Alm170sGqnQuW X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5723 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 On 4/2/2024 9:37 AM, huangdengdui wrote: > > > On 2024/4/2 4:07, Thomas Monjalon wrote: >> 30/03/2024 12:38, huangdengdui: >>> But, there are different solutions for the device to report the setting >>> lane capability, as following: >>> 1. Like the current patch, reporting device capabilities in speed and >>> lane coupling mode. However, if we use this solution, we will have >>> to couple the the lanes setting with speed setting. >>> >>> 2. Like the Damodharam's RFC patch [1], the device reports the maximum >>> number of supported lanes. Users can config a lane randomly, >>> which is completely separated from the speed. >>> >>> 3. Similar to the FEC capability reported by a device, the device reports the >>> relationship table of the number of lanes supported by the speed, >>> for example: >>> speed lanes_capa >>> 50G 1,2 >>> 100G 1,2,4 >>> 200G 2,4 >>> >>> Options 1 and 2 have been discussed a lot above. >>> >>> For solution 1, the speed and lanes are over-coupled, and the implementation is too >>> complex. But I think it's easier to understand and easier for the device to report >>> capabilities. In addition, the ethtool reporting capability also uses this mode. >>> >>> For solution 2, as huisong said that user don't know what lanes should or can be set >>> for a specified speed on one NIC. >>> >>> I think that when the device reports the capability, the lanes should be associated >>> with the speed. In this way, users can know which lanes are supported by the current >>> speed and verify the configuration validity. >>> >>> So I think solution 3 is better. What do you think? >> >> I don't understand your proposals. >> Please could you show the function signature for each option? >> >> > > I agree with separating the lanes setting from the speed setting. > I have a different proposal for device lanes capability reporting. > > Three interfaces are added to the lib/ethdev like FEC interfaces. > 1. rte_eth_lanes_get(uint16_t port_id, uint32_t *capa) /* get current lanes */ > 2. rte_eth_lanes_set(uint16_t port_id, uint32_t capa) > 3. rte_eth_lanes_get_capa(uint16_t port_id, struct rte_eth_lanes_capa *speed_lanes_capa) > > /* A structure used to get capabilities per link speed */ > struct rte_eth_lanes_capa { > uint32_t speed; /**< Link speed (see RTE_ETH_SPEED_NUM_*) */ > uint32_t capa; /**< lanes capabilities bitmask */ > }; > > For example, an ethdev report the following lanes capability array: > struct rte_eth_lanes_capa[] device_capa = { > { RTE_ETH_SPEED_NUM_50G, 0x0003 }, //supports lanes 1 and 2 for 50G > { RTE_ETH_SPEED_NUM_100G, 0x000B } //supports lanes 1, 2 and 4 for 100G > }; > > The application can know which lanes are supported at a specified speed. > > I think it's better to implement the setting lanes feature in this way. > > Welcom to jump into discuss. > Hi Dengdui, +1 to option 3, as lane capability coupled with speed, it make sense to expose lane capability per speed, as done in FEC capability.