diff options
author | Damjan Marion <damarion@cisco.com> | 2022-03-17 15:32:56 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2022-03-17 20:31:14 +0000 |
commit | 5c45d1cf1b46c1ec83d50d032d6e7cad5fa3fefd (patch) | |
tree | 757f3fc0ad8a77b742857bcf1180792777447ee6 /src/vppinfra/hash.c | |
parent | 1da361f9ea525663a1141c3665a67df5e81c4133 (diff) |
vppinfra: vec_max_len, vec_mem_size use stored header size
Type: improvement
Change-Id: I17778e89674da0e8204713302e2293377bdabcbc
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/hash.c')
-rw-r--r-- | src/vppinfra/hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vppinfra/hash.c b/src/vppinfra/hash.c index f36ce831d25..7b8869254e1 100644 --- a/src/vppinfra/hash.c +++ b/src/vppinfra/hash.c @@ -1009,7 +1009,7 @@ hash_bytes (void *v) if (!v) return 0; - bytes = vec_mem_size (v, hash_header_bytes (v)); + bytes = vec_mem_size (v); for (i = 0; i < hash_capacity (v); i++) { @@ -1019,7 +1019,7 @@ hash_bytes (void *v) if (h->log2_pair_size > 0) bytes += 1 << indirect_pair_get_log2_bytes (&p->indirect); else - bytes += vec_mem_size (p->indirect.pairs, 0); + bytes += vec_mem_size (p->indirect.pairs); } } return bytes; |