[RFC v2 1/2] eal: add bitset type

Stephen Hemminger stephen at networkplumber.org
Wed Mar 15 18:20:46 CET 2023


On Wed, 15 Mar 2023 18:03:41 +0100
Mattias Rönnblom <mattias.ronnblom at ericsson.com> wrote:

> Introduce a set of functions and macros that operate on sets of bits,
> kept in arrays of 64-bit elements.
> 
> RTE bitset is designed for bitsets which are larger than what fits in
> a single machine word (i.e., 64 bits). For very large bitsets, the
> <rte_bitmap.h> API may be a more appropriate choice.
> 
> RFC v2:
>  * Replaced <sys/types.h> with <stddef.h> include, to properly get
>    size_t typedef.
>  * Add <rte_compat.h> to get __rte_experimental in <rte_bitset.h>.
> 
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom at ericsson.com>

It would be good to have atomic version of these routines.
Other libraries could use that.


More information about the dev mailing list