[rfc] tcp timer update for RSS

Adrian Chadd adrian at freebsd.org
Thu May 15 04:43:40 UTC 2014


here's a completely untested patch for discussion. I'm emailing it out
mostly as a "is this a good idea" patch rather than a "it should just
be committed" patch.

The RSS stuff from Robert maps connections to pcbgroups based on the
RSS hash, but it doesn't map the TCP timers the same way. So by
default they're all on swi0 and the per CPU timers don't take the hash
type or correctly choose the CPU.

This patch:


does a few things:

* it stores the hashtype in the inp as well as the flowid;
* the rss code grows a new method that maps the flowid/hashtype to a cpuid
* .. and the existing mbuf to cpuid method now uses this;
* the tcp timer code now has an inline function that knows about RSS
and defaults to the existing way of doing things if RSS isn't enabled.

There's still a bunch of work left before all the lock contention
compartmentalization and balancing of RSS is realised. I'm just
chewing off the little corner bits that are easy to get done now.

So, any comments? I'll give it a proper whirl on some 10G hardware in
a few days but I thought I'd at least get the general idea out there
for comment.



More information about the freebsd-net mailing list