[PATCH 1/2] use abstracted bit count functions
David Marchand
david.marchand at redhat.com
Tue Sep 5 17:33:29 CEST 2023
On Fri, Aug 25, 2023 at 12:18 PM David Marchand
<david.marchand at redhat.com> wrote:
>
> Now that DPDK provides such bit count functions, make use of them.
>
> This patch was prepared with a "brutal" commandline:
>
> $ old=__builtin_clzll; new=rte_clz64;
> git grep -lw $old :^lib/eal/include/rte_bitops.h |
> xargs sed -i -e "s#\<$old\>#$new#g"
> $ old=__builtin_clz; new=rte_clz32;
> git grep -lw $old :^lib/eal/include/rte_bitops.h |
> xargs sed -i -e "s#\<$old\>#$new#g"
>
> $ old=__builtin_ctzll; new=rte_ctz64;
> git grep -lw $old :^lib/eal/include/rte_bitops.h |
> xargs sed -i -e "s#\<$old\>#$new#g"
> $ old=__builtin_ctz; new=rte_ctz32;
> git grep -lw $old :^lib/eal/include/rte_bitops.h |
> xargs sed -i -e "s#\<$old\>#$new#g"
>
> $ old=__builtin_popcountll; new=rte_popcount64;
> git grep -lw $old :^lib/eal/include/rte_bitops.h |
> xargs sed -i -e "s#\<$old\>#$new#g"
> $ old=__builtin_popcount; new=rte_popcount32;
> git grep -lw $old :^lib/eal/include/rte_bitops.h |
> xargs sed -i -e "s#\<$old\>#$new#g"
>
> Then inclusion of rte_bitops.h was added were necessary.
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
Series applied.
--
David Marchand
More information about the dev
mailing list