[PATCH 1/2] use abstracted bit count functions
Long Li
longli at microsoft.com
Sat Aug 26 02:06:53 CEST 2023
> Subject: [PATCH 1/2] use abstracted bit count functions
>
> 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>
Patch looks good for netvsc.
Reviewed-by: Long Li <longli at microsoft.com>
More information about the dev
mailing list