Skip to content

Commit d67d611

Browse files
mjruhljgunthorpe
authored andcommitted
IB/hfi1: Add RQ/SRQ information to QP stats
When debugging issues with RC QPs, it is useful to know if a QP has an associated RQ or SRQ, the size of the RQ, and any RNR timeout values. Add the necessary information to the QP stats output. Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Michael J. Ruhl <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 107013c commit d67d611

File tree

1 file changed

+8
-2
lines changed
  • drivers/infiniband/hw/hfi1

1 file changed

+8
-2
lines changed

drivers/infiniband/hw/hfi1/qp.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,14 +556,16 @@ void qp_iter_print(struct seq_file *s, struct rvt_qp_iter *iter)
556556
struct sdma_engine *sde;
557557
struct send_context *send_context;
558558
struct rvt_ack_entry *e = NULL;
559+
struct rvt_srq *srq = qp->ibqp.srq ?
560+
ibsrq_to_rvtsrq(qp->ibqp.srq) : NULL;
559561

560562
sde = qp_to_sdma_engine(qp, priv->s_sc);
561563
wqe = rvt_get_swqe_ptr(qp, qp->s_last);
562564
send_context = qp_to_send_context(qp, priv->s_sc);
563565
if (qp->s_ack_queue)
564566
e = &qp->s_ack_queue[qp->s_tail_ack_queue];
565567
seq_printf(s,
566-
"N %d %s QP %x R %u %s %u %u %u f=%x %u %u %u %u %u %u SPSN %x %x %x %x %x RPSN %x S(%u %u %u %u %u %u %u) R(%u %u %u) RQP %x LID %x SL %u MTU %u %u %u %u %u SDE %p,%u SC %p,%u SCQ %u %u PID %d OS %x %x E %x %x %x\n",
568+
"N %d %s QP %x R %u %s %u %u %u f=%x %u %u %u %u %u %u SPSN %x %x %x %x %x RPSN %x S(%u %u %u %u %u %u %u) R(%u %u %u) RQP %x LID %x SL %u MTU %u %u %u %u %u SDE %p,%u SC %p,%u SCQ %u %u PID %d OS %x %x E %x %x %x RNR %d %s %d\n",
567569
iter->n,
568570
qp_idle(qp) ? "I" : "B",
569571
qp->ibqp.qp_num,
@@ -610,7 +612,11 @@ void qp_iter_print(struct seq_file *s, struct rvt_qp_iter *iter)
610612
/* ack queue information */
611613
e ? e->opcode : 0,
612614
e ? e->psn : 0,
613-
e ? e->lpsn : 0);
615+
e ? e->lpsn : 0,
616+
qp->r_min_rnr_timer,
617+
srq ? "SRQ" : "RQ",
618+
srq ? srq->rq.size : qp->r_rq.size
619+
);
614620
}
615621

616622
void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp)

0 commit comments

Comments
 (0)