git: 4628395b43c5 - stable/15 - hn: use newly exposed RSS hash key API rather than ad-hoc hashing

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Thu, 29 Oct 2026 06:35:12 UTC
The branch stable/15 has been updated by kbowling:

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

commit 4628395b43c5c881471830d59f5624aa2d077ccc
Author:     Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2025-11-22 14:29:34 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-10-29 06:26:40 +0000

    hn: use newly exposed RSS hash key API rather than ad-hoc hashing
    
    Differential Revision:  https://reviews.freebsd.org/D53099
    Sponsored by: Netflix
    
    (cherry picked from commit 2ae6227ddfb85965d9d2a3719583d8fddad02ba1)
---
 sys/dev/hyperv/netvsc/if_hn.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c
index e4ea85b44bc9..d8ac23a4af6e 100644
--- a/sys/dev/hyperv/netvsc/if_hn.c
+++ b/sys/dev/hyperv/netvsc/if_hn.c
@@ -99,9 +99,7 @@
 #include <net/if_var.h>
 #include <net/if_vlan_var.h>
 #include <net/rndis.h>
-#ifdef RSS
 #include <net/rss_config.h>
-#endif
 
 #include <netinet/in_systm.h>
 #include <netinet/in.h>
@@ -635,17 +633,6 @@ static struct rmlock		hn_vfmap_lock;
 static int			hn_vfmap_size;
 static if_t			*hn_vfmap;
 
-#ifndef RSS
-static const uint8_t
-hn_rss_key_default[NDIS_HASH_KEYSIZE_TOEPLITZ] = {
-	0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,
-	0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0,
-	0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4,
-	0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c,
-	0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa
-};
-#endif	/* !RSS */
-
 static const struct hyperv_guid	hn_guid = {
 	.hv_guid = {
 	    0x63, 0x51, 0x61, 0xf8, 0x3e, 0xdf, 0xc5, 0x46,
@@ -6861,11 +6848,7 @@ hn_synth_attach(struct hn_softc *sc, int mtu)
 		 */
 		if (bootverbose)
 			if_printf(sc->hn_ifp, "setup default RSS key\n");
-#ifdef RSS
 		rss_getkey(rss->rss_key);
-#else
-		memcpy(rss->rss_key, hn_rss_key_default, sizeof(rss->rss_key));
-#endif
 		sc->hn_flags |= HN_FLAG_HAS_RSSKEY;
 	}