git: 113875f91607 - stable/14 - iflib: Set the NUMA domain in receive packet headers

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 18 Dec 2024 13:46:53 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=113875f91607f385e87a54e017ac61f842df3282

commit 113875f91607f385e87a54e017ac61f842df3282
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-12-04 01:13:02 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-12-18 13:43:49 +0000

    iflib: Set the NUMA domain in receive packet headers
    
    Reading PR 273559 made me realize that commit 767723ddebe9 is
    incomplete.  iflib should set the NUMA domain of received packets before
    passing them to protocol layers.
    
    PR:             273559
    Reviewed by:    zlei, kbowling, erj
    Fixes:          767723ddebe9 ("iflib: Use if_alloc_dev() to allocate the ifnet")
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D47841
    
    (cherry picked from commit 3d642b0f71c501dd9ee7aa0487788f619900d297)
---
 sys/net/iflib.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index 997da7ca5b00..93a2ca526072 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -2880,6 +2880,9 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri)
 	m->m_flags |= ri->iri_flags;
 	m->m_pkthdr.ether_vtag = ri->iri_vtag;
 	m->m_pkthdr.flowid = ri->iri_flowid;
+#ifdef NUMA
+	m->m_pkthdr.numa_domain = if_getnumadomain(ri->iri_ifp);
+#endif
 	M_HASHTYPE_SET(m, ri->iri_rsstype);
 	m->m_pkthdr.csum_flags = ri->iri_csum_flags;
 	m->m_pkthdr.csum_data = ri->iri_csum_data;