Page MenuHomeFreeBSD

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

Authored by nick_spun.io on Aug 18 2026, 5:20 PM.
Tags
None
Referenced Files
F172887883: D58913.diff
Mon, Sep 21, 9:00 PM
Unknown Object (File)
Thu, Sep 17, 10:38 PM
Unknown Object (File)
Sun, Sep 13, 10:24 AM
Unknown Object (File)
Thu, Sep 10, 6:27 PM
Unknown Object (File)
Mon, Sep 7, 4:24 PM
Unknown Object (File)
Mon, Sep 7, 10:39 AM
Unknown Object (File)
Sat, Sep 5, 10:57 AM
Unknown Object (File)
Sat, Sep 5, 8:12 AM

Details

Reviewers
None
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 private sysctls instead: hn rss_ind, ixl rss_lut, ena
an rss node.

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 and are otherwise unrestricted.
Nothing keeps either in step with rss_getkey() and rss_table[], so under
options RSS a divergent setting places received work on a CPU the stack
did not expect; 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 75668
Build 72551: arc lint + arc unit