git: 3d642b0f71c5 - main - iflib: Set the NUMA domain in receive packet headers

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 04 Dec 2024 18:35:19 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=3d642b0f71c501dd9ee7aa0487788f619900d297

commit 3d642b0f71c501dd9ee7aa0487788f619900d297
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-12-04 01:13:02 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-12-04 16:22:50 +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
---
 sys/net/iflib.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index 284d226a7ac6..6644197f7d5b 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;