A TCP/IP offload network interface device (NID) receives packets from a
plurality of clients and generates, from the socket address of each such
packet, a hash value. Each hash value identifies one of a plurality of
hash buckets maintained on the NID. In a file server, certain socket
address bits of the packets are low entropy bits in that they tend to be
the same, regardless of which client sent the packet. Others of the
socket address bits are high entropy bits. The hash function employed is
such that the hash values resulting from the changing values of the high
entropy bits are substantially evenly distributed among the plurality of
hash buckets. In a fast-path, the NID uses a first hash function to
identify TCBs on the NID. In a slow-path, the NID generates a second hash
using a second hash function and a host stack uses the second hash.