git: 285c749f575e - main - e1000: report UDP RSS hash type on igb/em

Olivier Cochard <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a6902e9.43235.6bb2ff81__47861.4491455787$1785266940$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=285c749f575ed7f9e60555037f23ac673084c62a

commit 285c749f575ed7f9e60555037f23ac673084c62a
Author:     Olivier Cochard <[email protected]>
AuthorDate: 2026-07-28 19:13:53 +0000
Commit:     Olivier Cochard <[email protected]>
CommitDate: 2026-07-28 19:23:53 +0000

    e1000: report UDP RSS hash type on igb/em
    
    {em,igb}_determine_rsstype() mapped only the TCP and bare-IP RSS descriptor
    types; the UDP types returned M_HASHTYPE_NONE.
    The hardware does hash UDP, but with a NONE hashtype iflib skips its
    flowid-based TX queue spread, so all forwarded UDP egressed on a single queue
    and serialized transmit on one core.
    
    Add the three UDP cases (IPV4_UDP, IPV6_UDP, IPV6_UDP_EX) so egress spreads
    across all TX queues.
    
    Reviewed by:    kbowling, gallatin
    Approved by:    kbowling
    MFC after:      1 week
    MFC to:         stable/14, stable/15
    Sponsored by:   Netflix
    Differential Revision:  https://reviews.freebsd.org/D58513
---
 sys/dev/e1000/em_txrx.c  | 6 ++++++
 sys/dev/e1000/igb_txrx.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c
index b2a515027479..564eda9a0f00 100644
--- a/sys/dev/e1000/em_txrx.c
+++ b/sys/dev/e1000/em_txrx.c
@@ -856,6 +856,12 @@ em_determine_rsstype(uint32_t pkt_info)
 		return M_HASHTYPE_RSS_IPV6;
 	case E1000_RXDADV_RSSTYPE_IPV6_TCP_EX:
 		return M_HASHTYPE_RSS_TCP_IPV6_EX;
+	case E1000_RXDADV_RSSTYPE_IPV4_UDP:
+		return M_HASHTYPE_RSS_UDP_IPV4;
+	case E1000_RXDADV_RSSTYPE_IPV6_UDP:
+		return M_HASHTYPE_RSS_UDP_IPV6;
+	case E1000_RXDADV_RSSTYPE_IPV6_UDP_EX:
+		return M_HASHTYPE_RSS_UDP_IPV6_EX;
 	default:
 		return M_HASHTYPE_NONE;
 	}
diff --git a/sys/dev/e1000/igb_txrx.c b/sys/dev/e1000/igb_txrx.c
index 57f098d2266d..513e0c29dd09 100644
--- a/sys/dev/e1000/igb_txrx.c
+++ b/sys/dev/e1000/igb_txrx.c
@@ -591,6 +591,12 @@ igb_determine_rsstype(uint16_t pkt_info)
 		return M_HASHTYPE_RSS_IPV6;
 	case E1000_RXDADV_RSSTYPE_IPV6_TCP_EX:
 		return M_HASHTYPE_RSS_TCP_IPV6_EX;
+	case E1000_RXDADV_RSSTYPE_IPV4_UDP:
+		return M_HASHTYPE_RSS_UDP_IPV4;
+	case E1000_RXDADV_RSSTYPE_IPV6_UDP:
+		return M_HASHTYPE_RSS_UDP_IPV6;
+	case E1000_RXDADV_RSSTYPE_IPV6_UDP_EX:
+		return M_HASHTYPE_RSS_UDP_IPV6_EX;
 	default:
 		return M_HASHTYPE_NONE;
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.