[dpdk-dev] [PATCH v3 1/2] bitmap: add create bitmap with all bits set
Dumitrescu, Cristian
cristian.dumitrescu at intel.com
Fri Apr 10 18:04:14 CEST 2020
> -----Original Message-----
> From: Suanming Mou <suanmingm at mellanox.com>
> Sent: Friday, April 10, 2020 1:46 PM
> To: Dumitrescu, Cristian <cristian.dumitrescu at intel.com>; dev at dpdk.org
> Cc: amo at semihalf.com
> Subject: [PATCH v3 1/2] bitmap: add create bitmap with all bits set
>
> Currently, in the case to use bitmap as resource allocator, after
> bitmap creation, all the bitmap bits should be set to indicate the
> bit available. Every time when allocate one bit, search for the set
> bits and clear it to make it in use.
>
> Add a new rte_bitmap_init_with_all_set() function to have a quick
> fill up the bitmap bits.
>
> Comparing with the case create the bitmap as empty and set the bitmap
> one by one, the new function costs less cycles.
>
> Signed-off-by: Suanming Mou <suanmingm at mellanox.com>
> ---
> lib/librte_eal/include/rte_bitmap.h | 78
> +++++++++++++++++++++++++++++++++++++
> 1 file changed, 78 insertions(+)
>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
More information about the dev
mailing list