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 1D15042826; Thu, 23 Mar 2023 15:40:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BCA714021E; Thu, 23 Mar 2023 15:40:50 +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 8E5FE4021D for ; Thu, 23 Mar 2023 15:40:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cyQt9v7IxfEXa2Bkmd2GwNJDRO3LcCN+49sFYCnmc7D0RioElYQerFpn+s6ElOoevZcFj57csPvQnj9FgjVzOr4O7YSS/HZXE5lFNXwJdQyA9wzJlmyUk/ne+8O77oZyPOhTBKRnZPYKVOOkweJFP+0eP6KS7NbwE86GNdR/V0vr9XVcQK2tAyA/sUZodj07JdHk1n/8VCcsv02nO2oAW/bEvcKZ0gliqzoUQOLAz1spEvuKZFd4qGtH7qMHkJyw3VL/arz/QrM/F9W0RA4sm3vktLeKBU1BdgJs7eYds12VshQujrslkO3ofUSyPmc9UxQ72rG+2sSGDjpsLP7w7w== 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=EcHH8njw6jAR19o4NU0cCN0hUm3khovNvnbcrzdRKw4=; b=LnYZa2hFqC0XKJQG0kLLPgasC9Y6m4e1K4m4AXKiEk0eAP4DcUiN76tS5BnKuWqMLmOnvpRzl76uAvJJqwCu5KaSmKuc2MKrPAOnOAnrEJOd1KQjd6OsrFRfb8kf864eKtDq0Jwb1JzpGsbwQmb1ES+0M9Koxs6FrKghw9lR+PoP3lHUp6QLr/ARlMmMLg8bhU7Z8MYvWmlV2/oKRgO97g8cRvCeseNNz9k/u/dOU5XLZdGQM4wLOzmWWfCmS1NMYgybHxr1lagEePrc366EQflJ1ZHRSqu4mzX7lN4eVw4ch9jRc4NSltB+cfk117TW50QKD9Rxm2t9dx7+7+HnQg== 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=EcHH8njw6jAR19o4NU0cCN0hUm3khovNvnbcrzdRKw4=; b=EqHX1rA5W+fOR1Y6W2M4RSaQyZhzoa/mVrp1ROL6Ayvz0xJahAVorkZqK6ykIVmoJXa+W52A3QJ9cq1b9/iKJOjZzdmVFgQ5H0pYyeCpzHS71VC+f3xby0iAjlfxL6dwuHbNs8yQk5K9DXQVBba0cHBB+Xtw56iLFveW/7FOZ0M= 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 SJ0PR12MB6991.namprd12.prod.outlook.com (2603:10b6:a03:47c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 23 Mar 2023 14:40:46 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%5]) with mapi id 15.20.6178.038; Thu, 23 Mar 2023 14:40:46 +0000 Message-ID: Date: Thu, 23 Mar 2023 14:40:38 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [dpdk-dev] [RFC] ethdev: improve link speed to string Content-Language: en-US From: Ferruh Yigit To: Stephen Hemminger Cc: "Min Hu (Connor)" , Andrew Rybchenko , thomas@monjalon.net, dev@dpdk.org References: <29b75903-d212-c6e6-eedf-e3bc92ab816a@huawei.com> <20210916025636.48024-1-humin29@huawei.com> <080fa0c3-c518-0e7f-f6d5-146dc9430d27@oktetlabs.ru> <7de60ca1-b652-e102-01c6-ec069ac00baa@huawei.com> <4c7d3345-1957-c85a-bf82-4c3df19f2ca8@oktetlabs.ru> <20230119084559.4828123c@hermes.local> <5f765461-2728-a768-8519-7c91676efd51@amd.com> In-Reply-To: <5f765461-2728-a768-8519-7c91676efd51@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0059.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2af::15) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ0PR12MB6991:EE_ X-MS-Office365-Filtering-Correlation-Id: d6217138-7b99-4c55-b13a-08db2bac9642 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qOaCOWurCuulZf89e09EalPbjf3hW8aif4u9hMDKfEuKTkrSF717oBN9Np0gASLygj4sBuTBkz/mYyhaPei/FrWkQTvPW8JZx5MRv/KOrLzwRlZn4Jh4RjF0j7veWgs/3jRV+75RDoWPyqY5rjHpMYRqPUIgb4I/8UV0CxTjJFuRrPmCW1FXcKqlXBz6xL7SghThwGTC70I1V0EsQwhvCbvGe+/C9zlWcCWfndGQWWjDNZMXwFcdLv4KX0b1rsm+pkXJpkjhIL+PPUVkG8U5hyz2ozhnpEU5W4pL7cXtHnEg4FXqsP2S08aeo+ypJSukLhKX4QSxkazP6eAKSTiDI4eZkHVlpZT6uwi6PPEIehSrWBCijCODlijKMin8DG2/GSapur4iYhEb+OOrc1sP2oHjQ0BafIjN5LAWkebXR2B0/2Cvy9JR57UFF1CTnSabV8GzIrAe8gZrGma5TEofy+dQwiLtAoeTY1wFPi6Yt0cP4aWt7+6OWZFuJ2B+82O2IeUSu/E0PthMPw6dQ8CanSt618GVYMizbdK2BoFtzpR/hKW7JvEzMhjaVXpSYdEmhxju5LGJFs2BoCod9aFsG2mNms1O5qt3D09iN3VrrGf1ZGyRmIRLBc4HB6SvgFi1scOriRGvR+9afnyqZj76IB2W1yJ827Ey0GiQ2X4Gehr4F0CWTbsYhNhQlz0DQ7y+QzPy5cpFGfM9dqL91+srs5LslB+7upknhMK7D7VK6wk= 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:(13230025)(4636009)(39860400002)(136003)(396003)(346002)(366004)(376002)(451199018)(66556008)(4326008)(6916009)(8676002)(66946007)(66476007)(54906003)(5660300002)(44832011)(41300700001)(8936002)(53546011)(26005)(6512007)(6506007)(316002)(6666004)(186003)(2616005)(83380400001)(478600001)(6486002)(31696002)(86362001)(36756003)(38100700002)(2906002)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SjM1Q29JcVZ1Q25WVzEyeXp3clVCbGMyMVdYaFdpbHI3c1FCNkVrZmdUOC9r?= =?utf-8?B?M2x5ckFjUEJJVm42Q29pQmlpSlEwVjlRTnJOTE9TTlNzY3Rpb0pqT0NIRHhR?= =?utf-8?B?UDZnZURjbUx5QXVRUmRZUVc2VTY2K2ViaGh6TGlqUWxVM0o3Nk95MFdWbzR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dIRGlEaUVCSG8yQkU3?= =?utf-8?B?UiszNVVPSEJJakpKYnFvUzN2SnZCcEZ4NVVzSlhnMTBqN1dVaWE1a3U5dDZj?= =?utf-8?B?MGRpWDBoS0I0TUJQY1JUSTFld2JHeEtCYllyWmthV3VWcnRUREdLZHh6MG0v?= =?utf-8?Q?7OFaeSF4lRNv9+IvD8XQEE/8e?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6217138-7b99-4c55-b13a-08db2bac9642 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2023 14:40:46.1861 (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: WiaJKR4M3QGuM43Mb3eVVk7RcE1mvJZt+IrnLRvmuW5aRqvFEcx3cj57nQaD7tFy X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6991 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 2/10/2023 2:41 PM, Ferruh Yigit wrote: > On 1/19/2023 4:45 PM, Stephen Hemminger wrote: >> On Thu, 19 Jan 2023 11:41:12 +0000 >> Ferruh Yigit wrote: >> >>>>>>> Nothing good will happen if you try to use the function to >>>>>>> print two different link speeds in one log message. >>>>>> You are right. >>>>>> And use malloc for "name" will result in memory leakage, which is also >>>>>> not a good option. >>>>>> >>>>>> BTW, do you think if we need to modify the function >>>>>> "rte_eth_link_speed_to_str"? >>>>> >>>>> IMHO it would be more pain than gain in this case. >>>>> >>>>> . >>>>> >>>> Agree with you. Thanks Andrew >>>> >>> >>> It can be option to update the API as following in next ABI break release: >>> >>> const char * >>> rte_eth_link_speed_to_str(uint32_t link_speed, char *buf, size_t buf_size); >>> >>> For this a deprecation notice needs to be sent and approved, not sure >>> though if it worth. >>> >>> >>> Meanwhile, what do you think to update string 'Invalid' to something >>> like 'Irregular' or 'Erratic', does this help to convey the right message? >> >> >> API versioning is possible here. > > > Agree, ABI versioning can be used here. > > @Connor, what do you think? Updating patch status as rejected, if you still pursue the feature please send a separate patch that updates the API via ABI versioning. Thanks, ferruh