X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2Fhash.c;h=abc7c4ce4a27f4d9dcde6b84bfc7606d6760ec8d;hb=54f7c51fd5a1ea927a4df3a989f62afdf9d6c0c5;hp=121fa38570553c3f72d603563b2c80c3b73c63e6;hpb=c5c2bb3f042fe11184faa731b6209444e2c05231;p=vpp.git diff --git a/src/vppinfra/hash.c b/src/vppinfra/hash.c index 121fa385705..abc7c4ce4a2 100644 --- a/src/vppinfra/hash.c +++ b/src/vppinfra/hash.c @@ -282,6 +282,10 @@ key_sum (hash_t * h, uword key) sum = string_key_sum (h, key); break; + case KEY_FUNC_MEM: + sum = mem_key_sum (h, key); + break; + default: sum = h->key_sum (h, key); break; @@ -312,6 +316,10 @@ key_equal1 (hash_t * h, uword key1, uword key2, uword e) e = string_key_equal (h, key1, key2); break; + case KEY_FUNC_MEM: + e = mem_key_equal (h, key1, key2); + break; + default: e = h->key_equal (h, key1, key2); break; @@ -685,7 +693,7 @@ _hash_create (uword elts, hash_t * h_user) if (h_user) log2_pair_size = h_user->log2_pair_size; - v = _vec_resize (0, + v = _vec_resize ((void *) 0, /* vec len: */ elts, /* data bytes: */ (elts << log2_pair_size) * sizeof (hash_pair_t),