Nitin Hande wrote: > Andrew Gallatin wrote: >> Hi, >> >> Can somebody shed some light on how crossbow hashes outgoing >> packets to different transmit rings (not ring groups)? >> >> My 10GbE driver has multiple rings (and a single group). Each >> transmit ring shares an interrupt with a corresponding receive >> ring. We call a set of 1 TX ring, 1 RX ring, and interrupt handler >> state a "slice". Transmit completions are handled from the interrupt >> handler. On OSes which support multiple transmit routes, >> we've found that ensuring that a particular connection is always >> hashed to the same slice by the host and the NIC helps quite a bit >> with performance (improves CPU locality, reduces cache misses, decreases >> power consumption). >> >> Some OSes (like FreeBSD) allow a driver to assist in tagging a >> connection so as to ensure that it is easy to hash >> traffic for the same connection into the same slice in the host >> and the NIC. Others (Linux, S10) allow the driver to hash the >> outgoing packets to provide this locality. >> >> So.. Where is the transmit hashing done in crossbow? Is it tunable? >> Is there a hook where I can do provide a hash routine (like Linux)? >> Can I tag packets (like FreeBSD)? Is it at least something standard >> like Toeplitz? > > If your driver has advertised multiple tx rings, then look for > mac_tx_fanout_mode() which in turn computes the hash on fanout hint > passed from ip. Providing hooks for additional hash routines has been > suggested.
I guess my best bet might be to lie, and say I have only one TX ring, then fanout things myself, like I used to before Crossbow. Is there any non-obvious disadvantage to that? When looking at this, I noticed mac_tx_serializer_mode(). Am I reading this right, in that is serializes a single queue? That seems lacking, compared to the nxge_serialize stuff it replaces. Drew
