Message ID | 2b221f0f1165b5d838f6857137e6f0d759555c59.1520002437.git.swise@opengridcomputing.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Thu, Mar 01, 2018 at 01:58:06PM -0800, Steve Wise wrote: > Setting iova, length, and page_size allows this information to be > seen via NLDEV netlink queries, which can aid in user rdma debugging. > > Signed-off-by: Steve Wise <swise@opengridcomputing.com> > --- > drivers/infiniband/hw/mlx4/mr.c | 3 +++ > 1 file changed, 3 insertions(+) > Thanks, Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c index 4975f3e..17f4f15 100644 --- a/drivers/infiniband/hw/mlx4/mr.c +++ b/drivers/infiniband/hw/mlx4/mr.c @@ -407,6 +407,9 @@ struct ib_mr *mlx4_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, goto err_mr; mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key; + mr->ibmr.length = length; + mr->ibmr.iova = virt_addr; + mr->ibmr.page_size = 1U << shift; return &mr->ibmr;
Setting iova, length, and page_size allows this information to be seen via NLDEV netlink queries, which can aid in user rdma debugging. Signed-off-by: Steve Wise <swise@opengridcomputing.com> --- drivers/infiniband/hw/mlx4/mr.c | 3 +++ 1 file changed, 3 insertions(+)