]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net/mlx5: use numa_mem_id() for default frag buf allocations
authorNimrod Oren <noren@nvidia.com>
Thu, 14 May 2026 10:49:24 +0000 (13:49 +0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 18 May 2026 23:12:47 +0000 (16:12 -0700)
Use the current CPU's local memory node when callers do not request a
specific NUMA node for mlx5_frag_buf allocations.

Signed-off-by: Nimrod Oren <noren@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260514104925.337570-2-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/alloc.c

index f196441838286f72307bbeb1e2e4104a43b0d5df..16d6b126a486ee53c9ec7af99d83bd10e7fd81bd 100644 (file)
@@ -305,7 +305,7 @@ int mlx5_frag_buf_alloc_node(struct mlx5_core_dev *dev, int size,
        struct mlx5_dma_pool *pool;
        int pool_idx;
 
-       node = node == NUMA_NO_NODE ? first_online_node : node;
+       node = node == NUMA_NO_NODE ? numa_mem_id() : node;
 
        buf->size = size;
        buf->npages = DIV_ROUND_UP(size, PAGE_SIZE);