vlib: add vlib_frame_bitmap_and

Type: improvement
Change-Id: I531115f32c484e4c4794173d24e15f3b5b8f547b
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h
index a9101f5..147d5eb 100644
--- a/src/vlib/node_funcs.h
+++ b/src/vlib/node_funcs.h
@@ -1333,6 +1333,14 @@
     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)
 {