[PATCH v4] bitmap: add scan from offset function
Dumitrescu, Cristian
cristian.dumitrescu at intel.com
Mon Jul 3 12:54:53 CEST 2023
> -----Original Message-----
> From: Volodymyr Fialko <vfialko at marvell.com>
> Sent: Monday, July 3, 2023 10:31 AM
> To: dev at dpdk.org; Dumitrescu, Cristian <cristian.dumitrescu at intel.com>
> Cc: jerinj at marvell.com; anoobj at marvell.com; thomas at monjalon.net;
> Volodymyr Fialko <vfialko at marvell.com>
> Subject: [PATCH v4] bitmap: add scan from offset function
>
> Currently, in the case when we search for a bit set after a particular
> value, the bitmap has to be scanned from the beginning and
> rte_bitmap_scan() has to be called multiple times until we hit the value.
>
> Add a new rte_bitmap_scan_from_offset() function to initialize scan
> state at the given offset and perform scan, this will allow getting
> the next set bit after certain offset within one scan call.
>
> Signed-off-by: Volodymyr Fialko <vfialko at marvell.com>
> ---
> v2:
> - added rte_bitmap_scan_from_offset
> v3:
> - added note for internal use only for init_at function
> v4:
> - marked init_at function as __rte_internal
>
> app/test/test_bitmap.c | 33 ++++++++++++++++++++-
> lib/eal/include/rte_bitmap.h | 56
Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
More information about the dev
mailing list