git: fd74d1e83e18 - main - oce: Use the common RSS key

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

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

commit fd74d1e83e18b8f014d8fcc7b61f2e9461512dca
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-18 08:29:19 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-09-18 22:58:14 +0000

    oce: Use the common RSS key
    
    Fill the RSS configuration request with the common 40-byte key instead
    of fresh random bytes.  Preserve the mailbox representation, hash
    selection, and indirection table.
    
    Reviewed by:    gallatin
    MFC after:      2 weeks
    Sponsored by:   BBOX.io
    Differential Revision:  https://reviews.freebsd.org/D59797
---
 sys/dev/oce/oce_mbox.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/dev/oce/oce_mbox.c b/sys/dev/oce/oce_mbox.c
index f24271ed65ae..2aaf329ffb45 100644
--- a/sys/dev/oce/oce_mbox.c
+++ b/sys/dev/oce/oce_mbox.c
@@ -40,6 +40,7 @@
 
 
 #include "oce_if.h"
+#include <net/rss_config.h>
 
 int
 oce_wait_ready(POCE_SOFTC sc)
@@ -846,7 +847,9 @@ oce_config_nic_rss(POCE_SOFTC sc, uint32_t if_id, uint16_t enable_rss)
 
 	fwcmd->params.req.if_id = LE_32(if_id);
 
-	read_random(fwcmd->params.req.hash, sizeof(fwcmd->params.req.hash));
+	_Static_assert(sizeof(fwcmd->params.req.hash) == RSS_KEYSIZE,
+	    "RSS key size mismatch");
+	rss_getkey((uint8_t *)fwcmd->params.req.hash);
 
 	rc = oce_rss_itbl_init(sc, fwcmd);
 	if (rc == 0) {