From: Jubin John <jubin.john@intel.com>
To: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org
Cc: linux-rdma@vger.kernel.org, dledford@redhat.com
Subject: [PATCH v2 03/17] staging/rdma/hfi1: Add aeth name syndrome decode
Date: Tue, 1 Dec 2015 15:38:12 -0500 [thread overview]
Message-ID: <1449002306-15180-4-git-send-email-jubin.john@intel.com> (raw)
In-Reply-To: <1449002306-15180-1-git-send-email-jubin.john@intel.com>
From: Dean Luick <dean.luick@intel.com>
Add aeth name syndrome decode to enhance debugging.
The IBTA RC ACK contains an ACK extended transport header.
Part of that header is the syndrome field that qualifies the RC ACK as an
ACK, NAK, or RNR NAK.
Without the patch here is the syndrome decode:
aeth syn 0x00
Here is the decode with the fix:
aeth syn 0x00 ACK
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
---
Changes in v2:
- Added more information in commit message
drivers/staging/rdma/hfi1/trace.c | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rdma/hfi1/trace.c b/drivers/staging/rdma/hfi1/trace.c
index f55b751..10122e8 100644
--- a/drivers/staging/rdma/hfi1/trace.c
+++ b/drivers/staging/rdma/hfi1/trace.c
@@ -67,7 +67,7 @@ u8 ibhdr_exhdr_len(struct hfi1_ib_header *hdr)
#define IMM_PRN "imm %d"
#define RETH_PRN "reth vaddr 0x%.16llx rkey 0x%.8x dlen 0x%.8x"
-#define AETH_PRN "aeth syn 0x%.2x msn 0x%.8x"
+#define AETH_PRN "aeth syn 0x%.2x %s msn 0x%.8x"
#define DETH_PRN "deth qkey 0x%.8x sqpn 0x%.6x"
#define ATOMICACKETH_PRN "origdata %lld"
#define ATOMICETH_PRN "vaddr 0x%llx rkey 0x%.8x sdata %lld cdata %lld"
@@ -79,6 +79,19 @@ static u64 ib_u64_get(__be32 *p)
return ((u64)be32_to_cpu(p[0]) << 32) | be32_to_cpu(p[1]);
}
+static const char *parse_syndrome(u8 syndrome)
+{
+ switch (syndrome >> 5) {
+ case 0:
+ return "ACK";
+ case 1:
+ return "RNRNAK";
+ case 3:
+ return "NAK";
+ }
+ return "";
+}
+
const char *parse_everbs_hdrs(
struct trace_seq *p,
u8 opcode,
@@ -124,16 +137,18 @@ const char *parse_everbs_hdrs(
case OP(RC, RDMA_READ_RESPONSE_LAST):
case OP(RC, RDMA_READ_RESPONSE_ONLY):
case OP(RC, ACKNOWLEDGE):
- trace_seq_printf(p, AETH_PRN,
- be32_to_cpu(eh->aeth) >> 24,
- be32_to_cpu(eh->aeth) & HFI1_MSN_MASK);
+ trace_seq_printf(p, AETH_PRN, be32_to_cpu(eh->aeth) >> 24,
+ parse_syndrome(be32_to_cpu(eh->aeth) >> 24),
+ be32_to_cpu(eh->aeth) & HFI1_MSN_MASK);
break;
/* aeth + atomicacketh */
case OP(RC, ATOMIC_ACKNOWLEDGE):
trace_seq_printf(p, AETH_PRN " " ATOMICACKETH_PRN,
- (be32_to_cpu(eh->at.aeth) >> 24) & 0xff,
- be32_to_cpu(eh->at.aeth) & HFI1_MSN_MASK,
- (unsigned long long)ib_u64_get(eh->at.atomic_ack_eth));
+ be32_to_cpu(eh->at.aeth) >> 24,
+ parse_syndrome(be32_to_cpu(eh->at.aeth) >> 24),
+ be32_to_cpu(eh->at.aeth) & HFI1_MSN_MASK,
+ (unsigned long long)
+ ib_u64_get(eh->at.atomic_ack_eth));
break;
/* atomiceth */
case OP(RC, COMPARE_SWAP):
--
1.7.1
next prev parent reply other threads:[~2015-12-01 20:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 20:38 [PATCH v2 00/17] Driver cleanup and misc fixes series 3 Jubin John
2015-12-01 20:38 ` [PATCH v2 02/17] staging/rdma/hfi1: Decode CNP opcode Jubin John
2015-12-01 20:38 ` Jubin John [this message]
[not found] ` <1449002306-15180-1-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-12-01 20:38 ` [PATCH v2 01/17] staging/rdma/hfi1: Support alternate firmware names Jubin John
2015-12-01 20:38 ` [PATCH v2 04/17] staging/rdma/hfi1: Fix qp.h comments Jubin John
[not found] ` <1449002306-15180-5-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-12-01 21:30 ` Jason Gunthorpe
2015-12-01 20:38 ` [PATCH v2 05/17] staging/rdma/hfi1: Clean up comments Jubin John
[not found] ` <1449002306-15180-6-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-12-21 21:52 ` Greg KH
2015-12-01 20:38 ` [PATCH v2 06/17] staging/rdma/hfi1: Add one-time LCB reset Jubin John
2015-12-01 20:38 ` [PATCH v2 07/17] staging/rdma/hfi1: Extend quiet timeout Jubin John
2015-12-01 20:38 ` [PATCH v2 08/17] staging/rdma/hfi1: Add a credit push on diagpkt allocate fail Jubin John
2015-12-01 20:38 ` [PATCH v2 09/17] staging/rdma/hfi1: Correctly limit VLs against SDMA engines Jubin John
2015-12-01 20:38 ` [PATCH v2 10/17] staging/rdma/hfi1: Adds software counters for bitfields within various error status fields Jubin John
2015-12-01 20:38 ` [PATCH v2 11/17] staging/rdma/hfi1: Destroy workqueues if hfi1_register_ib_device() call returns error Jubin John
2015-12-01 20:38 ` [PATCH v2 12/17] staging/rdma/hfi1: Unexpected link up pkey values are not an error Jubin John
2015-12-01 20:38 ` [PATCH v2 13/17] staging/rdma/hfi1: remove SPC freeze error messages Jubin John
2015-12-01 20:38 ` [PATCH v2 14/17] staging/rdma/hfi1: unknown frame messages are not errors Jubin John
2015-12-01 20:38 ` [PATCH v2 15/17] staging/rdma/hfi1: Consider VL15 MTU also when calculating the maximum VL MTU Jubin John
2015-12-01 20:38 ` [PATCH v2 16/17] staging/rdma/hfi1: Fix Xmit Wait calculation Jubin John
2015-12-01 20:38 ` [PATCH v2 17/17] staging/rdma/hfi1: Adding counter resolutions for DataPortCounters Jubin John
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449002306-15180-4-git-send-email-jubin.john@intel.com \
--to=jubin.john@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=dledford@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).