X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip6_packet.h;h=015dd01f8aa53ee4dbf199840d21e12617d2b90e;hb=cd35e53c928f666e50342e27d69e6dd7d60e1283;hp=97d33713d3ca786762e76744b9207a44568fb383;hpb=b3a9381ad54ea30bf872cf781023e353a89ebaa6;p=vpp.git diff --git a/src/vnet/ip/ip6_packet.h b/src/vnet/ip/ip6_packet.h index 97d33713d3c..015dd01f8aa 100644 --- a/src/vnet/ip/ip6_packet.h +++ b/src/vnet/ip/ip6_packet.h @@ -347,6 +347,18 @@ ip6_is_solicited_node_multicast_address (const ip6_address_t * a) && a->as_u8[12] == 0xff); } +always_inline u32 +ip6_address_hash_to_u32 (const ip6_address_t * a) +{ + return (a->as_u32[0] ^ a->as_u32[1] ^ a->as_u32[2] ^ a->as_u32[3]); +} + +always_inline u64 +ip6_address_hash_to_u64 (const ip6_address_t * a) +{ + return (a->as_u64[0] ^ a->as_u64[1]); +} + typedef struct { /* 4 bit version, 8 bit traffic class and 20 bit flow label. */