Message ID | 20240906061115.522074-1-adamli@os.amperecomputing.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net/mlx5: Node-aware allocation for mlx5_buf_list | expand |
On Fri, Sep 06, 2024 at 06:11:15AM +0000, Adam Li wrote: > Allocation for mlx5_frag_buf.frags[i].buf is node-aware. > Make mlx5_frag_buf.frags allocation node-aware too. > > Signed-off-by: Adam Li <adamli@os.amperecomputing.com> > Reviewed-by: Christoph Lameter (Ampere) <cl@linux.com> > --- > drivers/net/ethernet/mellanox/mlx5/core/alloc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c b/drivers/net/ethernet/mellanox/mlx5/core/alloc.c index 6aca004e88cd..fda17b41ff17 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/alloc.c @@ -79,8 +79,8 @@ int mlx5_frag_buf_alloc_node(struct mlx5_core_dev *dev, int size, buf->size = size; buf->npages = DIV_ROUND_UP(size, PAGE_SIZE); buf->page_shift = PAGE_SHIFT; - buf->frags = kcalloc(buf->npages, sizeof(struct mlx5_buf_list), - GFP_KERNEL); + buf->frags = kcalloc_node(buf->npages, sizeof(struct mlx5_buf_list), + GFP_KERNEL, node); if (!buf->frags) goto err_out;