git: 5a14756a1363 - main - ixgbe: Use newly exposed RSS hash API rather than ad-hoc hashing

From: Andrew Gallatin <gallatin_at_FreeBSD.org>
Date: Sat, 22 Nov 2025 14:30:53 UTC
The branch main has been updated by gallatin:

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

commit 5a14756a13635c988efcfb01f9a116901dbd455a
Author:     Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2025-11-22 14:29:32 +0000
Commit:     Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2025-11-22 14:29:32 +0000

    ixgbe: Use newly exposed RSS hash API rather than ad-hoc hashing
    
    Differential Revision:  https://reviews.freebsd.org/D53093
    Reviewed by: kbowling
    Sponsored by: Netflix
---
 sys/dev/ixgbe/ixgbe_rss.h | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

diff --git a/sys/dev/ixgbe/ixgbe_rss.h b/sys/dev/ixgbe/ixgbe_rss.h
index 84c802671195..6e02c5ec9ed5 100644
--- a/sys/dev/ixgbe/ixgbe_rss.h
+++ b/sys/dev/ixgbe/ixgbe_rss.h
@@ -34,30 +34,16 @@
 #ifndef _IXGBE_RSS_H_
 #define _IXGBE_RSS_H_
 
-#ifdef RSS
-
 #include <net/rss_config.h>
 #include <netinet/in_rss.h>
 
+#ifdef RSS
+/* RSS CPU/bucket mapping functions - only available with options RSS */
 #else
-
-#define RSS_HASHTYPE_RSS_IPV4          (1 << 1)
-#define RSS_HASHTYPE_RSS_TCP_IPV4      (1 << 2)
-#define RSS_HASHTYPE_RSS_IPV6          (1 << 3)
-#define RSS_HASHTYPE_RSS_TCP_IPV6      (1 << 4)
-#define RSS_HASHTYPE_RSS_IPV6_EX       (1 << 5)
-#define RSS_HASHTYPE_RSS_TCP_IPV6_EX   (1 << 6)
-#define RSS_HASHTYPE_RSS_UDP_IPV4      (1 << 7)
-#define RSS_HASHTYPE_RSS_UDP_IPV4_EX   (1 << 8)
-#define RSS_HASHTYPE_RSS_UDP_IPV6      (1 << 9)
-#define RSS_HASHTYPE_RSS_UDP_IPV6_EX   (1 << 10)
-
+/* Stub CPU/bucket functions when RSS not configured */
 #define rss_getcpu(_a) 0
 #define rss_getnumbuckets() 1
-#define rss_getkey(_a)
 #define rss_get_indirection_to_bucket(_a) 0
-#define rss_gethashconfig() 0x7E
 #define rss_hash2bucket(_a,_b,_c) -1
-
 #endif
 #endif /* _IXGBE_RSS_H_ */