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 6B95FA00C2; Fri, 6 Jan 2023 01:32:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 024504067C; Fri, 6 Jan 2023 01:32:44 +0100 (CET) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id 0102E4021F for ; Fri, 6 Jan 2023 01:32:42 +0100 (CET) Received: by mail-pf1-f171.google.com with SMTP id a184so33pfa.9 for ; Thu, 05 Jan 2023 16:32:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=vRF7xwIcoc+kIlMPGZVXvmuEeU/aDQVQVXGXwyk+mRk=; b=KCfQJPc+f0Zvj/UYmVYEOcu37Yw3dLW8JaAZaF5EG5nCFo2Ddh5SRZBeS5RgY4YjMT G4jmib6HBW8Sohwpxe54ohh2h7tjcxVY/D0vcPbrdURaSNij8RvMHGUfX/jxcB2j9Eem AEBTJCyufVYEqluqGOo+TwbVmToUFJ8EBtlRCRSUTkahykJRAhR4IMhzYPbsGPLN+5Mf LLmwWHG5/4ctZ3VzCpriIyT1eyNYBNSojx/8wWUI2uW2xb93ouymu/FjmxFXG+LEXuv9 qA1ASYuFpHMR8NvbzS9XfTzQHFLANicBfyGFxYIC7qciskUDRk7fdJ2HLZmIFJ/XoccU wOhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vRF7xwIcoc+kIlMPGZVXvmuEeU/aDQVQVXGXwyk+mRk=; b=dX5aWL+HJ2tH0MuJ1NsBjOixVdInAlEd23Ysu6qpkdO8hRiAT21V8SBxrXoH2oB1yY owO9hMuPUWoO34OMA6mBjZKzrRv01hZCukN+reZzRDra8BmNMbTG7L4ZD3Amf86h3gnE Oj6ms1Oj1rNtronrdbC02u/w59cVHJ2tTOqghCVLLJI8eqMpJGBFd/yCbxUXBDU03RIY rZRGrtJwXvTP3VzyZjvoygpX295VRFZuYHp8yr2jBcIfh7m7zMFenM4s191fc/LpaIkr 76FGAJFNlxvCNwyGygBxT1/AOLpGVcekU416z9bj58TOF5EaTtzTpgDnWsdq92R0Wevd pfEA== X-Gm-Message-State: AFqh2ko0bM0jnOfp6Eo82fg48v/ItWQdO6Uo92vZAhtanRGP1FSlmskc RIA51E8q8kCCMknwk0VdQRrdNw== X-Google-Smtp-Source: AMrXdXswkST9dE7qp2i28WIUPVI9L2p6RKuv8j6jo+2TkuTlW+ASQ6D9gxklw/ynNbBQLXttQTVK8A== X-Received: by 2002:aa7:8809:0:b0:580:cc63:dcdc with SMTP id c9-20020aa78809000000b00580cc63dcdcmr44517641pfo.7.1672965161896; Thu, 05 Jan 2023 16:32:41 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id v63-20020a622f42000000b00575d90636dcsm24914883pfv.6.2023.01.05.16.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 16:32:41 -0800 (PST) Date: Thu, 5 Jan 2023 16:32:40 -0800 From: Stephen Hemminger To: Tyler Retzlaff Cc: Thomas Monjalon , Morten =?UTF-8?B?QnLDuHJ1cA==?= , dev@dpdk.org, david.marchand@redhat.com Subject: Re: [PATCH v2 1/2] eal: provide leading and trailing zero bit count abstraction Message-ID: <20230105163240.78eefebb@hermes.local> In-Reply-To: <20230105172118.GB9408@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 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=C3=B8rup: =20 > > > > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > > > > +/** > > > > + * @warning > > > > + * @b EXPERIMENTAL: this API may change, or be removed, without pr= ior > > > > 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) =20 > > >=20 > > > Don't use l (long) and ll (long long) for names (and types), use expl= icit bit lengths, 32 and 64. > > >=20 > > > E.g.: rte_clz32(uint32_t v) =20 > >=20 > > I agree on using numbers. > > =20 >=20 > love the idea, fewer functions too. >=20 > 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.