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

Sean Conner sean at conman.org
Tue Nov 15 16:14:16 EST 2011


It was thus said that the Great Dave Taht once stated:
> 
> Here's one. I'd like to classify network streams so that they end up
> in a unique queue[x], based on their nexthop mac address in the ip
> header.

  More on this.  Now that I'm at the office, I can scan a larger selection
of MAC addresses.  Out of the 38 machines currently on the segment, the
lower twelve bits of each MAC addresses are unique (this excluding broadcast
and multicast MAC addresses).  

> Does anything elegant exist? Anything worthy in the kernel?

  For non-broadcast/multicast MAC addresses, take the last N bits.

  -spc




More information about the Bloat-devel mailing list