Commit 9afc60dc authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Doug Ledford

IB/mlx4: Suppress non-fatal memory allocations

Failure in kmalloc memory allocations will throw a warning about it.
Such warnings are not needed anymore, since in commit 0ef2f05c
("IB/mlx4: Use vmalloc for WR buffers when needed"), fallback mechanism
from kmalloc() to __vmalloc() was added.
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent da7525d2
...@@ -795,11 +795,13 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, ...@@ -795,11 +795,13 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
if (err) if (err)
goto err_mtt; goto err_mtt;
qp->sq.wrid = kmalloc(qp->sq.wqe_cnt * sizeof(u64), gfp); qp->sq.wrid = kmalloc(qp->sq.wqe_cnt * sizeof(u64),
gfp | __GFP_NOWARN);
if (!qp->sq.wrid) if (!qp->sq.wrid)
qp->sq.wrid = __vmalloc(qp->sq.wqe_cnt * sizeof(u64), qp->sq.wrid = __vmalloc(qp->sq.wqe_cnt * sizeof(u64),
gfp, PAGE_KERNEL); gfp, PAGE_KERNEL);
qp->rq.wrid = kmalloc(qp->rq.wqe_cnt * sizeof(u64), gfp); qp->rq.wrid = kmalloc(qp->rq.wqe_cnt * sizeof(u64),
gfp | __GFP_NOWARN);
if (!qp->rq.wrid) if (!qp->rq.wrid)
qp->rq.wrid = __vmalloc(qp->rq.wqe_cnt * sizeof(u64), qp->rq.wrid = __vmalloc(qp->rq.wqe_cnt * sizeof(u64),
gfp, PAGE_KERNEL); gfp, PAGE_KERNEL);
......
...@@ -171,7 +171,8 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd, ...@@ -171,7 +171,8 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd,
if (err) if (err)
goto err_mtt; goto err_mtt;
srq->wrid = kmalloc(srq->msrq.max * sizeof (u64), GFP_KERNEL); srq->wrid = kmalloc(srq->msrq.max * sizeof(u64),
GFP_KERNEL | __GFP_NOWARN);
if (!srq->wrid) { if (!srq->wrid) {
srq->wrid = __vmalloc(srq->msrq.max * sizeof(u64), srq->wrid = __vmalloc(srq->msrq.max * sizeof(u64),
GFP_KERNEL, PAGE_KERNEL); GFP_KERNEL, PAGE_KERNEL);
......
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