git: 96cde0b9e606 - main - ena: 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:31:01 UTC
The branch main has been updated by gallatin:
URL: https://cgit.FreeBSD.org/src/commit/?id=96cde0b9e6068cd4c3aaebd86764b34afec1b624
commit 96cde0b9e6068cd4c3aaebd86764b34afec1b624
Author: Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2025-11-22 14:29:34 +0000
Commit: Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2025-11-22 14:29:34 +0000
ena: use newly exposed RSS hash key API rather than ad-hoc hashing
Differential Revision: https://reviews.freebsd.org/D53100
Reviewed by: akiyano_amazon.com
---
sys/dev/ena/ena_datapath.c | 4 ----
sys/dev/ena/ena_rss.c | 2 --
sys/dev/ena/ena_rss.h | 2 --
3 files changed, 8 deletions(-)
diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c
index ab082fa1810f..ec64ae9324bf 100644
--- a/sys/dev/ena/ena_datapath.c
+++ b/sys/dev/ena/ena_datapath.c
@@ -34,9 +34,7 @@
#ifdef DEV_NETMAP
#include "ena_netmap.h"
#endif /* DEV_NETMAP */
-#ifdef RSS
#include <net/rss_config.h>
-#endif /* RSS */
#include <netinet6/ip6_var.h>
@@ -351,7 +349,6 @@ ena_rx_hash_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_ctx *ena_rx_ctx,
if (likely(ENA_FLAG_ISSET(ENA_FLAG_RSS_ACTIVE, adapter))) {
mbuf->m_pkthdr.flowid = ena_rx_ctx->hash;
-#ifdef RSS
/*
* Hardware and software RSS are in agreement only when both are
* configured to Toeplitz algorithm. This driver configures
@@ -362,7 +359,6 @@ ena_rx_hash_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_ctx *ena_rx_ctx,
M_HASHTYPE_SET(mbuf, M_HASHTYPE_OPAQUE_HASH);
return;
}
-#endif
if (ena_rx_ctx->frag &&
(ena_rx_ctx->l3_proto != ENA_ETH_IO_L3_PROTO_UNKNOWN)) {
diff --git a/sys/dev/ena/ena_rss.c b/sys/dev/ena/ena_rss.c
index b7706e33065d..88fb3c902f5d 100644
--- a/sys/dev/ena/ena_rss.c
+++ b/sys/dev/ena/ena_rss.c
@@ -125,7 +125,6 @@ ena_rss_init_default(struct ena_adapter *adapter)
}
-#ifdef RSS
uint8_t rss_algo = rss_gethashalgo();
if (rss_algo == RSS_HASH_TOEPLITZ) {
uint8_t hash_key[RSS_KEYSIZE];
@@ -133,7 +132,6 @@ ena_rss_init_default(struct ena_adapter *adapter)
rss_getkey(hash_key);
rc = ena_rss_set_hash(ena_dev, hash_key);
} else
-#endif
rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_TOEPLITZ,
NULL, ENA_HASH_KEY_SIZE, 0x0);
if (unlikely((rc != 0) && (rc != EOPNOTSUPP))) {
diff --git a/sys/dev/ena/ena_rss.h b/sys/dev/ena/ena_rss.h
index 64dd41851fec..b7c5181397af 100644
--- a/sys/dev/ena/ena_rss.h
+++ b/sys/dev/ena/ena_rss.h
@@ -36,9 +36,7 @@
#include <sys/types.h>
-#ifdef RSS
#include <net/rss_config.h>
-#endif
#include "ena.h"