summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorErez Shitrit <erezsh@mellanox.com>2020-04-24 22:45:04 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2020-04-28 22:45:10 +0300
commitdff8e2d15283dd92582ddeec25ca86e4cf2618c7 (patch)
tree50a7e26ea960b2bda7c728de8952659c43e20ace /drivers/infiniband
parent2b58f6d9df50f534fe465113b69de60a2ef0e74a (diff)
downloadlinux-dff8e2d15283dd92582ddeec25ca86e4cf2618c7.tar.xz
net/mlx5: Use aligned variable while allocating ICM memory
The alignment value is part of the input structure, so use it and spare extra memory allocation when is not needed. Now, using the new ability when allocating icm for Direct-Rule insertion. Signed-off-by: Ariel Levkovich <lariel@mellanox.com> Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index f10675213115..65e0e24d463b 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -2444,7 +2444,7 @@ static int handle_alloc_dm_sw_icm(struct ib_ucontext *ctx,
act_size = roundup_pow_of_two(act_size);
dm->size = act_size;
- err = mlx5_dm_sw_icm_alloc(dev, type, act_size,
+ err = mlx5_dm_sw_icm_alloc(dev, type, act_size, attr->alignment,
to_mucontext(ctx)->devx_uid, &dm->dev_addr,
&dm->icm_dm.obj_id);
if (err)