diff options
author | Damjan Marion <damarion@cisco.com> | 2022-03-15 16:16:55 +0100 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2022-03-15 16:17:31 +0100 |
commit | 218e4ec5302a88d4400cc3b0897310f4d59675be (patch) | |
tree | 8848b97cc3d7daab415f160c5ef479f2d2bef9df /src | |
parent | b0f0f8c8dd9d694bfc13652f89b8b577e9c1c708 (diff) |
vlib: add vlib_frame_bitmap_and
Type: improvement
Change-Id: I531115f32c484e4c4794173d24e15f3b5b8f547b
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vlib/node_funcs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h index a9101f5d16a..147d5eb99ef 100644 --- a/src/vlib/node_funcs.h +++ b/src/vlib/node_funcs.h @@ -1333,6 +1333,14 @@ vlib_frame_bitmap_or (uword *bmp, uword *bmp2) bmp++[0] |= bmp2++[0]; } +static_always_inline void +vlib_frame_bitmap_and (uword *bmp, uword *bmp2) +{ + u32 n_left = VLIB_FRAME_BITMAP_N_UWORDS; + while (n_left--) + bmp++[0] &= bmp2++[0]; +} + static_always_inline u32 vlib_frame_bitmap_count_set_bits (uword *bmp) { |