Skip to content

Commit ea88600

Browse files
ayalevinSaeed Mahameed
authored andcommitted
net/mlx5e: Allow creating mpwqe info without channel
Change the signature of mlx5e_rq_alloc_mpwqe_info from receiving channel pointer to receive the NUMA node. This allows creating mpwqe_info in context of different channels types. Signed-off-by: Aya Levin <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 8956492 commit ea88600

File tree

1 file changed

+4
-5
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+4
-5
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,17 @@ static inline void mlx5e_build_umr_wqe(struct mlx5e_rq *rq,
214214
ucseg->mkey_mask = cpu_to_be64(MLX5_MKEY_MASK_FREE);
215215
}
216216

217-
static int mlx5e_rq_alloc_mpwqe_info(struct mlx5e_rq *rq,
218-
struct mlx5e_channel *c)
217+
static int mlx5e_rq_alloc_mpwqe_info(struct mlx5e_rq *rq, int node)
219218
{
220219
int wq_sz = mlx5_wq_ll_get_size(&rq->mpwqe.wq);
221220

222221
rq->mpwqe.info = kvzalloc_node(array_size(wq_sz,
223222
sizeof(*rq->mpwqe.info)),
224-
GFP_KERNEL, cpu_to_node(c->cpu));
223+
GFP_KERNEL, node);
225224
if (!rq->mpwqe.info)
226225
return -ENOMEM;
227226

228-
mlx5e_build_umr_wqe(rq, &c->icosq, &rq->mpwqe.umr_wqe);
227+
mlx5e_build_umr_wqe(rq, rq->icosq, &rq->mpwqe.umr_wqe);
229228

230229
return 0;
231230
}
@@ -459,7 +458,7 @@ static int mlx5e_alloc_rq(struct mlx5e_channel *c,
459458
goto err_rq_drop_page;
460459
rq->mkey_be = cpu_to_be32(rq->umr_mkey.key);
461460

462-
err = mlx5e_rq_alloc_mpwqe_info(rq, c);
461+
err = mlx5e_rq_alloc_mpwqe_info(rq, cpu_to_node(c->cpu));
463462
if (err)
464463
goto err_rq_mkey;
465464
break;

0 commit comments

Comments
 (0)