aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/lb_hash_hash.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-11-12 16:00:24 +0100
committerFlorin Coras <florin.coras@gmail.com>2021-11-12 16:13:08 +0000
commit271daab9677a5c611b203379fc6fb9022f53f09c (patch)
tree80c4fe8cdb63ad6d1b3f92b5a4ec0413d5db3fe7 /src/vppinfra/lb_hash_hash.h
parent3108399fcf3e94b47a0b23f02fea3b39ab8be637 (diff)
hash: refactor crc32_5tuple
Type: improvement Change-Id: I31cae2367e2ec7fc89991ca0df994a73da93aaed Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/lb_hash_hash.h')
-rw-r--r--src/vppinfra/lb_hash_hash.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vppinfra/lb_hash_hash.h b/src/vppinfra/lb_hash_hash.h
index fb251591eeb..f355515bce4 100644
--- a/src/vppinfra/lb_hash_hash.h
+++ b/src/vppinfra/lb_hash_hash.h
@@ -24,11 +24,11 @@ static_always_inline u32
lb_hash_hash (u64 k0, u64 k1, u64 k2, u64 k3, u64 k4)
{
u64 val = 0;
- val = crc32_u64 (val, k0);
- val = crc32_u64 (val, k1);
- val = crc32_u64 (val, k2);
- val = crc32_u64 (val, k3);
- val = crc32_u64 (val, k4);
+ val = clib_crc32c_u64 (val, k0);
+ val = clib_crc32c_u64 (val, k1);
+ val = clib_crc32c_u64 (val, k2);
+ val = clib_crc32c_u64 (val, k3);
+ val = clib_crc32c_u64 (val, k4);
return (u32) val;
}
@@ -37,8 +37,8 @@ static_always_inline u32
lb_hash_hash_2_tuples (u64 k0, u32 k1)
{
u64 val = 0;
- val = crc32_u64 (val, k0);
- val = crc32_u32 (val, k1);
+ val = clib_crc32c_u64 (val, k0);
+ val = clib_crc32c_u32 (val, k1);
return (u32) val;
}
#else