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
This commit is contained in:
Mark Johnston 2024-09-19 09:21:05 +00:00
parent 1f903953fb
commit 767723ddeb

View file

@ -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