Commit 83525b61 authored by Mike Marciniszyn's avatar Mike Marciniszyn Committed by Greg Kroah-Hartman

staging/rdma/hfi1: add additional rc traces

Add additional rc traces to aid in debugging rc retry logic.
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 64ffd86c
...@@ -927,6 +927,7 @@ static void rc_timeout(unsigned long arg) ...@@ -927,6 +927,7 @@ static void rc_timeout(unsigned long arg)
ibp->n_rc_timeouts++; ibp->n_rc_timeouts++;
qp->s_flags &= ~HFI1_S_TIMER; qp->s_flags &= ~HFI1_S_TIMER;
del_timer(&qp->s_timer); del_timer(&qp->s_timer);
trace_hfi1_rc_timeout(qp, qp->s_last_psn + 1);
restart_rc(qp, qp->s_last_psn + 1, 1); restart_rc(qp, qp->s_last_psn + 1, 1);
hfi1_schedule_send(qp); hfi1_schedule_send(qp);
} }
...@@ -1442,6 +1443,8 @@ static void rc_rcv_resp(struct hfi1_ibport *ibp, ...@@ -1442,6 +1443,8 @@ static void rc_rcv_resp(struct hfi1_ibport *ibp,
spin_lock_irqsave(&qp->s_lock, flags); spin_lock_irqsave(&qp->s_lock, flags);
trace_hfi1_rc_ack(qp, psn);
/* Ignore invalid responses. */ /* Ignore invalid responses. */
if (cmp_psn(psn, qp->s_next_psn) >= 0) if (cmp_psn(psn, qp->s_next_psn) >= 0)
goto ack_done; goto ack_done;
...@@ -1630,6 +1633,7 @@ static noinline int rc_rcv_error(struct hfi1_other_headers *ohdr, void *data, ...@@ -1630,6 +1633,7 @@ static noinline int rc_rcv_error(struct hfi1_other_headers *ohdr, void *data,
u8 i, prev; u8 i, prev;
int old_req; int old_req;
trace_hfi1_rc_rcv_error(qp, psn);
if (diff > 0) { if (diff > 0) {
/* /*
* Packet sequence error. * Packet sequence error.
......
...@@ -126,13 +126,13 @@ const char *parse_everbs_hdrs( ...@@ -126,13 +126,13 @@ const char *parse_everbs_hdrs(
case OP(RC, ACKNOWLEDGE): case OP(RC, ACKNOWLEDGE):
trace_seq_printf(p, AETH_PRN, trace_seq_printf(p, AETH_PRN,
be32_to_cpu(eh->aeth) >> 24, be32_to_cpu(eh->aeth) >> 24,
be32_to_cpu(eh->aeth) & HFI1_QPN_MASK); be32_to_cpu(eh->aeth) & HFI1_MSN_MASK);
break; break;
/* aeth + atomicacketh */ /* aeth + atomicacketh */
case OP(RC, ATOMIC_ACKNOWLEDGE): case OP(RC, ATOMIC_ACKNOWLEDGE):
trace_seq_printf(p, AETH_PRN " " ATOMICACKETH_PRN, trace_seq_printf(p, AETH_PRN " " ATOMICACKETH_PRN,
(be32_to_cpu(eh->at.aeth) >> 24) & 0xff, (be32_to_cpu(eh->at.aeth) >> 24) & 0xff,
be32_to_cpu(eh->at.aeth) & HFI1_QPN_MASK, be32_to_cpu(eh->at.aeth) & HFI1_MSN_MASK,
(unsigned long long)ib_u64_get(eh->at.atomic_ack_eth)); (unsigned long long)ib_u64_get(eh->at.atomic_ack_eth));
break; break;
/* atomiceth */ /* atomiceth */
......
...@@ -1252,37 +1252,61 @@ TRACE_EVENT(hfi1_sdma_state, ...@@ -1252,37 +1252,61 @@ TRACE_EVENT(hfi1_sdma_state,
#undef TRACE_SYSTEM #undef TRACE_SYSTEM
#define TRACE_SYSTEM hfi1_rc #define TRACE_SYSTEM hfi1_rc
DECLARE_EVENT_CLASS(hfi1_sdma_rc, DECLARE_EVENT_CLASS(hfi1_rc_template,
TP_PROTO(struct hfi1_qp *qp, u32 psn), TP_PROTO(struct hfi1_qp *qp, u32 psn),
TP_ARGS(qp, psn), TP_ARGS(qp, psn),
TP_STRUCT__entry( TP_STRUCT__entry(
DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device)) DD_DEV_ENTRY(dd_from_ibdev(qp->ibqp.device))
__field(u32, qpn) __field(u32, qpn)
__field(u32, flags) __field(u32, s_flags)
__field(u32, psn) __field(u32, psn)
__field(u32, sending_psn) __field(u32, s_psn)
__field(u32, sending_hpsn) __field(u32, s_next_psn)
__field(u32, s_sending_psn)
__field(u32, s_sending_hpsn)
__field(u32, r_psn)
), ),
TP_fast_assign( TP_fast_assign(
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device)) DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
__entry->qpn = qp->ibqp.qp_num; __entry->qpn = qp->ibqp.qp_num;
__entry->flags = qp->s_flags; __entry->s_flags = qp->s_flags;
__entry->psn = psn; __entry->psn = psn;
__entry->sending_psn = qp->s_sending_psn; __entry->s_psn = qp->s_psn;
__entry->sending_hpsn = qp->s_sending_hpsn; __entry->s_next_psn = qp->s_next_psn;
__entry->s_sending_psn = qp->s_sending_psn;
__entry->s_sending_hpsn = qp->s_sending_hpsn;
__entry->r_psn = qp->r_psn;
), ),
TP_printk( TP_printk(
"[%s] qpn 0x%x flags 0x%x psn 0x%x sending_psn 0x%x sending_hpsn 0x%x", "[%s] qpn 0x%x s_flags 0x%x psn 0x%x s_psn 0x%x s_next_psn 0x%x s_sending_psn 0x%x sending_hpsn 0x%x r_psn 0x%x",
__get_str(dev), __get_str(dev),
__entry->qpn, __entry->qpn,
__entry->flags, __entry->s_flags,
__entry->psn, __entry->psn,
__entry->sending_psn, __entry->s_psn,
__entry->sending_psn __entry->s_next_psn,
__entry->s_sending_psn,
__entry->s_sending_hpsn,
__entry->r_psn
) )
); );
DEFINE_EVENT(hfi1_sdma_rc, hfi1_rc_sendcomplete, DEFINE_EVENT(hfi1_rc_template, hfi1_rc_sendcomplete,
TP_PROTO(struct hfi1_qp *qp, u32 psn),
TP_ARGS(qp, psn)
);
DEFINE_EVENT(hfi1_rc_template, hfi1_rc_ack,
TP_PROTO(struct hfi1_qp *qp, u32 psn),
TP_ARGS(qp, psn)
);
DEFINE_EVENT(hfi1_rc_template, hfi1_rc_timeout,
TP_PROTO(struct hfi1_qp *qp, u32 psn),
TP_ARGS(qp, psn)
);
DEFINE_EVENT(hfi1_rc_template, hfi1_rc_rcv_error,
TP_PROTO(struct hfi1_qp *qp, u32 psn), TP_PROTO(struct hfi1_qp *qp, u32 psn),
TP_ARGS(qp, psn) TP_ARGS(qp, psn)
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment