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 0942F43B8F; Mon, 4 Mar 2024 16:58:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88C0540695; Mon, 4 Mar 2024 16:58:58 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id D224A4027D for ; Mon, 4 Mar 2024 16:58:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e+rn24hzGhuFn9l7SjgbwBlqOU50pnyhgF8UQyoDmimvIT3+NGiLe4y4aeF4FuXyef+rW1JWV6ijqbalhWkScO5OV/a68Iyedmt9p2skgQXlJcTDcWYkIiG7a/f4cnNN5ZyAPuWP48CUSiGbiiieVqA6ADR3xuolk4UsZ1BBS3nobzeplqgWlyUn4Lw5GZ/QdJeW0T1orhtecaal9KiXKkWZhd5juQp1SMf50JAbvJeVziHA2n8lv0os9yuNjC98E6jKHsN++VtptSweZfiXtr9LxsFJQaoAcSjlx7RlxhgTLj7EkmycDCNjnb5nppa4uV8CHeJs7fEIwSqtJL0HdA== 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=F8PWwDEN2QcGHTOwVaap29aMCA6BaXHx3zj6t+GihjM=; b=VRJWSHMyEnVCRgQnCIM6vFTevsyeZ7yQrfhJL9wviQmGWt1fjy6QGSm7RD/v1+xcLcvcTZcz8voiBGOdHz43O0a7bgmP7JJWvAcBPyHVkYInbPVV5GXytXPnPoNDwfCFgvtqKCAaFoE6Vg9PmgcLQjv6KoWyFB3qzVmDKUbfdgooamDXCL8Hy3MutkO/2vSkyoIpbxYs5cbm5bMPPoBt6G5H1Wmml1PRdSNmiqMY8shDPxVxmiI8FEWrrauqm5oWTQH5wV7xPHHXTOPf1L/WhzQk3o7Nce6XrTn8SNjVMJtspsjevX6qU4KhDDzFhDb2jDmuluyCpBZK/H53xxI+OQ== 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=F8PWwDEN2QcGHTOwVaap29aMCA6BaXHx3zj6t+GihjM=; b=hqP7tBlFBgiVYR/Yq6O9Ng3Oa2/jK4rrraZxsN9f24MFWY6+LDF4MlNBKcVdg/RuD+VXCn77sbOnRNe0bdbTJFuWfmsuDSK82JqQ3SbGWoYkG27tVXdFWHI3xOVej9uvtnEtvLF9q3q32R5EVOT3zCUyXiLwO38uDvbrDjerQJU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by CYXPR12MB9442.namprd12.prod.outlook.com (2603:10b6:930:e3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Mon, 4 Mar 2024 15:58:55 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529%5]) with mapi id 15.20.7339.035; Mon, 4 Mar 2024 15:58:55 +0000 Message-ID: Date: Mon, 4 Mar 2024 15:58:50 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] ethdev: add Linux ethtool link mode conversion Content-Language: en-US To: Thomas Monjalon , dev@dpdk.org Cc: stephen@networkplumber.org, mb@smartsharesystems.com, Andrew Rybchenko References: <20240229123653.1379466-1-thomas@monjalon.net> <20240303095812.2235050-1-thomas@monjalon.net> 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 XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJkdyEEBQkE3meNAAoJEFRTPtCK Km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dK+DLHqNxKuyO 8Zk= In-Reply-To: <20240303095812.2235050-1-thomas@monjalon.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0682.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:351::7) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CYXPR12MB9442:EE_ X-MS-Office365-Filtering-Correlation-Id: 5868a849-b68a-45ec-d049-08dc3c63fe73 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TQ1uZ6VzsWT7xDfpc0t0ha+qa25ExFEM1iUqSeCDrLUE9pVKyF5Ff/y9LhjtJrBqKShD3LtAOpBOJLpRtCrT7kb+Z9bxpEqNfjXzWB043u7RXHysXJGEO+viCS9xSZz7DG9VqGAfsfk9S7nh/28tXSId2z5N6bvipYQC5kfNukW0WnEhhz/OpPAgf9WqVdQWRLFoW5eU39pDzr8xhVXZIaRq0x2zG3QYLdrRkcHI+M/TeSxWklUBdB5rGxUJT7zaGqWFYD1SFROkc1E8lQZ+3mTxooqnjoBG6sDTQ1GukYDN9B3qyPMQWD294FNGI2mHKKtblWFmd9P5LVTgUdRoLfXmdKrdOGLGSIH5I0I5JjrBVvVcR/m3cnDkqP9ixEF4sVwljnXn7RDNTrdb/p6nQpWW7t8lQhC7CcCWFnP+NIrJc/Qw3WqTENDQzosaJx9/2j/DEmveh+rHCUKCREQdIUs7ka46tCLIzJg0aNOWW19ZbPzOJNSYo6bjGHADAs8YnuvxPnneso7NEiDy3TJ1oZIRHh9PQtI5ItP9tZe3Fppu0TL93nbbjvaJW/F/+KYJuVQrlMA04Wa2snddXAxWsbKXSK5U5dOfSRyv+axkfHD+OVFSJDb58GMNZxsP48tm25dNI1EDv2pk/X3Zsx6jrrQd1zGqD76WREQkX8Z3W9U= 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)(376005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RHI4a2Y2Y3RDSHV6TnlUUjl2endhcm1lWHBKMXFTQ01BV2I2bnQzOExpMk1r?= =?utf-8?B?ZEJLUUFLa3NvSjBnTVRmajRaNXl4L0U3K2J0OUl3T2JoUThaSXFKZCtXYml5?= =?utf-8?B?ZG9YeW9OVGxXYWNLS3pubWxPbXVrN25FejloaUlORlNYb29LbW95Y1R0WkMx?= =?utf-8?B?NW5oSFltK1BQUjhyM2dQbUJ5enZqU01ncm84K0VLNWxMTHB0ZCs4dmxGRmdG?= =?utf-8?B?b3VnNFhNYkQ3Yk5Pd3hSc0RMNGhoWkUyRWlQaTVZclB0QTFEUHN5RmQ3SURJ?= =?utf-8?B?Q1V2S0NnL2pCdWNiWFlEVTNNajMwZG1lZTgxUDV2VFVjRW9WOTVTanFGL0x1?= =?utf-8?B?UCs4dmlaL0RjWlVZVDFNSElpYmdtVkxTTXN0U2tHUXNYcUgrSWppNndka2dK?= =?utf-8?B?SHV4QlBJVkFYQ1B0K2NvNEplRmY4MXJuSTZIV09oVTg4RUNuVFI2TkdzTUVz?= =?utf-8?B?MXBCYnBHOFRYTWlYSXVaalN5NytqYmdDdlE4Zjh1aDJDUEx6N01xTm0rTlU1?= =?utf-8?B?SzRtRzR6VzMxdzVVR3FxUEszOFF2M2orQmNGWWp0aEdJajh0ZTAwbU1JZlRU?= =?utf-8?B?V2RXdTlmTWxEck56VU1oY0E4WDZVNysxUHFGZlBUNUpFcW13cHpxeHhOeDVi?= =?utf-8?B?YkdHdDJFcmpLY3pUWVJneC9ZaUV2ekR6c2VBW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l5VHlqMk1MZDN6VklVSzV1Z3Zl?= =?utf-8?B?VVRnM2VCeUxzVm1ZN1FISldNdmJtcDRJYi9qQ3lCMnVuMmllVlI1eGhNZEc0?= =?utf-8?B?cmxXUzI4YVF5ZlpHMVVTenpMeGQvVzE5WlUxN0FxQUUxd2NNenhyTk1nR1V5?= =?utf-8?B?T0hqUVNVZ0l1WDA3bkszekRDMHpQSnlBSi96UnJOMXFpS0diSHd0ejVWWVc4?= =?utf-8?B?SnZpZDQxZUZJTURUQWRvdTFnTVZXVEh2dVllZ2UvM01POWdCOTkwT2s4cllU?= =?utf-8?B?aFFUMXE3VWpoYlFaQnFvbUFmNUdMMlN1L01SU1RSV1ZvT0lYZ3NNcWZjRnpk?= =?utf-8?B?djM4N1lLRDcrNEgzaDI0RmNFWmcxcm1FVkdpT2Y5Z3k1MVNpZkFSM1RwSUJo?= =?utf-8?B?M3VVSVI0SWxaZ1NHU1pUME1qQjFPL210NkpuRC8ycmUwNUJZWndCejNVWUkx?= =?utf-8?B?R0xxVC9KUmxxcUsrUDBtaGpGZS9GbUlCaHA0OWhuUzFzeWV1eWYwSnV4TkFt?= =?utf-8?Q?pweSqSc3VlfVdDWyXJGWOaews?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5868a849-b68a-45ec-d049-08dc3c63fe73 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 15:58:55.1356 (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: /C0h9X/FqR7R03Oe5s+DLlHOvOZRCyEtfnxM90KnSOzEIjTbjWAM6RaIfd8x6Owz X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR12MB9442 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 3/3/2024 9:56 AM, Thomas Monjalon wrote: > Speed capabilities of a NIC may be discovered through its Linux > kernel driver. It is especially useful for bifurcated drivers, > so they don't have to duplicate the same logic in the DPDK driver. > > Parsing ethtool speed capabilities is made easy thanks to > the functions added in ethdev for internal usage only. > Of course these functions work only on Linux, > so they are not compiled in other environments. > > In order to ease parsing, the ethtool macro names are parsed > externally in a shell command which generates a C array > included in this patch. > It also avoids to depend on a kernel version. > This C array should be updated in future to get latest ethtool bits. > Note it is easier to update this array than adding new cases > in a parsing code. > > The types in the functions are following the ethtool type: > uint32_t for bitmaps, and int8_t for the number of 32-bitmaps. > > Signed-off-by: Thomas Monjalon > Acked-by: Ferruh Yigit Applied to dpdk-next-net/main, thanks.