We use the fact that all NICs that support hashing are using the
same hash algorithm and hash key to enable symmetic hashing in
TCP, where a software version of the same hash is used to
establish hashes on outgoing connections.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Yup, most multiqueue NICs now just "do" RSS natively whether we want it or not, and the main difference here with RSS defined was whether the configured key or a random key was used, etc.
So exposing the global RSS API for the key management / configuration is fine.
(Eventually I'd like it to be a key we can program in per device and globally, and tweak it all at runtime, but that's later.)
- Made rss_config.c standard. This is needed because most
drivers do not check to see if INET/INET6 is enabled before
setting up RSS. This fixes compilation errors in most
drivers with LINT-NOIP
-Fixed compilattion error with LINT-NOIP after making rss_config
standard. Basically, the net_inet sysctl tree does not exist in
a NOIP kernel. So when in this configuration, hang rss config
off of net instead.
Is it safe for MFC to stable/15 ? I see no plans for the MFC, I see that cherry-picking works fine, but there are clearly no plans for MFC in the commit message.
I don't have a great way to test things on 15-stable (since we run -current), and so I don't MFC things that I feel would require a lot of testing.
I'm currently working on a bug (either in this, or in some related changes) that our testing revealed and which seems to be caused by ixl setting a valid hash type but invalid flowid.
Thanks for dusting off those RSS bytes and for the reply !
I'll test this on a few hosts in the stable/15 branch, as I've been using the kernel with "options RSS" on some of them for a while now, with no issues so far.
A valid rss type set with a 0 flowid for connections nginx accepts. Not sure why ixl can't calculate a proper hash in that case, but it can be worked around by checking to see if the flowid (rss hash result) is valid.