]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
IB/hfi1: Report pid in qp_stats to aid debug
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Mon, 7 Mar 2016 19:35:08 +0000 (11:35 -0800)
committerDoug Ledford <dledford@redhat.com>
Thu, 17 Mar 2016 19:55:19 +0000 (15:55 -0400)
Tracking user/QP ownership is needed to debug issues with
user ULPs like OpenMPI.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rdmavt/qp.c
drivers/staging/rdma/hfi1/qp.c
include/rdma/rdmavt_qp.h

index ef82abf2d89ec9d2b7ace9bf4706b4de61b52f36..de34474b0dfbf4d515b41f833a288e30e81d66d1 100644 (file)
@@ -786,6 +786,7 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
                                goto bail_ip;
                        }
                }
+               qp->pid = current->pid;
        }
 
        spin_lock(&rdi->n_qps_lock);
index 9e831a162f193cc6c8e0d380cc2663b9c6069f57..6f8571518ad1bd396ca3bd4caba28f11404d9092 100644 (file)
@@ -678,7 +678,7 @@ void qp_iter_print(struct seq_file *s, struct qp_iter *iter)
        wqe = rvt_get_swqe_ptr(qp, qp->s_last);
        send_context = qp_to_send_context(qp, priv->s_sc);
        seq_printf(s,
-                  "N %d %s QP%x R %u %s %u %u %u f=%x %u %u %u %u %u %u PSN %x %x %x %x %x (%u %u %u %u %u %u %u) QP%x LID %x SL %u MTU %u %u %u %u SDE %p,%u SC %p,%u CQ %u %u\n",
+                  "N %d %s QP%x R %u %s %u %u %u f=%x %u %u %u %u %u %u PSN %x %x %x %x %x (%u %u %u %u %u %u %u) QP%x LID %x SL %u MTU %u %u %u %u SDE %p,%u SC %p,%u CQ %u %u PID %d\n",
                   iter->n,
                   qp_idle(qp) ? "I" : "B",
                   qp->ibqp.qp_num,
@@ -712,7 +712,8 @@ void qp_iter_print(struct seq_file *s, struct qp_iter *iter)
                   send_context,
                   send_context ? send_context->sw_index : 0,
                   ibcq_to_rvtcq(qp->ibqp.send_cq)->queue->head,
-                  ibcq_to_rvtcq(qp->ibqp.send_cq)->queue->tail);
+                  ibcq_to_rvtcq(qp->ibqp.send_cq)->queue->tail,
+                  qp->pid);
 }
 
 void qp_comm_est(struct rvt_qp *qp)
index f2f4df023aaa935354e02bebd2e7ffb8d7253c62..497e59065c2c6e31accc23896d42cd224d78887a 100644 (file)
@@ -251,6 +251,7 @@ struct rvt_qp {
 
        enum ib_mtu path_mtu;
        int srate_mbps;         /* s_srate (below) converted to Mbit/s */
+       pid_t pid;              /* pid for user mode QPs */
        u32 remote_qpn;
        u32 qkey;               /* QKEY for this QP (for UD or RD) */
        u32 s_size;             /* send work queue size */