> - return hash_bytes(mac, ETH_ADDR_LEN, vlan ^ ml->secret); > + unsigned int mac1 = get_unaligned_u32((uint32_t *) mac); > + unsigned int mac2 = get_unaligned_u16((uint16_t *) (mac + 4)); > + return hash_3words(mac1, mac2 | (vlan << 16), ml->secret);
Would we get better hash distribution if we did something like: hash_3words(mac1, mac2, ml->secret ^ vlan)? OR ing seems a bit strange to me, but I may not fully understand the algorithm. Ethan > } > > static struct mac_entry * > -- > 1.7.9 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev