acl-plugin: implement ACL lookup contexts for "ACL as a service" use by other plugins
[vpp.git] / src / vppinfra / bihash_24_8.h
index 353f06b..173168f 100644 (file)
  * limitations under the License.
  */
 #undef BIHASH_TYPE
+#undef BIHASH_KVP_CACHE_SIZE
+#undef BIHASH_KVP_PER_PAGE
 
 #define BIHASH_TYPE _24_8
 #define BIHASH_KVP_PER_PAGE 4
+#define BIHASH_KVP_CACHE_SIZE 0
 
 #ifndef __included_bihash_24_8_h__
 #define __included_bihash_24_8_h__
 
+#include <vppinfra/crc32.h>
 #include <vppinfra/heap.h>
 #include <vppinfra/format.h>
 #include <vppinfra/pool.h>
@@ -43,12 +47,8 @@ clib_bihash_is_free_24_8 (const clib_bihash_kv_24_8_t * v)
 static inline u64
 clib_bihash_hash_24_8 (const clib_bihash_kv_24_8_t * v)
 {
-#if __SSE4_2__
-  u32 value = 0;
-  value = _mm_crc32_u64 (value, v->key[0]);
-  value = _mm_crc32_u64 (value, v->key[1]);
-  value = _mm_crc32_u64 (value, v->key[2]);
-  return value;
+#ifdef clib_crc32c_uses_intrinsics
+  return clib_crc32c ((u8 *) v->key, 24);
 #else
   u64 tmp = v->key[0] ^ v->key[1] ^ v->key[2];
   return clib_xxhash (tmp);