Page MenuHomeFreeBSD

aq(4): honor the kernel RSS policy and add a TX traffic-class helper
ClosedPublic

Authored by nick_spun.io on Jul 10 2026, 3:55 AM.
Referenced Files
F168936348: D58137.id181665.diff
Sun, Aug 30, 8:29 PM
F168923453: D58137.id181649.diff
Sun, Aug 30, 7:02 PM
F168912160: D58137.id181669.diff
Sun, Aug 30, 5:34 PM
F168912122: D58137.id182231.diff
Sun, Aug 30, 5:34 PM
F168899840: D58137.id.diff
Sun, Aug 30, 4:19 PM
F168889950: D58137.id182196.diff
Sun, Aug 30, 3:25 PM
F168886615: D58137.diff
Sun, Aug 30, 3:04 PM
Unknown Object (File)
Tue, Aug 25, 2:33 PM
Subscribers

Details

Summary

Align RX steering with the kernel RSS framework and factor out the
active-traffic-class count.

RSS key and indirection table: on an options RSS kernel the stack owns a
canonical hash key and a hash-to-bucket indirection table binding each
bucket to a CPU. aq programmed a random arc4rand() key and a plain
i % rss_qs table, so the hash it stamped in iri_flowid and the queue it
steered a flow to did not match the CPU the stack chose -- defeating RSS
affinity. Under #ifdef RSS take the key from rss_getkey() and each entry
from rss_get_indirection_to_bucket(), as e1000/ixgbe/ixl do; the non-RSS
build keeps the random key and round-robin table.

RSS hash-type policy: drop the private hw.aq.enable_rss_udp knob (RDTUN,
default on) and add aq_rss_hashconfig(), which under options RSS returns
rss_gethashconfig() and otherwise the same UDP-off default. UDP 4-tuple
hashing scatters a fragmented datagram's pieces across queues because
only the first fragment carries the L4 ports, so it is now off by default
and re-enabled the standard way, via net.inet.rss.udp_4tuple, matching
ix/ixl/mlx5. On Atlantic 1 the UDP-off action stays the existing L3L4
flow-filter workaround; only its policy source changes.

TX traffic-class helper: factor the active-TC count (one per active
8-ring group, capped at HW_ATL_B0_TCS_MAX) out of aq_hw_qos_set() into
aq_hw_active_tcs(), so there is a single definition of the policy; the
Atlantic 2 RSS redirection table reuses it.

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Jul 15 2026, 8:12 PM
This revision now requires review to proceed.Jul 19 2026, 3:35 AM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 19 2026, 4:49 PM
This revision was automatically updated to reflect the committed changes.