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 472C9423A1; Tue, 10 Jan 2023 10:18:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3E7940691; Tue, 10 Jan 2023 10:18:56 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2062.outbound.protection.outlook.com [40.107.244.62]) by mails.dpdk.org (Postfix) with ESMTP id D45F140689 for ; Tue, 10 Jan 2023 10:18:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j+lfoYem2aGrZIbZBigx1ODn6ZKuPgSGiziCp5T1xzj1xypA6F0C6KUoU/BPrEOdzL+DUwpcL1Zgh+2LLpkIBLnMaxT/dd2efRF6kUMoBHvDFlTjX35AH1nhA95s8byoWLdMqajWVFWvrnsDI3YdbKejs11ITi0Vrsp7DYYBR1u5CQoFwElvnGoh0OhZcWHCy4KIig4sJAM2LZ7jcEenv+NCb4jkXaz6feyDFr7YSFNhEH8NUssMaSRbM8O2ENuPgb+4/E2kfFhqrvaemfB78KiIls+i8f7cn8Ni7g7TjroL6AvapRY035YxTJu6uVtLJg0JJNTuTY0RE/zBil7Ztw== 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=yvoIjRXvYLCTf6o8rPzKxp8whhogs7HCqvehhhHPQKs=; b=dygzLh25EHkmSi5ka6sLmPHOh5nG2bp8DVRsJlxmV97u/13gcMGj1leveVGqskJnj+G9RprDodOmPzi84Ib21mzlCT4u2mS2yZnKdwBM0xtyLxy1rAsj56DumEgoLzyXc8wXH9Zrr5LyxSE8dqzN/4DiWTAsBiikKjcc2Qwx2zxthY35cL3v4SMJhDwqFBS+UiIm2YBPgXlVgjSGp+4uRkpuUkjhMNlgM4IlR1P0+i2yJ6e84A7oDsnZiDO2vmMwV5vtFxvPm0ofZn9UA8uznumFNFn6TPAgli/hP634u7e0IZZyP1vrBiRyXBV/Npj8JOOqiRo3hq8FPhOh0kzjOg== 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=yvoIjRXvYLCTf6o8rPzKxp8whhogs7HCqvehhhHPQKs=; b=T8P+Iwrgas5OPhMUdmG6Y3nmudBs+4boVHC4yPxGWTJc+kjB+2Cgl89kZ9fSERlMjR8yWU2p1xPr8VUjKEdl1wn/YdER/00DfzMu31d5mol2FSDjuwspgrLDG+tW3x76cKI0A9uxzMA6pvZe87zGAngHPUMNnljWRQRlNK1uu9g= 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 PH7PR12MB8156.namprd12.prod.outlook.com (2603:10b6:510:2b5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Tue, 10 Jan 2023 09:18:51 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%9]) with mapi id 15.20.5986.018; Tue, 10 Jan 2023 09:18:51 +0000 Message-ID: <822b122f-6664-c399-1a2d-1bc40fdd4356@amd.com> Date: Tue, 10 Jan 2023 09:18:44 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2 1/2] eal: provide leading and trailing zero bit count abstraction Content-Language: en-US To: Thomas Monjalon , Tyler Retzlaff Cc: Bruce Richardson , Stephen Hemminger , david.marchand@redhat.com, dev@dpdk.org, =?UTF-8?Q?Morten_Br=c3=b8rup?= , honnappa.nagarahalli@arm.com, jerinj@marvell.com, ktraynor@redhat.com, maxime.coquelin@redhat.com References: <1669241687-18810-1-git-send-email-roretzla@linux.microsoft.com> <836507794.0ifERbkFSE@thomas> <20230106185825.GB20685@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <2092862.OBFZWjSADL@thomas> From: Ferruh Yigit In-Reply-To: <2092862.OBFZWjSADL@thomas> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0453.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1aa::8) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH7PR12MB8156:EE_ X-MS-Office365-Filtering-Correlation-Id: ee62d92d-df84-4d07-5dc6-08daf2ebb03d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N/6Nt+I0WnyzWy1mceT6BkoM0oKawqD96uZOOWJMrStOWq2bG+rk5gw7ZrOi8kf04Ol7l+PTrSbmNy503Uq8VxQh5YkzQx0DvJ5bGU5CIEnwhpGR2tL8ljUfa7tTC1trTKoET5NcyMAtCNE1YgqP9pxMj6x4mH9k7Wid30QF0uLs48UrJOWkNdUqcvC4HYFOxeJvhJgg+dgiZDaMsLdXpdeagPU+J+9DSfoNcjORxBdithBbtHN7jiQJkysHZzu6+sBow4kBrt+p/038gTfw7JRdpWDMUMpYQORI8/0kZ6hQu81hdHNPyG6ePjq8vXtKlDpTAGoaySi0NU6TYGsdkzpiViXgMpr9bwtivALTDusVmIDEHvOEtcUYMnCZhxuK9EyV2SYMzOylsJfmKXhnWCPnToFhgh6hQOrtARs99pHyRSODrlOZRtKmlNRfSAC8E4UW/f0OdnOLAj5NyU0E9wwSsP2W/TTzQO2H0WPNEraHdA+FQ8SIq0ZAIlhEOVd4TfXJx12KznmsWrpCBzwtCBYMSKf1zM0GrXiwIHXBkBdfBaG0lBjbkdvfHRfk9IK84qxymlosi0FuoIN6/MVwlCS6SDgZ5f+ZaFprN3oXtt3EapP3u/x8XvPXc+HP/B3nWo5gu0/Esj3NHCGyYSTplb/OieNLOXTWFPT6pXV6GJVGL+JZntYEecZDaMxwJwcKoVjNdRwbJX+yPrr3oIcKWL/EKk/GZrRxVOun7eTIY60= 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:(13230022)(4636009)(366004)(376002)(346002)(396003)(39860400002)(136003)(451199015)(44832011)(2906002)(66574015)(83380400001)(54906003)(2616005)(7416002)(66476007)(66556008)(5660300002)(66946007)(6666004)(53546011)(8936002)(26005)(186003)(36756003)(6506007)(6512007)(31686004)(478600001)(38100700002)(110136005)(6486002)(8676002)(41300700001)(86362001)(4326008)(316002)(31696002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Uk1QNE9SRkNYVzRaRUVBUklleElibG0yTWJNTG9qNWpPMW9zbW9naFRMdzh3?= =?utf-8?B?a0dyWkpiOUVQRnRUTVZ1UGg3N2MxM0VtOWQ0d0E2RVBCL1pIUk1wSE1EdjAx?= =?utf-8?B?cHhENVRRL3pDMDBWWFBFU3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?B?aTBGM2xHeTBhSExPNjgyb1ZadHluLzJwQXFXUDY1SmYwNFcvU2FIc1JWQlcv?= =?utf-8?B?U2FHNlR5Wkg5LzZOb0pJSTJaYWNaWXAvVEtCb1NhSU9qN0FSd29aaENDZWRn?= =?utf-8?B?ckh0UENLUVpKVGR3ZTEycE8wZVBleHRCM1FzTlNVTGhua3hBQVBYUnFYMmUv?= =?utf-8?Q?eGSlXj/5Sq7qKUUbJGrHkPLAL?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee62d92d-df84-4d07-5dc6-08daf2ebb03d X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2023 09:18:51.7518 (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: as4HJTJc5OzSUjMaQnqzlEuyZJ6CiXq8Hui9hXyMzXodMMZYsNPgiIICOuvflwCn X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8156 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 1/6/2023 8:51 PM, Thomas Monjalon wrote: > 06/01/2023 19:58, Tyler Retzlaff: >> On Fri, Jan 06, 2023 at 02:40:59PM +0100, Thomas Monjalon wrote: >>> 06/01/2023 13:41, Morten Brørup: >>>>> From: Bruce Richardson [mailto:bruce.richardson@intel.com] >>>>> Sent: Friday, 6 January 2023 12.48 >>>>> >>>>> On Thu, Jan 05, 2023 at 04:32:40PM -0800, Stephen Hemminger wrote: >>>>>> On Thu, 5 Jan 2023 09:21:18 -0800 >>>>>> Tyler Retzlaff wrote: >>>>>> >>>>>>> On Thu, Jan 05, 2023 at 10:01:31AM +0100, Thomas Monjalon wrote: >>>>>>>> 05/01/2023 08:09, Morten Brørup: >>>>>>>>>> From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] >>>>>>>>>> +/** >>>>>>>>>> + * @warning >>>>>>>>>> + * @b EXPERIMENTAL: this API may change, or be removed, >>>>> without prior >>>>>>>>>> notice >>>>>>>>>> + * >>>>>>>>>> + * Get the count of leading 0-bits in v. >>>>>>>>>> + * >>>>>>>>>> + * @param v >>>>>>>>>> + * The value. >>>>>>>>>> + * @return >>>>>>>>>> + * The count of leading zero bits. >>>>>>>>>> + */ >>>>>>>>>> +__rte_experimental >>>>>>>>>> +static inline unsigned int >>>>>>>>>> +rte_clzl(unsigned long v) >>>>>>>>> >>>>>>>>> Don't use l (long) and ll (long long) for names (and types), >>>>> use explicit bit lengths, 32 and 64. >>>>>>>>> >>>>>>>>> E.g.: rte_clz32(uint32_t v) >>>>>>>> >>>>>>>> I agree on using numbers. >>>>>>>> >>>>>>> >>>>>>> love the idea, fewer functions too. >>>>>>> >>>>>>> though it is a shame we cannot adopt C11 standard because we could >>>>> just >>>>>>> do away with the bit suffixes entirely. >>>>>> >>>>>> We could but the project needs to support older RHEL releases >>>>>> which have older tool sets. Though probably this is moot point given >>>>>> how much meson seems to change. >>>>> >>>>> True, though meson tends to be a bit easier to update than GCC on a >>>>> system >>>>> - no "pip3 install --upgrade gcc", sadly :-) >>>>> >>>>> If we can't go all the way to C11 support, how about at least going to >>>>> C99 >>>>> support? As far as I know DPDK has never updated its minimum C-standard >>>>> version, and it might be a good idea to start the process of doing so, >>>>> even >>>>> if it is a baby step. >>> >>> I am in favor of this baby step: define -std=c99 porject-wise >>> and see what are the effects during the year. >>> >>> >>>> The DPDK Getting Started Guide [1] says: >>>> >>>> "Required Tools and Libraries: >>>> [...] >>>> a supported C compiler such as gcc (version 4.9+)" >>>> >>>> GCC version 4.9 supports C11 [2]: >>>> "GCC 4.9 Changes: "ISO C11 support is now at a similar level of completeness to ISO C99 support [...]" >>>> >>>> So why are we not going to support C11? >>> >>> We should make a plan to switch to C11 during next year. >>> >>> >>>> Probably because of RHEL 7, which only provides GCC 4.8 [3]. >>>> >>>> RHEL 7 was released for GA on June 10, 2014 [4]. If someone has a server with a nine year old distro still used in production, it is probably because it is running some legacy application, which is difficult to get up and running on a newer distro. Partial conclusion: RHEL 7 is probably still widely used in production. >>>> >>>> However, I have a hard time understanding why anyone would build and/or deploy a brand new DPDK application (based on DPDK 23.03) on such a server. Can someone please justify this? >>>> >>>> Are we really going to postpone C11 support in DPDK until June 30, 2026, when RHEL 7 ends its Extended Life Cycle Support [4]? >>> >>> RHEL does its own choices to support old software for long. >>> Upstream development should move forward. >>> >>> >>>> If so, then the GCC version mentioned in the DPDK Getting Started Guide should be corrected accordingly. >>> >>> No let's keep GCC 4.9 as a minimum for now. >>> If needed we could upgrade it later. >> >> but i think the point Morten is making is that RHEL 7 gcc is 4.8 and >> therefore we implicitly no longer support it if we document requiring >> gcc 4.9. > > Yes I got it. > I think everything in DPDK works on RHEL 7 today, > but I believe RHEL 7 is not a strong requirement anymore for the mainline. > Asking for confirmation here. > >> so i think the way to do this is through clarification at the next >> release / ltsc release. starting with dpdk 23.xx will require >> compiler conforming to standard X and optional features / annexes from >> standard X. anyone building applications targeting that version of dpdk >> release will need a conforming implementation. >> >> from there we just need to take care not to backport any code to >> stable branches that depend on standard features that exceed the >> requirements documented for that release. > > We could even start testing C99 requirement in 23.03 I think. > > I missed discussion in this thread, but replied in other thread, replying here too. +1 to switch C99 support. There are bunch of C99 features used within DPDK already, and there were some drivers compiled with c89 support, that restriction is removed now, so it should be OK to move to C99 support.