[dpdk-dev] [PATCH v4] bitmap: add init with all bits set
Thomas Monjalon
thomas at monjalon.net
Wed Apr 15 16:42:52 CEST 2020
15/04/2020 16:22, Suanming Mou:
> Hi Thomas,
>
> Thanks for the update.
>
> From: Thomas Monjalon <thomas at monjalon.net>
> >
> > From: Suanming Mou <suanmingm at mellanox.com>
> >
> > 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>
> > Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
> Reviewed-by: Suanming Mou <suanmingm at mellanox.com>
> > ---
> >
> > v4:
> > - add experimental tags and comments
> > - move functions near original init function
> > - squash test patch
> > - use "init" word in title
> >
> > v3 updates:
> > 1. Implement individual rte_bitmap_init_with_all_set() function.
> > 2. Add new function to clear the overhead bits.
> >
> > v2 updates:
> > 1. Split the common part to __rte_bitmap_init().
> > 2. Set the slab bits more customized.
Applied, thanks
More information about the dev
mailing list