]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Track device's NUMA domain in ifnet & alloc ifnet from NUMA local memory
authorgallatin <gallatin@FreeBSD.org>
Mon, 22 Apr 2019 19:24:21 +0000 (19:24 +0000)
committergallatin <gallatin@FreeBSD.org>
Mon, 22 Apr 2019 19:24:21 +0000 (19:24 +0000)
commitaccdb3810dee12b48cf729b4ab7e8132b9ca219b
treeee7943e59b348ea29145e0b1168f4a17406bd3d9
parentfebdbb3e83737f2d709ab3aed498cd8d77fe2229
Track device's NUMA domain in ifnet & alloc ifnet from NUMA local memory

This commit adds new if_alloc_domain() and if_alloc_dev() methods to
allocate ifnets.  When called with a domain on a NUMA machine,
ifalloc_domain() will record the NUMA domain in the ifnet, and it will
allocate the ifnet struct from memory which is local to that NUMA
node.  Similarly, if_alloc_dev() is a wrapper for if_alloc_domain
which uses a driver supplied device_t to call ifalloc_domain() with
the appropriate domain.

Note that the new if_numa_domain field fits in an alignment pad in
struct ifnet, and so does not alter the size of the structure.

Reviewed by: glebius, kib, markj
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D19930
share/man/man9/Makefile
share/man/man9/ifnet.9
sys/dev/cxgbe/t4_main.c
sys/dev/mlx5/mlx5_en/mlx5_en_main.c
sys/net/if.c
sys/net/if_var.h