Page MenuHomeFreeBSD

Fix byte order in default RSS key.
ClosedPublic

Authored by grehan on Aug 1 2014, 7:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 1 2024, 2:55 AM
Unknown Object (File)
Dec 22 2023, 4:44 PM
Unknown Object (File)
Aug 28 2023, 2:59 AM
Unknown Object (File)
Aug 21 2023, 7:15 PM
Unknown Object (File)
May 23 2023, 4:16 AM
Unknown Object (File)
May 15 2023, 5:50 AM
Unknown Object (File)
May 8 2023, 9:47 AM
Unknown Object (File)
Apr 26 2023, 3:40 PM
Subscribers
None

Details

Reviewers
adrian
rwatson
Summary

The rss_key[] array in netinet/in_rss.c has the bytes in incorrect
order. This results in the RSS test vectors in the Microsft RSS spec
and Intel NIC specs giving incorrect results, and making it difficult
to verify correct hash operation when RSS functionality is added to
new NICs.

Test Plan

Tested by using a pcs script to inject the test vectors into ixgbe and
igb interfaces, and using a kernel printf to dump the RSS hash from
the mbuf flowid on packet reception to verify the hash value is correct.

The kernel toeplitz hash routine was tested with a user-space harness
that verified the hash results.

It is recommended that the pcs script be used when implementing RSS on
new NICs, and that the user-space test harness be used when modifying
the toeplitz hash routine.

pcs script - http://people.freebsd.org/~grehan/rss/rss_test.py

(works with the ports version of pcs, py27-pcs-0.6)

user-space harness - http://people.freebsd.org/~grehan/rss/freebsd_rss_test.c
igb and ixgbe test results - http://people.freebsd.org/~grehan/rss/key_results.txt

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

grehan retitled this revision from to Fix byte order in default RSS key..
grehan updated this object.
grehan edited the test plan for this revision. (Show Details)
grehan added reviewers: adrian, rwatson.
adrian edited edge metadata.

Looks good! Thanks for chasing this up.

This revision is now accepted and ready to land.Aug 1 2014, 6:02 PM

oh and for the record, here's what I compared the above to: