hs-test: add nginx test
[vpp.git] / src / vppinfra / bihash_template.h
index 4ab27aa..c4e120e 100644 (file)
@@ -34,7 +34,6 @@
 #endif
 
 #ifdef BIHASH_32_64_SVM
-#undef HAVE_MEMFD_CREATE
 #include <vppinfra/linux/syscall.h>
 #include <fcntl.h>
 #define F_LINUX_SPECIFIC_BASE 1024
@@ -171,6 +170,7 @@ BVS (clib_bihash)
 
   u64 alloc_arena;             /* Base of the allocation arena */
   volatile u8 instantiated;
+  u8 dont_add_to_all_bihash_list;
 
   /**
     * A custom format function to print the Key and Value of bihash_key instead of default hexdump
@@ -334,6 +334,9 @@ static inline uword BV (clib_bihash_get_offset) (BVT (clib_bihash) * h,
   return vp - hp;
 }
 
+#define BIHASH_ADD 1
+#define BIHASH_DEL 0
+
 void BV (clib_bihash_init)
   (BVT (clib_bihash) * h, char *name, u32 nbuckets, uword memory_size);
 
@@ -353,12 +356,19 @@ void BV (clib_bihash_free) (BVT (clib_bihash) * h);
 
 int BV (clib_bihash_add_del) (BVT (clib_bihash) * h,
                              BVT (clib_bihash_kv) * add_v, int is_add);
+
+int BV (clib_bihash_add_del_with_hash) (BVT (clib_bihash) * h,
+                                       BVT (clib_bihash_kv) * add_v, u64 hash,
+                                       int is_add);
 int BV (clib_bihash_add_or_overwrite_stale) (BVT (clib_bihash) * h,
                                             BVT (clib_bihash_kv) * add_v,
                                             int (*is_stale_cb) (BVT
                                                                 (clib_bihash_kv)
                                                                 *, void *),
                                             void *arg);
+int BV (clib_bihash_add_with_overwrite_cb) (
+  BVT (clib_bihash) * h, BVT (clib_bihash_kv) * add_v,
+  void (*overwrite_cb) (BVT (clib_bihash_kv) *, void *), void *arg);
 int BV (clib_bihash_search) (BVT (clib_bihash) * h,
                             BVT (clib_bihash_kv) * search_v,
                             BVT (clib_bihash_kv) * return_v);