bnxt: Initialize RSS with the common key

Use rss_getkey() for the initial VNIC key instead of generating a
per-attachment private key.  Preserve the writable rss_key sysctl,
its override lifetime, the hardware DMA representation, and all hash
and indirection settings.

Reviewed by:	gallatin
MFC after:	2 weeks
Sponsored by:	BBOX.io
Differential Revision:	https://reviews.freebsd.org/D59795
This commit is contained in:
Kevin Bowling committed 2026-09-18 16:26:53 -07:00
1 parent 9d48fd452e
commit 62c80d76f7
1 file changed
+4 -1
+4 -1
View File
@@ -47,6 +47,7 @@
#include <net/if_var.h>
#include <net/ethernet.h>
#include <net/iflib.h>
#include <net/rss_config.h>
#define WANT_NATIVE_PCI_GET_SLOT
#include <linux/pci.h>
@@ -2893,7 +2894,9 @@ bnxt_attach_pre(if_ctx_t ctx)
goto failed;
}
arc4rand(softc->vnic_info.rss_hash_key, HW_HASH_KEY_SIZE, 0);
_Static_assert(HW_HASH_KEY_SIZE == RSS_KEYSIZE,
"RSS key size mismatch");
rss_getkey(softc->vnic_info.rss_hash_key);
softc->vnic_info.rss_hash_type =
HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4 |
HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4 |