summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorNir Muchtar <nirm@voltaire.com>2011-01-13 13:56:04 +0000
committerRoland Dreier <roland@purestorage.com>2011-05-25 13:46:23 -0700
commit83e9502d8db142822f3302e6a46a45082d3a27b7 (patch)
tree9c2888434fa1dd50c360de637bb902961476705b /drivers/infiniband
parent753f618ae03a699cc30044d64eea84165016dc6e (diff)
downloadblackbird-op-linux-83e9502d8db142822f3302e6a46a45082d3a27b7.tar.gz
blackbird-op-linux-83e9502d8db142822f3302e6a46a45082d3a27b7.zip
RDMA/cma: Save PID of ID's owner
Save the PID associated with an RDMA CM ID for reporting via netlink. Signed-off-by: Nir Muchtar <nirm@voltaire.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/cma.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 5dd9acb92c3a..b6a33b3c516d 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -133,6 +133,7 @@ struct rdma_id_private {
u32 seq_num;
u32 qkey;
u32 qp_num;
+ pid_t owner;
u8 srq;
u8 tos;
u8 reuseaddr;
@@ -420,6 +421,7 @@ struct rdma_cm_id *rdma_create_id(rdma_cm_event_handler event_handler,
if (!id_priv)
return ERR_PTR(-ENOMEM);
+ id_priv->owner = task_pid_nr(current);
id_priv->state = RDMA_CM_IDLE;
id_priv->id.context = context;
id_priv->id.event_handler = event_handler;
@@ -2746,6 +2748,9 @@ int rdma_accept(struct rdma_cm_id *id, struct rdma_conn_param *conn_param)
int ret;
id_priv = container_of(id, struct rdma_id_private, id);
+
+ id_priv->owner = task_pid_nr(current);
+
if (!cma_comp(id_priv, RDMA_CM_CONNECT))
return -EINVAL;
@@ -3385,6 +3390,7 @@ static int cma_get_id_stats(struct sk_buff *skb, struct netlink_callback *cb)
}
}
+ id_stats->pid = id_priv->owner;
id_stats->port_space = id->ps;
id_stats->cm_state = id_priv->state;
id_stats->qp_num = id_priv->qp_num;
OpenPOWER on IntegriCloud