git: 772994d77482 - main - aq: Use the common RSS key without options RSS

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Fri, 18 Sep 2026 22:53:06 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=772994d7748287be70fe850ec9e1117d4e7b1747

commit 772994d7748287be70fe850ec9e1117d4e7b1747
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-18 08:29:17 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-09-18 22:52:24 +0000

    aq: Use the common RSS key without options RSS
    
    Fetch the common RSS key independently of options RSS instead of
    generating a private key in non-RSS kernels.  Keep the existing
    software-RSS or round-robin indirection policy and hardware key
    serialization unchanged.
    
    Reviewed by:    gallatin
    MFC after:      2 weeks
    Sponsored by:   BBOX.io
    Differential Revision:  https://reviews.freebsd.org/D59793
---
 sys/dev/aq/aq_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys/dev/aq/aq_main.c b/sys/dev/aq/aq_main.c
index 1ffa813d8b30..d5ba995eb493 100644
--- a/sys/dev/aq/aq_main.c
+++ b/sys/dev/aq/aq_main.c
@@ -504,12 +504,13 @@ aq_if_attach_post(if_ctx_t ctx)
 	aq_add_stats_sysctls(softc);
 	/* RSS */
 	uint32_t rss_qs = MIN(softc->rx_rings_count, HW_ATL_RSS_INDIRECTION_QUEUES_MAX);
-#ifdef RSS
+	_Static_assert(sizeof(softc->rss_key) == RSS_KEYSIZE,
+	    "RSS key size mismatch");
 	rss_getkey(softc->rss_key);
+#ifdef RSS
 	for (int i = nitems(softc->rss_table); i--;)
 		softc->rss_table[i] = rss_get_indirection_to_bucket(i) % rss_qs;
 #else
-	arc4rand(softc->rss_key, HW_ATL_RSS_HASHKEY_SIZE, 0);
 	for (int i = nitems(softc->rss_table); i--;)
 		softc->rss_table[i] = i % rss_qs;
 #endif