From: Jay Vosburgh <fubar@us...> - 2005-05-11 19:27:32
Brent Draney <brdraney@...> wrote:
>Just a quick comment on the reason for this hashing mode.
>Its useful when you want 2 hosts to be able to talk to each other
>at greater than 1Gb. Therefore both hosts and all of the switches
>and routers have to do the same thing. We are NOT after more
>variation we are after deterministic behavior end-to-end.
Presumably you mean generically to have two hosts utilize more
than one interface's worth of throughput, not specifically 1Gb. Also,
by "variation" I meant, really, additional input to the hash, not
Anyway, I'm aware that you're trying to imitate a specific
behavior, that's why I suggested the variations as "new" additional hash
mode(s) (although perhaps not very clearly). The layer4_xor value may
still need some ntohs or the like to make it architecture independent if
you need it to match precisely for all architectures.
I'm still unsure if the "& 7" part of the equation is necessary;
do you know if the switches do this (is the algorithm documented in
>As for fragments, only the first frag will have port information
>in the packet. I don't know if you get the port info easily in
>the sender's kernel for anything other than the first frag but
>the switches and routers that we are trying to match certainly
>don't have this info. Therefore any packet that starts with a
>frag offset <> 0 should not use Layer-4 info in the hash.
Do the switches hash using the port information from the first
fragment? The Cisco documentation isn't clear on the precise algorithm
(it just says "source and destination IP"). This is a 2970 EMI switch,
not an actual router, so it may not even probe the TCP/UDP port numbers
for the hash. I haven't played with it to find out (just got it), or
hunted around on cisco.com for any suitable documentation (the basic
command reference doesn't say).
Lastly, the Foundry documentation referenced in the patch says,
For fragmented packets, the Foundry device uses the source and
destination IP addresses only, so that all fragments in a session are
forwarded over the same port.
So, presumably, they don't use the port info for the first
fragment. Do you know if this is actually the case?
-Jay Vosburgh, IBM Linux Technology Center, fubar@...