Page MenuHomeFreeBSD

net: add ioctls for the RSS key and indirection table
DraftPublic

Authored by nick_spun.io on Tue, Aug 18, 11:11 PM.
Tags
None
Referenced Files
F167227852: D58935.diff
Thu, Aug 20, 3:25 AM
Unknown Object (File)
Wed, Aug 19, 8:57 AM
Unknown Object (File)
Wed, Aug 19, 8:53 AM
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
adrian
gallatin
Summary

SIOCGIFRSSKEY has reported the hash key since 2016 but nothing could
change it, and nothing reported the indirection table at all, so drivers
exposed it through incompatible private sysctls instead.

Add SIOCGIFRSSTABLE, SIOCSIFRSSTABLE and SIOCSIFRSSKEY. Table entries
and ifrt_nqueues are 16 bits because ice reports 256 receive queues, and
RSS_TABLELEN is 512 to cover the largest isc_rss_table_size iflib
reports. A table that does not fit is refused with EMSGSIZE rather than
truncated, since the ioctl number encodes the structure size.

Both setters need PRIV_NET_HWIOCTL. Nothing keeps either in step with
the stack's rss_getkey() and rss_table[], so under options RSS a
divergent setting steers received work to an unexpected CPU; that is
left to the caller.

rss_hashconfig_to_iftypes() exists because RSS_HASHTYPE_ and RSS_TYPE_
are a permutation of each other rather than a shift.

Signed-off-by: Nick Price <nprice@FreeBSD.org>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75692
Build 72575: arc lint + arc unit