diff options
author | Steve Wise <swise@opengridcomputing.com> | 2018-03-02 00:58:13 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-03-08 23:03:03 +0300 |
commit | fccec5b89ac61ebe2f353feecd08a16621f2418b (patch) | |
tree | f7930115646b4cc3902b3f8c334fd697406db131 /include | |
parent | e6f0330106f4aa51e377b183c759758242ccab6c (diff) | |
download | linux-fccec5b89ac61ebe2f353feecd08a16621f2418b.tar.xz |
RDMA/nldev: provide detailed MR information
Implement the RDMA nldev netlink interface for dumping detailed
MR information.
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 'include')
-rw-r--r-- | include/rdma/ib_verbs.h | 5 | ||||
-rw-r--r-- | include/rdma/restrack.h | 4 | ||||
-rw-r--r-- | include/uapi/rdma/rdma_netlink.h | 9 |
3 files changed, 18 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 73b2387e3f74..7df3274818f9 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1772,6 +1772,11 @@ struct ib_mr { struct ib_uobject *uobject; /* user */ struct list_head qp_entry; /* FR */ }; + + /* + * Implementation details of the RDMA core, don't use in drivers: + */ + struct rdma_restrack_entry res; }; struct ib_mw { diff --git a/include/rdma/restrack.h b/include/rdma/restrack.h index af886670af85..a56f4f200277 100644 --- a/include/rdma/restrack.h +++ b/include/rdma/restrack.h @@ -34,6 +34,10 @@ enum rdma_restrack_type { */ RDMA_RESTRACK_CM_ID, /** + * @RDMA_RESTRACK_MR: Memory Region (MR) + */ + RDMA_RESTRACK_MR, + /** * @RDMA_RESTRACK_MAX: Last entry, used for array dclarations */ RDMA_RESTRACK_MAX diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h index 36cf1f0025fd..6d9ec38e3af0 100644 --- a/include/uapi/rdma/rdma_netlink.h +++ b/include/uapi/rdma/rdma_netlink.h @@ -242,6 +242,8 @@ enum rdma_nldev_command { RDMA_NLDEV_CMD_RES_CQ_GET, /* can dump */ + RDMA_NLDEV_CMD_RES_MR_GET, /* can dump */ + RDMA_NLDEV_NUM_OPS }; @@ -372,6 +374,13 @@ enum rdma_nldev_attr { RDMA_NLDEV_ATTR_RES_USECNT, /* u64 */ RDMA_NLDEV_ATTR_RES_POLL_CTX, /* u8 */ + RDMA_NLDEV_ATTR_RES_MR, /* nested table */ + RDMA_NLDEV_ATTR_RES_MR_ENTRY, /* nested table */ + RDMA_NLDEV_ATTR_RES_RKEY, /* u32 */ + RDMA_NLDEV_ATTR_RES_LKEY, /* u32 */ + RDMA_NLDEV_ATTR_RES_IOVA, /* u64 */ + RDMA_NLDEV_ATTR_RES_MRLEN, /* u64 */ + RDMA_NLDEV_ATTR_MAX }; #endif /* _UAPI_RDMA_NETLINK_H */ |