diff options
author | Damjan Marion <damarion@cisco.com> | 2022-03-17 15:46:25 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2022-03-18 13:16:24 +0000 |
commit | a4a28f04cb887ee690ccc9f563d06bf74fe18faf (patch) | |
tree | 13d960091319496e1625dae4db25091764ce30c7 /src/vppinfra/hash.h | |
parent | 86bbdf926c6d642e789ad6dce6534c23820f3c63 (diff) |
vppinfra: use stored vec header size to find header
Type: refactor
Change-Id: Iaa1e43c87c5725ab33ea8489bff2a7bda18b9c79
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/hash.h')
-rw-r--r-- | src/vppinfra/hash.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/vppinfra/hash.h b/src/vppinfra/hash.h index 23b91b107a2..f5735bc92ee 100644 --- a/src/vppinfra/hash.h +++ b/src/vppinfra/hash.h @@ -96,18 +96,11 @@ typedef struct hash_header uword *is_user; } hash_t; -/* Hash header size in bytes */ -always_inline uword -hash_header_bytes (void *v) -{ - return sizeof (hash_t); -} - /* Returns a pointer to the hash header given the vector pointer */ always_inline hash_t * hash_header (void *v) { - return vec_header (v, hash_header_bytes (v)); + return vec_header (v); } /* Number of elements in the hash table */ |