mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-19 07:39:54 +02:00
RDMA/qedr: Improve error logs for rdma_alloc_tid error return
Use -EINVAL return type to identify whether error is returned because of "Out of MR resources" or any other error types. Link: https://lore.kernel.org/r/20210729151732.30995-2-pkushwaha@marvell.com Signed-off-by: Shai Malin <smalin@marvell.com> Signed-off-by: Ariel Elior <aelior@marvell.com> Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
090473004b
commit
0050a57638
|
@ -2996,7 +2996,11 @@ struct ib_mr *qedr_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 len,
|
|||
|
||||
rc = dev->ops->rdma_alloc_tid(dev->rdma_ctx, &mr->hw_mr.itid);
|
||||
if (rc) {
|
||||
DP_ERR(dev, "roce alloc tid returned an error %d\n", rc);
|
||||
if (rc == -EINVAL)
|
||||
DP_ERR(dev, "Out of MR resources\n");
|
||||
else
|
||||
DP_ERR(dev, "roce alloc tid returned error %d\n", rc);
|
||||
|
||||
goto err1;
|
||||
}
|
||||
|
||||
|
@ -3091,7 +3095,11 @@ static struct qedr_mr *__qedr_alloc_mr(struct ib_pd *ibpd,
|
|||
|
||||
rc = dev->ops->rdma_alloc_tid(dev->rdma_ctx, &mr->hw_mr.itid);
|
||||
if (rc) {
|
||||
DP_ERR(dev, "roce alloc tid returned an error %d\n", rc);
|
||||
if (rc == -EINVAL)
|
||||
DP_ERR(dev, "Out of MR resources\n");
|
||||
else
|
||||
DP_ERR(dev, "roce alloc tid returned error %d\n", rc);
|
||||
|
||||
goto err0;
|
||||
}
|
||||
|
||||
|
@ -3221,7 +3229,11 @@ struct ib_mr *qedr_get_dma_mr(struct ib_pd *ibpd, int acc)
|
|||
|
||||
rc = dev->ops->rdma_alloc_tid(dev->rdma_ctx, &mr->hw_mr.itid);
|
||||
if (rc) {
|
||||
DP_ERR(dev, "roce alloc tid returned an error %d\n", rc);
|
||||
if (rc == -EINVAL)
|
||||
DP_ERR(dev, "Out of MR resources\n");
|
||||
else
|
||||
DP_ERR(dev, "roce alloc tid returned error %d\n", rc);
|
||||
|
||||
goto err1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user