]> asedeno.scripts.mit.edu Git - linux.git/commit
RDMA/nldev: provide detailed CM_ID information
authorSteve Wise <swise@opengridcomputing.com>
Thu, 1 Mar 2018 21:57:44 +0000 (13:57 -0800)
committerDoug Ledford <dledford@redhat.com>
Thu, 8 Mar 2018 20:03:03 +0000 (15:03 -0500)
commit00313983cda6f37f747058e58c1cb8fba02bc134
tree70e6323e9d53958672bb012c3641e97964e98b56
parenta3b641af72ba899991ed847556951128ef41d52f
RDMA/nldev: provide detailed CM_ID information

Implement RDMA nldev netlink interface to get detailed CM_ID information.

Because cm_id's are attached to rdma devices in various work queue
contexts, the pid and task information at restrak_add() time is sometimes
not useful.  For example, an nvme/f host connection cm_id ends up being
bound to a device in a work queue context and the resulting pid at attach
time no longer exists after connection setup.  So instead we mark all
cm_id's created via the rdma_ucm as "user", and all others as "kernel".
This required tweaking the restrack code a little.  It also required
wrapping some rdma_cm functions to allow passing the module name string.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cma.c
drivers/infiniband/core/cma_priv.h
drivers/infiniband/core/nldev.c
drivers/infiniband/core/restrack.c
drivers/infiniband/core/ucma.c
include/rdma/rdma_cm.h
include/rdma/restrack.h
include/uapi/rdma/rdma_netlink.h