Commit 7f880719 authored by Tariq Toukan's avatar Tariq Toukan Committed by Saeed Mahameed

net/mlx5: Node-aware allocation for the EQs

Prefer the aware allocation, use the device NUMA node.
Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
Reviewed-by: default avatarMoshe Shemesh <moshe@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent e894246d
...@@ -728,7 +728,8 @@ struct mlx5_eq * ...@@ -728,7 +728,8 @@ struct mlx5_eq *
mlx5_eq_create_generic(struct mlx5_core_dev *dev, mlx5_eq_create_generic(struct mlx5_core_dev *dev,
struct mlx5_eq_param *param) struct mlx5_eq_param *param)
{ {
struct mlx5_eq *eq = kvzalloc(sizeof(*eq), GFP_KERNEL); struct mlx5_eq *eq = kvzalloc_node(sizeof(*eq), GFP_KERNEL,
dev->priv.numa_node);
int err; int err;
if (!eq) if (!eq)
...@@ -888,10 +889,11 @@ static int create_comp_eqs(struct mlx5_core_dev *dev) ...@@ -888,10 +889,11 @@ static int create_comp_eqs(struct mlx5_core_dev *dev)
return ncomp_eqs; return ncomp_eqs;
INIT_LIST_HEAD(&table->comp_eqs_list); INIT_LIST_HEAD(&table->comp_eqs_list);
nent = comp_eq_depth_devlink_param_get(dev); nent = comp_eq_depth_devlink_param_get(dev);
for (i = 0; i < ncomp_eqs; i++) { for (i = 0; i < ncomp_eqs; i++) {
struct mlx5_eq_param param = {}; struct mlx5_eq_param param = {};
eq = kzalloc(sizeof(*eq), GFP_KERNEL); eq = kzalloc_node(sizeof(*eq), GFP_KERNEL, dev->priv.numa_node);
if (!eq) { if (!eq) {
err = -ENOMEM; err = -ENOMEM;
goto clean; goto clean;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment