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 72762A00C2; Fri, 6 Jan 2023 21:51:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B51240141; Fri, 6 Jan 2023 21:51:16 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id 54A0E400EF for ; Fri, 6 Jan 2023 21:51:14 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id EFDFC3200319; Fri, 6 Jan 2023 15:51:09 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 06 Jan 2023 15:51:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1673038269; x= 1673124669; bh=skhmVzT08e2wurd2Pnnh7YRQGFU8LHnN0sTsq4YQteE=; b=s zkwIPPmYYr8f4q8eOzrxxu1OHA6/FUuRFAuvN/Eq9amKcG6PoN2KWP43btKoPcOH aypLP6e9mLYEjNHFlbFJyczAfrsF3BhvEt+tIgW+hAmbkGc4uK4GF7t8BB3bnOcq RgHboWUrZ03Qh4GueBhELR5cRGIGh42OQIvEJ4iA3RsuRNu11tU5eepbxq2gdZ5z H8GQ5U2xm55XjBPmfb1OPckSWxlb3R5d6EFSMK1B9XqBBOnOEeaCPSdGBVIhsuQz quktprj1bnppRf8GFx1LrtUPVcd5VtSPQYUsk/PVngjDcruBpo8SEHJ6x8Tyfkld xwOBW1aNOnSapyY8l1oLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1673038269; x= 1673124669; bh=skhmVzT08e2wurd2Pnnh7YRQGFU8LHnN0sTsq4YQteE=; b=k cZllO0HnfK+QaSYgyTz/edZODkY6EIEUaOMvtlgrV1VfyquzTz6etDuEDhOYYwVe HVlVlqFXqGd14e8yo2hOw/1dGmAKmd+MlnILMEN7T0FpvbvbT9fxsbLts+rEFhhA VUzWckYAC+behfn/dndJyGzZ/EeL/7wS+NZwiham+UoqkZ3Fl1F8o2HCREBHnBmv IjLbT3V1nRQ49ky+CzILu7x5arrnHQjFC85rMbKGKJAwqqtz3CdtFeFJJBXYPA1p 9q/a6Ks5+d74N+D+q5tOZ8QKyNKErMjOjKr5Bu/E2/0awVL00WdAF67JS1E35Y3F uuvZ22GHSYajmPf/dNSBA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrkedtgddugedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtudenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeefhfejleeuvdevtddutdeutdevhfeijeethfffueejhfetuddu vedtkedtieekffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 6 Jan 2023 15:51:07 -0500 (EST) From: Thomas Monjalon To: Tyler Retzlaff Cc: Bruce Richardson , Stephen Hemminger , david.marchand@redhat.com, dev@dpdk.org, Morten =?ISO-8859-1?Q?Br=F8rup?= , honnappa.nagarahalli@arm.com, jerinj@marvell.com, ktraynor@redhat.com, maxime.coquelin@redhat.com Subject: Re: [PATCH v2 1/2] eal: provide leading and trailing zero bit count abstraction Date: Fri, 06 Jan 2023 21:51:05 +0100 Message-ID: <2092862.OBFZWjSADL@thomas> In-Reply-To: <20230106185825.GB20685@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1669241687-18810-1-git-send-email-roretzla@linux.microsoft.com> <836507794.0ifERbkFSE@thomas> <20230106185825.GB20685@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" 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 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=F8rup: > > > > 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 co= uld > > > > 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 gi= ven > > > > > 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-stan= dard > > > > version, and it might be a good idea to start the process of doing = so, > > > > even > > > > if it is a baby step. > >=20 > > I am in favor of this baby step: define -std=3Dc99 porject-wise > > and see what are the effects during the year. > >=20 > >=20 > > > The DPDK Getting Started Guide [1] says: > > >=20 > > > "Required Tools and Libraries: > > > [...] > > > a supported C compiler such as gcc (version 4.9+)" > > >=20 > > > GCC version 4.9 supports C11 [2]: > > > "GCC 4.9 Changes: "ISO C11 support is now at a similar level of compl= eteness to ISO C99 support [...]" > > >=20 > > > So why are we not going to support C11? > >=20 > > We should make a plan to switch to C11 during next year. > >=20 > >=20 > > > Probably because of RHEL 7, which only provides GCC 4.8 [3]. > > >=20 > > > RHEL 7 was released for GA on June 10, 2014 [4]. If someone has a ser= ver with a nine year old distro still used in production, it is probably be= cause it is running some legacy application, which is difficult to get up a= nd running on a newer distro. Partial conclusion: RHEL 7 is probably still = widely used in production. > > >=20 > > > 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 serv= er. Can someone please justify this? > > >=20 > > > Are we really going to postpone C11 support in DPDK until June 30, 20= 26, when RHEL 7 ends its Extended Life Cycle Support [4]? > >=20 > > RHEL does its own choices to support old software for long. > > Upstream development should move forward. > >=20 > >=20 > > > If so, then the GCC version mentioned in the DPDK Getting Started Gui= de should be corrected accordingly. > >=20 > > No let's keep GCC 4.9 as a minimum for now. > > If needed we could upgrade it later. >=20 > 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. >=20 > 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.