Remove c-11 memcpy checks from perf-critical code
[vpp.git] / src / vppinfra / hash.h
index 36a7006..59dbf8c 100644 (file)
@@ -280,7 +280,7 @@ hash_set_mem_alloc (uword ** h, void *key, uword v)
 {
   size_t ksz = hash_header (*h)->user;
   void *copy = clib_mem_alloc (ksz);
-  clib_memcpy (copy, key, ksz);
+  clib_memcpy_fast (copy, key, ksz);
   hash_set_mem (*h, copy, v);
 }
 
@@ -496,7 +496,7 @@ hash_set_value_bytes (hash_t * h, uword value_bytes)
                      _format_pair,_format_pair_arg)          \
 ({                                                          \
   hash_t _h;                                                \
-  memset (&_h, 0, sizeof (_h));                                     \
+  clib_memset (&_h, 0, sizeof (_h));                                \
   _h.user = (_user);                                        \
   _h.key_sum   = (hash_key_sum_function_t *) (_key_sum);     \
   _h.key_equal = (_key_equal);                              \