mbox series

[RDMA,for-next,V4,0/6] Add MAD stack trace points

Message ID 20190211151503.16434-1-ira.weiny@intel.com (mailing list archive)
Headers show
Series Add MAD stack trace points | expand

Message

Ira Weiny Feb. 11, 2019, 3:14 p.m. UTC
From: Ira Weiny <ira.weiny@intel.com>

I've been pretty busy with some personal issues but I finally got some time to
rework a V4 of this series.

V4 converts dev_name to dev_index to ensure traces are consistently tagged with
the same "device identifier".

I believe with this change I have addressed all the comments.

Again we are leaving the snoop interface in and there is a sample eBPF which
shows how one can further filter at the tracepoints to distill the information
being traced.

Changes for V4:
	Change dev_name to dev_index

Changes for V3:
	Rebased on current RDMA for next
	Change license text to SPDX tag
	Change dev_name to string from array
	Reorder fields for more compact ring buffer utilization
	Use a defined roce address type for safer memcpy/memset
	Adjust BPF to new umad format

Changes for v2:
        Update MAINTAINERS as indicated from Doug
	Now CC'ing the Tracing maintainers so they are aware of the additions

[1] https://www.spinics.net/lists/linux-rdma/msg29109.html

Ira Weiny (6):
  IB/MAD: Add send path trace points
  IB/MAD: Add recv path trace point
  IB/MAD: Add agent trace points
  IB/UMAD: Add umad trace points
  IB/MAD: Add SMP details to MAD tracing
  BPF: Add sample code for new ib_umad tracepoint

 MAINTAINERS                        |   4 +
 drivers/infiniband/core/mad.c      |  95 +++++++-
 drivers/infiniband/core/user_mad.c |   7 +
 include/trace/events/ib_mad.h      | 362 +++++++++++++++++++++++++++++
 include/trace/events/ib_umad.h     | 112 +++++++++
 samples/bpf/Makefile               |   3 +
 samples/bpf/ibumad_kern.c          | 123 ++++++++++
 samples/bpf/ibumad_user.c          | 120 ++++++++++
 8 files changed, 825 insertions(+), 1 deletion(-)
 create mode 100644 include/trace/events/ib_mad.h
 create mode 100644 include/trace/events/ib_umad.h
 create mode 100644 samples/bpf/ibumad_kern.c
 create mode 100644 samples/bpf/ibumad_user.c

Comments

Jason Gunthorpe Feb. 22, 2019, 10:23 p.m. UTC | #1
On Mon, Feb 11, 2019 at 07:14:57AM -0800, ira.weiny@intel.com wrote:
> From: Ira Weiny <ira.weiny@intel.com>
> 
> I've been pretty busy with some personal issues but I finally got some time to
> rework a V4 of this series.
> 
> V4 converts dev_name to dev_index to ensure traces are consistently tagged with
> the same "device identifier".
> 
> I believe with this change I have addressed all the comments.
> 
> Again we are leaving the snoop interface in and there is a sample eBPF which
> shows how one can further filter at the tracepoints to distill the information
> being traced.
> 
> Changes for V4:
> 	Change dev_name to dev_index
> 
> Changes for V3:
> 	Rebased on current RDMA for next
> 	Change license text to SPDX tag
> 	Change dev_name to string from array
> 	Reorder fields for more compact ring buffer utilization
> 	Use a defined roce address type for safer memcpy/memset
> 	Adjust BPF to new umad format
> 
> Changes for v2:
>         Update MAINTAINERS as indicated from Doug
> 	Now CC'ing the Tracing maintainers so they are aware of the additions
> 
> [1] https://www.spinics.net/lists/linux-rdma/msg29109.html
> 
> Ira Weiny (6):
>   IB/MAD: Add send path trace points
>   IB/MAD: Add recv path trace point
>   IB/MAD: Add agent trace points
>   IB/UMAD: Add umad trace points
>   IB/MAD: Add SMP details to MAD tracing
>   BPF: Add sample code for new ib_umad tracepoint

Will you fix the unncessary checkpatch complaints and resumbit?

/tmp/tmpc698_2rl/0003-IB-MAD-Add-agent-trace-points.patch:79: WARNING: line over 80 characters
#79: FILE: include/trace/events/ib_mad.h:244:
+			__entry->mgmt_class_version = agent->reg_req->mgmt_class_version;

/tmp/tmpc698_2rl/0003-IB-MAD-Add-agent-trace-points.patch:88: WARNING: line over 80 characters
#88: FILE: include/trace/events/ib_mad.h:253:
+		__entry->hi_tid, __entry->mgmt_class, __entry->mgmt_class_version


#26: FILE: drivers/infiniband/core/mad.c:2345:
+		ib_query_pkey(qp_info->port_priv->device, qp_info->port_priv->port_num,

/tmp/tmpc698_2rl/0002-IB-MAD-Add-recv-path-trace-point.patch:29: WARNING: line over 80 characters
#29: FILE: drivers/infiniband/core/mad.c:2348:
+		trace_ib_mad_recv_done_handler(qp_info, wc, (struct ib_mad_hdr *)recv->mad,

/tmp/tmpc698_2rl/0002-IB-MAD-Add-recv-path-trace-point.patch:45: WARNING: line over 80 characters
#45: FILE: include/trace/events/ib_mad.h:162:
+	TP_PROTO(struct ib_mad_qp_info *qp_info, struct ib_wc *wc, struct ib_mad_hdr *mad_hdr,

/tmp/tmpc698_2rl/0002-IB-MAD-Add-recv-path-trace-point.patch:91: WARNING: Avoid unnecessary line continuations
#91: FILE: include/trace/events/ib_mad.h:208:
+	TP_printk("%d:%d QP%d : RECV WC Status %d : length %d : hdr : " \

/tmp/tmpc698_2rl/0002-IB-MAD-Add-recv-path-trace-point.patch:92: WARNING: line over 80 characters
#92: FILE: include/trace/events/ib_mad.h:209:
+		  "base_ver 0x%02x class 0x%02x class_ver 0x%02x method 0x%02x " \

/tmp/tmpc698_2rl/0002-IB-MAD-Add-recv-path-trace-point.patch:94: WARNING: line over 80 characters
#94: FILE: include/trace/events/ib_mad.h:211:
+		  "attr_id 0x%04x attr_mod 0x%08x slid 0x%08x src QP%d, sl %d " \

/tmp/tmpc698_2rl/0002-IB-MAD-Add-recv-path-trace-point.patch:99: WARNING: line over 80 characters
#99: FILE: include/trace/events/ib_mad.h:216:
+		__entry->base_version, __entry->mgmt_class, __entry->class_version,

#91: FILE: include/trace/events/ib_mad.h:297:
+	TP_printk("OPA SMP: hop_ptr %d hop_cnt %d " \

/tmp/tmpc698_2rl/0005-IB-MAD-Add-SMP-details-to-MAD-tracing.patch:136: WARNING: Avoid unnecessary line continuations
#136: FILE: include/trace/events/ib_mad.h:342:
+	TP_printk("OPA SMP: hop_ptr %d hop_cnt %d " \

#67: FILE: include/trace/events/ib_umad.h:1:
+// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:139: WARNING: line over 80 characters
#139: FILE: include/trace/events/ib_umad.h:73:
+		__entry->base_version = ((struct ib_mad_hdr *)mad->data)->base_version;

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:140: WARNING: line over 80 characters
#140: FILE: include/trace/events/ib_umad.h:74:
+		__entry->mgmt_class = ((struct ib_mad_hdr *)mad->data)->mgmt_class;

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:141: WARNING: line over 80 characters
#141: FILE: include/trace/events/ib_umad.h:75:
+		__entry->class_version = ((struct ib_mad_hdr *)mad->data)->class_version;

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:144: WARNING: line over 80 characters
#144: FILE: include/trace/events/ib_umad.h:78:
+		__entry->class_specific = ((struct ib_mad_hdr *)mad->data)->class_specific;

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:150: WARNING: line over 80 characters
#150: FILE: include/trace/events/ib_umad.h:84:
+	TP_printk("%d:%d umad_hdr: id 0x%08x status 0x%08x ms %u ret %u len %u QP%u " \

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:150: WARNING: Avoid unnecessary line continuations
#150: FILE: include/trace/events/ib_umad.h:84:
+	TP_printk("%d:%d umad_hdr: id 0x%08x status 0x%08x ms %u ret %u len %u QP%u " \

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:151: WARNING: line over 80 characters
#151: FILE: include/trace/events/ib_umad.h:85:
+		  "qkey 0x%08x lid 0x%04x sl %u path_bits 0x%x grh 0x%x gidi %u " \

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:158: WARNING: line over 80 characters
#158: FILE: include/trace/events/ib_umad.h:92:
+		be32_to_cpu(__entry->qkey), be16_to_cpu(__entry->lid), __entry->sl,

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:162: WARNING: line over 80 characters
#162: FILE: include/trace/events/ib_umad.h:96:
+		__entry->base_version, __entry->mgmt_class, __entry->class_version,

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:163: WARNING: line over 80 characters
#163: FILE: include/trace/events/ib_umad.h:97:
+		__entry->method, be16_to_cpu(__entry->mad_status), be16_to_cpu(__entry->class_specific),

/tmp/tmpc698_2rl/0004-IB-UMAD-Add-umad-trace-points.patch:164: WARNING: line over 80 characters
#164: FILE: include/trace/events/ib_umad.h:98:
+		be64_to_cpu(__entry->tid), be16_to_cpu(__entry->attr_id), be32_to_cpu(__entry->attr_mod)