git: 07d5d9ca2e6f - stable/15 - aq: Use the common RSS key without options RSS

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 12 Oct 2026 15:28:54 UTC
The branch stable/15 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=07d5d9ca2e6fe5a5373b4dd8aa7d2bc809bbf80d

commit 07d5d9ca2e6fe5a5373b4dd8aa7d2bc809bbf80d
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-18 08:29:17 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-10-12 15:27:45 +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
    
    (cherry picked from commit 772994d7748287be70fe850ec9e1117d4e7b1747)
---
 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 92a6cbde858a..e0d0d1727a95 100644
--- a/sys/dev/aq/aq_main.c
+++ b/sys/dev/aq/aq_main.c
@@ -506,12 +506,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