Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
NAT: Buufer overflow for memcpy()
[vpp.git]
/
src
/
vppinfra
/
bihash_8_8.h
diff --git
a/src/vppinfra/bihash_8_8.h
b/src/vppinfra/bihash_8_8.h
index
d70da59
..
2deb64e
100644
(file)
--- a/
src/vppinfra/bihash_8_8.h
+++ b/
src/vppinfra/bihash_8_8.h
@@
-13,9
+13,12
@@
* limitations under the License.
*/
#undef BIHASH_TYPE
* limitations under the License.
*/
#undef BIHASH_TYPE
+#undef BIHASH_KVP_CACHE_SIZE
+#undef BIHASH_KVP_PER_PAGE
#define BIHASH_TYPE _8_8
#define BIHASH_KVP_PER_PAGE 4
#define BIHASH_TYPE _8_8
#define BIHASH_KVP_PER_PAGE 4
+#define BIHASH_KVP_CACHE_SIZE 0
#ifndef __included_bihash_8_8_h__
#define __included_bihash_8_8_h__
#ifndef __included_bihash_8_8_h__
#define __included_bihash_8_8_h__
@@
-24,10
+27,7
@@
#include <vppinfra/format.h>
#include <vppinfra/pool.h>
#include <vppinfra/xxhash.h>
#include <vppinfra/format.h>
#include <vppinfra/pool.h>
#include <vppinfra/xxhash.h>
-
-#if __SSE4_2__
-#include <x86intrin.h>
-#endif
+#include <vppinfra/crc32.h>
/** 8 octet key, 8 octet key value pair */
typedef struct
/** 8 octet key, 8 octet key value pair */
typedef struct
@@
-54,8
+54,8
@@
static inline u64
clib_bihash_hash_8_8 (clib_bihash_kv_8_8_t * v)
{
/* Note: to torture-test linear scan, make this fn return a constant */
clib_bihash_hash_8_8 (clib_bihash_kv_8_8_t * v)
{
/* Note: to torture-test linear scan, make this fn return a constant */
-#if
__SSE4_2__
- return
_mm_crc32_u64 (0, v->key
);
+#if
def clib_crc32c_uses_intrinsics
+ return
clib_crc32c ((u8 *) & v->key, 8
);
#else
return clib_xxhash (v->key);
#endif
#else
return clib_xxhash (v->key);
#endif