DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Tyler Retzlaff <roretzla@linux.microsoft.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
	 Joyce Kong <joyce.kong@arm.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Subject: Re: [PATCH 2/2] eal: add rte ffs32 and rte ffs64 inline functions
Date: Fri, 14 Jun 2024 16:49:49 +0200	[thread overview]
Message-ID: <CAJFAV8xqJ65GV+o_2=x7Lb973-K4eBoYV7fj6CP2bOu=HRxTwA@mail.gmail.com> (raw)
In-Reply-To: <1710969879-23701-3-git-send-email-roretzla@linux.microsoft.com>

On Wed, Mar 20, 2024 at 10:25 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> provide toolchain abstraction for __builtin_ffs{,l,ll} gcc built-in
> intrinsics.
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

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 == _BitScanForward(&rv, v))

_BitScanForward(&rv, v) == 0 please.


-- 
David Marchand


      reply	other threads:[~2024-06-14 14:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 21:24 [PATCH 0/2] provide rte_ffs32, rte_ffs64 and __rte_x86_movdiri for MSVC Tyler Retzlaff
2024-03-20 21:24 ` [PATCH 1/2] eal: provide movdiri " Tyler Retzlaff
2024-03-20 21:24 ` [PATCH 2/2] eal: add rte ffs32 and rte ffs64 inline functions Tyler Retzlaff
2024-06-14 14:49   ` David Marchand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8xqJ65GV+o_2=x7Lb973-K4eBoYV7fj6CP2bOu=HRxTwA@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=joyce.kong@arm.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=roretzla@linux.microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).