uint32_t hash_double(double x, uint32_t basis) { uint32_t value[2]; BUILD_ASSERT_DECL(sizeof x == sizeof value); memcpy(value, &x, sizeof value); return hash_3words(value[0], value[1], basis); }
/* Returns the hash of 'a' and 'b'. */ uint32_t hash_2words(uint32_t a, uint32_t b) { return hash_3words(a, b, 0); }
static uint32_t mcast_table_hash(const struct mcast_snooping *ms, ovs_be32 grp_ip4, uint16_t vlan) { return hash_3words((OVS_FORCE uint32_t) grp_ip4, vlan, ms->secret); }