[PATCH] bitmap: add scan init at given position

Volodymyr Fialko vfialko at marvell.com
Mon Jun 12 12:58:00 CEST 2023


Hi Cristian,

<snip>
> 
> My understanding is your proposed procedure for scanning starting at an offset is:
> 1. Call the new function: __rte_bitmap_scan_init_at() 2. Call the regular function: rte_bitmap_scan()
> 
> I think this procedure is not ideal, therefore I suggest we create a new API function which has an
> additional offset argument:
> 
> 	rte_bitmap_scan_from_offset(struct rte_bitmap *bmp, uint32_t offset, uint32_t *pos,
> uint64_t *slab).
> 
> Under the hood, the new API should call an internal function similar to yours to start the scan at a
> given offset (while aborting any scan that might be in progress). Makes sense?
> 
> BTW, do we need to declare the experimental functions defined in a header file to the library map
> file? I don't see this in the patch, but the patch seems to compile and link fine ...
> 
> Regards,
> Cristian

I like the suggested idea to add ` rte_bitmap_scan_from_offset ` API. I will implement it in the next version.



More information about the dev mailing list