Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
vppinfra: fix minor cuckoo bugs and add cuckoo_16_8
[vpp.git]
/
src
/
vppinfra
/
cuckoo_8_8.h
diff --git
a/src/vppinfra/cuckoo_8_8.h
b/src/vppinfra/cuckoo_8_8.h
index
608cb0e
..
ace535b
100644
(file)
--- a/
src/vppinfra/cuckoo_8_8.h
+++ b/
src/vppinfra/cuckoo_8_8.h
@@
-64,7
+64,7
@@
clib_cuckoo_kv_is_free_8_8 (const clib_cuckoo_kv_8_8_t * v)
always_inline void
clib_cuckoo_kv_set_free_8_8 (clib_cuckoo_kv_8_8_t * v)
{
always_inline void
clib_cuckoo_kv_set_free_8_8 (clib_cuckoo_kv_8_8_t * v)
{
- memset (v, 0xff, sizeof (*v));
+
clib_
memset (v, 0xff, sizeof (*v));
}
/** Format a clib_cuckoo_kv_8_8_t instance
}
/** Format a clib_cuckoo_kv_8_8_t instance
@@
-79,7
+79,7
@@
format_cuckoo_kvp_8_8 (u8 * s, va_list * args)
if (clib_cuckoo_kv_is_free_8_8 (v))
{
if (clib_cuckoo_kv_is_free_8_8 (v))
{
- s = format (s, " -- empty -- "
, v->key, v->value
);
+ s = format (s, " -- empty -- ");
}
else
{
}
else
{
@@
-91,8
+91,8
@@
format_cuckoo_kvp_8_8 (u8 * s, va_list * args)
always_inline u64
clib_cuckoo_hash_8_8 (clib_cuckoo_kv_8_8_t * v)
{
always_inline u64
clib_cuckoo_hash_8_8 (clib_cuckoo_kv_8_8_t * v)
{
-#if
__SSE4_2__
&& !defined (__i386__)
- return
_mm_
crc32_u64 (0, v->key);
+#if
defined(clib_crc32c_uses_intrinsics)
&& !defined (__i386__)
+ return crc32_u64 (0, v->key);
#else
return clib_xxhash (v->key);
#endif
#else
return clib_xxhash (v->key);
#endif
@@
-108,10
+108,8
@@
clib_cuckoo_key_compare_8_8 (u64 a, u64 b)
return a == b;
}
return a == b;
}
-#if 0
#undef __included_cuckoo_template_h__
#include <vppinfra/cuckoo_template.h>
#undef __included_cuckoo_template_h__
#include <vppinfra/cuckoo_template.h>
-#endif
#endif /* __included_cuckoo_8_8_h__ */
#endif /* __included_cuckoo_8_8_h__ */