aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_format.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2022-06-08 10:49:17 +0200
committerDamjan Marion <dmarion@0xa5.net>2022-06-29 21:23:38 +0000
commitb03eec969f3db186fc354c3e885e51c0b24803f0 (patch)
tree54871a6dc00bad0644f75755d616f10ad67de6c2 /src/vnet/interface_format.c
parentb0057282d64a4f9ac5966fceb427057b0665b772 (diff)
classify: use 32 bits hash
classify hash used to be stored as u64 in buffer metadata, use 32 bits instead: - on almost all our supported arch (x86 and arm64) we use crc32c intrinsics to compute the final hash: we really get a 32-bits hash - the hash itself is used to compute a 32-bits bucket index by masking upper bits: we always discard the higher 32-bits - this allows to increase the l2 classify buffer metadata padding such as it does not overlap with the ip fib_index metadata anymore. This overlap is an issue when using the 'set metadata' action in the ip ACL node which updates both fields Type: fix Change-Id: I5d35bdae97b96c3cae534e859b63950fb500ff50 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/interface_format.c')
-rw-r--r--src/vnet/interface_format.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/interface_format.c b/src/vnet/interface_format.c
index 304fbb8a068..0c051dd4757 100644
--- a/src/vnet/interface_format.c
+++ b/src/vnet/interface_format.c
@@ -602,9 +602,9 @@ format_vnet_buffer_opaque (u8 * s, va_list * args)
s = format (s,
"l2_classify.table_index: %d, l2_classify.opaque_index: %d, "
- "l2_classify.hash: 0x%llx",
- o->l2_classify.table_index,
- o->l2_classify.opaque_index, o->l2_classify.hash);
+ "l2_classify.hash: 0x%lx",
+ o->l2_classify.table_index, o->l2_classify.opaque_index,
+ o->l2_classify.hash);
vec_add1 (s, '\n');
s = format (s, "policer.index: %d", o->policer.index);