[PATCH 1/2] use abstracted bit count functions
Tyler Retzlaff
roretzla at linux.microsoft.com
Fri Aug 25 18:35:35 CEST 2023
On Fri, Aug 25, 2023 at 12:18:10PM +0200, David Marchand 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>
> ---
These kinds of patches always make me dizzy, I did a pass I cannot see
any replacement problems so lgtm.
Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
More information about the dev
mailing list