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 D9658A00C2; Fri, 6 Jan 2023 13:41:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B30ED400EF; Fri, 6 Jan 2023 13:41:26 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id D0989400D4 for ; Fri, 6 Jan 2023 13:41:25 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: RE: [PATCH v2 1/2] eal: provide leading and trailing zero bit count abstraction Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Fri, 6 Jan 2023 13:41:23 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D8762F@smartserver.smartshare.dk> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v2 1/2] eal: provide leading and trailing zero bit count abstraction Thread-Index: AdkhxUP98fxlJuZRTKi9Q+RzvCBr0wAAa1cQ References: <1669241687-18810-1-git-send-email-roretzla@linux.microsoft.com> <1669246997-30592-2-git-send-email-roretzla@linux.microsoft.com> <98CBD80474FA8B44BF855DF32C47DC35D87624@smartserver.smartshare.dk> <3710898.kQq0lBPeGt@thomas> <20230105172118.GB9408@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20230105163240.78eefebb@hermes.local> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Bruce Richardson" , "Stephen Hemminger" , Cc: "Tyler Retzlaff" , "Thomas Monjalon" , 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 > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > Sent: Friday, 6 January 2023 12.48 >=20 > 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=F8rup: > > > > > > 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. >=20 > True, though meson tends to be a bit easier to update than GCC on a > system > - no "pip3 install --upgrade gcc", sadly :-) >=20 > 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. >=20 > /Bruce 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? 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]? If so, then the GCC version mentioned in the DPDK Getting Started Guide = should be corrected accordingly. [1]: = https://doc.dpdk.org/guides/linux_gsg/sys_reqs.html#compilation-of-the-dp= dk [2]: https://gcc.gnu.org/wiki/C11Status [3]: https://access.redhat.com/solutions/19458 [4]: = https://access.redhat.com/support/policy/updates/errata#Life_Cycle_Dates