git: 012ecdde3a81 - main - ice: use newly exposed RSS hash key API rather than ad-hoc hashing
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 22 Nov 2025 14:30:56 UTC
The branch main has been updated by gallatin:
URL: https://cgit.FreeBSD.org/src/commit/?id=012ecdde3a810c52cc2f68a22afa1a1b7d699bff
commit 012ecdde3a810c52cc2f68a22afa1a1b7d699bff
Author: Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2025-11-22 14:29:33 +0000
Commit: Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2025-11-22 14:29:33 +0000
ice: use newly exposed RSS hash key API rather than ad-hoc hashing
Differential Revision: https://reviews.freebsd.org/D53096
Sponsored by: Netflix
---
sys/dev/ice/ice_rss.h | 28 ++++------------------------
1 file changed, 4 insertions(+), 24 deletions(-)
diff --git a/sys/dev/ice/ice_rss.h b/sys/dev/ice/ice_rss.h
index df485f4b1f5a..4efebb362025 100644
--- a/sys/dev/ice/ice_rss.h
+++ b/sys/dev/ice/ice_rss.h
@@ -42,36 +42,17 @@
#ifndef _ICE_RSS_H_
#define _ICE_RSS_H_
-#ifdef RSS
-// We have the kernel RSS interface available
#include <net/rss_config.h>
/* Make sure our key size buffer has enough space to store the kernel RSS key */
CTASSERT(ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE >= RSS_KEYSIZE);
-#else
-/* The kernel RSS interface is not enabled. Use suitable defaults for the RSS
- * configuration functions.
- *
- * The RSS hash key will be a pre-generated random key.
- * The number of buckets will just match the number of CPUs.
- * The lookup table will be assigned using round-robin with no indirection.
- * The RSS hash configuration will be set to suitable defaults.
- */
-#define RSS_HASHTYPE_RSS_IPV4 (1 << 1) /* IPv4 2-tuple */
-#define RSS_HASHTYPE_RSS_TCP_IPV4 (1 << 2) /* TCPv4 4-tuple */
-#define RSS_HASHTYPE_RSS_IPV6 (1 << 3) /* IPv6 2-tuple */
-#define RSS_HASHTYPE_RSS_TCP_IPV6 (1 << 4) /* TCPv6 4-tuple */
-#define RSS_HASHTYPE_RSS_IPV6_EX (1 << 5) /* IPv6 2-tuple + ext hdrs */
-#define RSS_HASHTYPE_RSS_TCP_IPV6_EX (1 << 6) /* TCPv6 4-tiple + ext hdrs */
-#define RSS_HASHTYPE_RSS_UDP_IPV4 (1 << 7) /* IPv4 UDP 4-tuple */
-#define RSS_HASHTYPE_RSS_UDP_IPV6 (1 << 9) /* IPv6 UDP 4-tuple */
-#define RSS_HASHTYPE_RSS_UDP_IPV6_EX (1 << 10) /* IPv6 UDP 4-tuple + ext hdrs */
-
-#define rss_getkey(key) ice_get_default_rss_key(key)
+#ifdef RSS
+/* RSS CPU/bucket mapping functions - only available with options RSS */
+#else
+/* Stub CPU/bucket functions when RSS not configured */
#define rss_getnumbuckets() (mp_ncpus)
#define rss_get_indirection_to_bucket(index) (index)
-#define rss_gethashconfig() (ICE_DEFAULT_RSS_HASH_CONFIG)
/**
* rss_hash2bucket - Determine the bucket for a given hash value
@@ -102,7 +83,6 @@ rss_hash2bucket(uint32_t hash_val, uint32_t hash_type, uint32_t *bucket_id)
return (-1);
}
}
-
#endif /* !RSS */
#define ICE_DEFAULT_RSS_HASH_CONFIG \