A tiny almost sorta kinda nearly minimal perfect hash for a mac classifier?

Fred Baker fred at cisco.com
Sun Nov 13 21:41:08 EST 2011


On Nov 14, 2011, at 10:22 AM, Sean Conner wrote:

>  Why not just use the lower N bits as the hash function?

or

unsigned macHash (unsigned long long  macAddressClone) {
     return 0xFFF & (macAddressClone ^ (macAddressClone >> 12));
}

That allows you to keep different OUIs separated somewhat.



More information about the Bloat-devel mailing list