git: 7ebda9886eda - stable/14 - iflib: Use if_alloc_dev() to allocate the ifnet

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Fri, 04 Oct 2024 15:57:00 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=7ebda9886eda8956df5a24423396a52ffce5e4e6

commit 7ebda9886eda8956df5a24423396a52ffce5e4e6
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-09-19 09:21:05 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-10-04 15:56:42 +0000

    iflib: Use if_alloc_dev() to allocate the ifnet
    
    This ensures that the ifnet's NUMA affinity is accurate.
    
    Reviewed by:    kbowling
    MFC after:      2 weeks
    Sponsored by:   Klara, Inc.
    Differential Revision:  https://reviews.freebsd.org/D46667
    
    (cherry picked from commit 767723ddebe9c76a2d4a45a50d9b0efc9f2f91d7)
---
 sys/net/iflib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index fa6227f3f80a..a2e2c3efa1ad 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -5750,7 +5750,7 @@ iflib_register(if_ctx_t ctx)
 
 	CTX_LOCK_INIT(ctx);
 	STATE_LOCK_INIT(ctx, device_get_nameunit(ctx->ifc_dev));
-	ifp = ctx->ifc_ifp = if_alloc(IFT_ETHER);
+	ifp = ctx->ifc_ifp = if_alloc_dev(IFT_ETHER, dev);
 
 	/*
 	 * Initialize our context's device specific methods