Date: Mon, 23 Feb 2015 12:38:55 -0800 From: Adrian Chadd <adrian@freebsd.org> To: FreeBSD Net <freebsd-net@freebsd.org> Subject: Looking for help with RSS IPv6 - need software hash code! Message-ID: <CAJ-Vmom9n1HfHAq1hkEFhjmnp-FP2ZS%2B7dpJaT0dvDhDpu277g@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi! The last annoyingish bit for IPv6 RSS support is a full software hash routine to calculate an RSS hash based on the various fields in the IPv6 header. I'm unfortunately out of spare cycles to try and finish it so I'm asking for help. In order to support this in the kernel we need to not only know what to do with the hardware RSS, but also have a fallover path to software hashing if the NIC doesn't hash it for us, or doesn't hash it correctly. For example, if we get IPv4/IPv6 fragments (which yes, are a thing, don't tell me they're not), we need to reassemble the fragments into a single frame, and then re-calculate the RSS hash on the reassembled frame header to figure out where it would've gone. We have to do this because the RSS hash value is also used as an index into the PCBGROUP hash table array - so no matter whether packets in a flow are fragmented or not, they're correctly serialised into the same netisr queue and the PCB information for that flow is in the same PCBGROUP array bucket. For doing "correct" RSS, we need to have support for hashing various fields and this isn't just limited to 2-tuple / 4-tuple hashing. IPv6 has a bunch of mobility header options and RSS has support for these (the TCP_EX and UDP_EX fields.) I've done the software hashing path for IPv4, but I need someone to help me do the IPv6 RSS hash calculation for all the variations - IPv6 2-tuple IPv6 TCP, IPv6 UDP, IPv6 TCP_EX (mobility), UDP_EX (mobility.) The microsoft RSS specification is online and freely available; it has all of these as examples. So, I'm asking for help. If you're able to help, please look at the code in -HEAD in sys/netinet/in_rss.c and sys/netinet6/in6_rss.c. You'll see what's missing. You don't need a NIC that has RSS enabled; if you enable RSS and PCBGROUPS in the kernel (and bump up the number of netisr queues; that still isn't auto-set at boot time) then you'll see that traffic will get distributed by software hashing of the packet headers. Thanks! -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmom9n1HfHAq1hkEFhjmnp-FP2ZS%2B7dpJaT0dvDhDpu277g>