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 287714545B; Fri, 14 Jun 2024 16:50:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1498F402E6; Fri, 14 Jun 2024 16:50:06 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 61D4F402D0 for ; Fri, 14 Jun 2024 16:50:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718376603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mUQPAvwUDOdGLA062Tw4EtPPIx1jxkJV5Qyg+EKSvwo=; b=Gjvi20ZI/Z+8ZxSDWK6OZGgDTnQRVaReBB2P0PZ8mKahdpwJH5+JhNzH6F8isiHxBKhnSv OXCj360CaZjWOqLIxioN2ozguRIf+vqFg6nYh0PbeIXhIi5sl39p6xY+dTJIExZBCmo5Bx tQMqNX/naaOba1gOWqbiRzvcMEjv6vY= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-683-NmERww0yO8Gci5n46QzCfA-1; Fri, 14 Jun 2024 10:50:02 -0400 X-MC-Unique: NmERww0yO8Gci5n46QzCfA-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-52c82e67810so1764247e87.3 for ; Fri, 14 Jun 2024 07:50:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718376601; x=1718981401; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mUQPAvwUDOdGLA062Tw4EtPPIx1jxkJV5Qyg+EKSvwo=; b=aImc4eqGd68ovvTfT5w6+BhaaHI0baTghJObunndLJQDa5GnM4iKQ70cLzON/cbv2T ZT1bK3aOFzf5Yw0C37flRvmu0qr/oeYyOmf6rcUG5L1YwihIvh0dOnD4hr3mk041e+Ax I6MT5pEizuwJzLtGohYtuHiWJOmkj3LIwBFFzKTyl1zMjRLDXbe7taqzgiplCo2IpsIa x4KM9EWReoCY5EQbgSKpfepyMvXRl6BO2ESpeZ7JuLzEc9omBWwpcFkuxtkzW5zdi+V5 LpS0jeRpYsI2JVPGjCQhZ6ll/0ESqA9fIKcwkY0ZmsDhxj54HnIeI4fUm3P0/xpCA2WK 71QA== X-Gm-Message-State: AOJu0YwR7k7D48bE0hCge3CiRQrUc6XFPISXXdkaH06q4qGeCzTun/9A dtGpMzWlY54lylow78L+lMYBpMKjBw1R6MZYSJ7GKGox9U/3IrsyDHlPYHQgKeYGyEfJSFuR6J7 cbKEWnXF+jMOhjlojpmf9L7ksXjzqGcCkBMxiKJYdy2Uzngg3lH7U69IEmM6TEuyInfJeLo+T17 S9SmJYIEkvPWrCiBM= X-Received: by 2002:a05:6512:4cc:b0:52b:befb:24a9 with SMTP id 2adb3069b0e04-52ca6e929fbmr2166631e87.54.1718376601204; Fri, 14 Jun 2024 07:50:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE31TtPCBDVTeHPTISRJL0YPuS4R1eZtOLpeBH8FRcas4n/x0bWg3jzQ8++yQQ3Q0IAdupz9Mr9t5U8ZJZv370= X-Received: by 2002:a05:6512:4cc:b0:52b:befb:24a9 with SMTP id 2adb3069b0e04-52ca6e929fbmr2166608e87.54.1718376600835; Fri, 14 Jun 2024 07:50:00 -0700 (PDT) MIME-Version: 1.0 References: <1710969879-23701-1-git-send-email-roretzla@linux.microsoft.com> <1710969879-23701-3-git-send-email-roretzla@linux.microsoft.com> In-Reply-To: <1710969879-23701-3-git-send-email-roretzla@linux.microsoft.com> From: David Marchand Date: Fri, 14 Jun 2024 16:49:49 +0200 Message-ID: Subject: Re: [PATCH 2/2] eal: add rte ffs32 and rte ffs64 inline functions To: Tyler Retzlaff Cc: dev@dpdk.org, Bruce Richardson , Joyce Kong , Konstantin Ananyev X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Wed, Mar 20, 2024 at 10:25=E2=80=AFPM Tyler Retzlaff wrote: > > provide toolchain abstraction for __builtin_ffs{,l,ll} gcc built-in > intrinsics. > > Signed-off-by: Tyler Retzlaff Please add a unit test and an entry in the release notes. > --- > lib/eal/include/rte_bitops.h | 34 ++++++++++++++++++++++++++++++++++ > 1 file changed, 34 insertions(+) > > diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h > index 449565e..e157a45 100644 > --- a/lib/eal/include/rte_bitops.h > +++ b/lib/eal/include/rte_bitops.h > @@ -405,6 +405,28 @@ > return (unsigned int)__popcnt64(v); > } > > +static inline unsigned int > +rte_ffs32(uint32_t v) > +{ > + unsigned long rv; > + > + if (0 =3D=3D _BitScanForward(&rv, v)) _BitScanForward(&rv, v) =3D=3D 0 please. --=20 David Marchand