IB/hfi1: Add tracing support for send with invalidate opcode
authorJianxin Xiong <jianxin.xiong@intel.com>
Tue, 24 May 2016 19:50:17 +0000 (12:50 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 26 May 2016 16:21:10 +0000 (12:21 -0400)
Enable trace generation for packets with the "Send Last with
Invalidate" and "Send Only with Invalidate" opcodes.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/trace.c
drivers/infiniband/hw/hfi1/trace.h
drivers/infiniband/hw/hfi1/verbs.c

index caddb2ac3cfc9b9a2f1cb392102cc7054a425a31..79b2952c0dfb31a50f0f08e4a74d3f60b754e861 100644 (file)
@@ -66,6 +66,7 @@ u8 ibhdr_exhdr_len(struct hfi1_ib_header *hdr)
 #define RETH_PRN "reth vaddr 0x%.16llx rkey 0x%.8x dlen 0x%.8x"
 #define AETH_PRN "aeth syn 0x%.2x %s msn 0x%.8x"
 #define DETH_PRN "deth qkey 0x%.8x sqpn 0x%.6x"
+#define IETH_PRN "ieth rkey 0x%.8x"
 #define ATOMICACKETH_PRN "origdata %lld"
 #define ATOMICETH_PRN "vaddr 0x%llx rkey 0x%.8x sdata %lld cdata %lld"
 
@@ -166,6 +167,12 @@ const char *parse_everbs_hdrs(
                                 be32_to_cpu(eh->ud.deth[0]),
                                 be32_to_cpu(eh->ud.deth[1]) & RVT_QPN_MASK);
                break;
+       /* ieth */
+       case OP(RC, SEND_LAST_WITH_INVALIDATE):
+       case OP(RC, SEND_ONLY_WITH_INVALIDATE):
+               trace_seq_printf(p, IETH_PRN,
+                                be32_to_cpu(eh->ieth));
+               break;
        }
        trace_seq_putc(p, 0);
        return ret;
index a6c1adf20dca3f8944caa0734b9fc453a37488ee..28c1d083288632b9f90042d752732a8a157e3130 100644 (file)
@@ -392,6 +392,8 @@ __print_symbolic(opcode,                                   \
        ib_opcode_name(RC_ATOMIC_ACKNOWLEDGE),             \
        ib_opcode_name(RC_COMPARE_SWAP),                   \
        ib_opcode_name(RC_FETCH_ADD),                      \
+       ib_opcode_name(RC_SEND_LAST_WITH_INVALIDATE),      \
+       ib_opcode_name(RC_SEND_ONLY_WITH_INVALIDATE),      \
        ib_opcode_name(UC_SEND_FIRST),                     \
        ib_opcode_name(UC_SEND_MIDDLE),                    \
        ib_opcode_name(UC_SEND_LAST),                      \
index ae92ac5ff232a663f8c479b3c200cb65674e1557..849c4b9399d428a7930b5ac1bfd4ecd7730ee1ac 100644 (file)
@@ -335,6 +335,8 @@ const u8 hdr_len_by_opcode[256] = {
        [IB_OPCODE_RC_ATOMIC_ACKNOWLEDGE]             = 12 + 8 + 4,
        [IB_OPCODE_RC_COMPARE_SWAP]                   = 12 + 8 + 28,
        [IB_OPCODE_RC_FETCH_ADD]                      = 12 + 8 + 28,
+       [IB_OPCODE_RC_SEND_LAST_WITH_INVALIDATE]      = 12 + 8 + 4,
+       [IB_OPCODE_RC_SEND_ONLY_WITH_INVALIDATE]      = 12 + 8 + 4,
        /* UC */
        [IB_OPCODE_UC_SEND_FIRST]                     = 12 + 8,
        [IB_OPCODE_UC_SEND_MIDDLE]                    = 12 + 8,