[PATCH v2 1/2] eal: provide leading and trailing zero bit count abstraction
Thomas Monjalon
thomas at monjalon.net
Thu Jan 5 10:01:31 CET 2023
05/01/2023 08:09, Morten Brørup:
> > From: Tyler Retzlaff [mailto:roretzla at 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.
More information about the dev
mailing list