RDMA/restrack: Add general infrastructure to track RDMA resources
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 28 Jan 2018 09:17:20 +0000 (11:17 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 30 Jan 2018 03:21:39 +0000 (20:21 -0700)
commit02d8883f520ee91c4c40c0a31892eb25ea2df2c9
tree645f63fa7bf47040ac96f0da3039687d82929c93
parentf66c8ba4c9fa193481fdb8030504287bf5ad4d69
RDMA/restrack: Add general infrastructure to track RDMA resources

The RDMA subsystem has very strict set of objects to work with, but it
completely lacks tracking facilities and has no visibility of resource
utilization.

The following patch adds such infrastructure to keep track of RDMA
resources to help with debugging of user space applications. The primary
user of this infrastructure is RDMA nldev netlink (following patches), to
be exposed to userspace via rdmatool, but it is not limited too that.

At this stage, the main three objects (PD, CQ and QP) are added, and more
will be added later.

Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/Makefile
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/device.c
drivers/infiniband/core/restrack.c [new file with mode: 0644]
include/rdma/ib_verbs.h
include/rdma/restrack.h [new file with mode: 0644]