classify: use 32 bits hash 49/36349/4
authorBenoît Ganne <bganne@cisco.com>
Wed, 8 Jun 2022 08:49:17 +0000 (10:49 +0200)
committerDamjan Marion <dmarion@0xa5.net>
Wed, 29 Jun 2022 21:23:38 +0000 (21:23 +0000)
commitb03eec969f3db186fc354c3e885e51c0b24803f0
tree54871a6dc00bad0644f75755d616f10ad67de6c2
parentb0057282d64a4f9ac5966fceb427057b0665b772
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>
src/vnet/buffer.h
src/vnet/classify/flow_classify_node.c
src/vnet/classify/ip_classify.c
src/vnet/classify/vnet_classify.c
src/vnet/classify/vnet_classify.h
src/vnet/interface_format.c
src/vnet/ip/ip_in_out_acl.c
src/vnet/l2/l2_in_out_acl.c
src/vnet/l2/l2_input_classify.c
src/vnet/l2/l2_output_classify.c
src/vnet/policer/node_funcs.c