net/mlx5: DR, Alloc cmd buffer with kvzalloc() instead of kzalloc()

The cmd size is 8K so use kvzalloc().

Signed-off-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Roi Dayan 2021-03-15 10:22:51 +02:00 committed by Saeed Mahameed
parent 9dac2966c5
commit b7f86258a2
2 changed files with 5 additions and 5 deletions

View File

@ -287,7 +287,7 @@ int mlx5dr_cmd_create_empty_flow_group(struct mlx5_core_dev *mdev,
u32 *in;
int err;
in = kzalloc(inlen, GFP_KERNEL);
in = kvzalloc(inlen, GFP_KERNEL);
if (!in)
return -ENOMEM;
@ -302,7 +302,7 @@ int mlx5dr_cmd_create_empty_flow_group(struct mlx5_core_dev *mdev,
*group_id = MLX5_GET(create_flow_group_out, out, group_id);
out:
kfree(in);
kvfree(in);
return err;
}

View File

@ -406,7 +406,7 @@ static int dr_get_tbl_copy_details(struct mlx5dr_domain *dmn,
alloc_size = *num_stes * DR_STE_SIZE;
}
*data = kzalloc(alloc_size, GFP_KERNEL);
*data = kvzalloc(alloc_size, GFP_KERNEL);
if (!*data)
return -ENOMEM;
@ -505,7 +505,7 @@ int mlx5dr_send_postsend_htbl(struct mlx5dr_domain *dmn,
}
out_free:
kfree(data);
kvfree(data);
return ret;
}
@ -562,7 +562,7 @@ int mlx5dr_send_postsend_formatted_htbl(struct mlx5dr_domain *dmn,
}
out_free:
kfree(data);
kvfree(data);
return ret;
}