diff options
author | Steve Wise <swise@opengridcomputing.com> | 2018-03-02 00:58:06 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-03-08 23:03:03 +0300 |
commit | e6f0330106f4aa51e377b183c759758242ccab6c (patch) | |
tree | 8b77b26d80935ca57ff8cddbf4f2a24da307cbba /drivers/infiniband/hw | |
parent | 750fb1656ab7781d5d0f1cd38ca4f1f958f02f45 (diff) | |
download | linux-e6f0330106f4aa51e377b183c759758242ccab6c.tar.xz |
mlx4_ib: set user mr attributes in struct ib_mr
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>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mlx4/mr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c index 4975f3e6596e..17f4f151a97f 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; |