* [PATCH 0/5 RFC] IB/mad: Add kernel trace to umad/mad
@ 2015-10-01 4:51 ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1443675089-11786-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w @ 2015-10-01 4:51 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
yun.wang-EIkl63zCoXaH+58JC4qpiA,
xerofoify-Re5JQEeQqe8AvxtiuMwx3w, Ira Weiny
From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
This has mild testing and still has some FIXMEs etc. I'm submitting to help
decide if we wish to remove the MAD snooping infrastructure.
I believe this to be a more efficient debugging mechanism as it is most always
available (if debugfs is available) and should have limited performance impact
when off.
Ira Weiny (5):
IB/MAD: add send path trace points
IB/MAD: add recv path trace point
IB/MAD Add agent trace points
IB/mad: Add umad trace points
IB/mad: Add SMP tracing
drivers/infiniband/core/mad.c | 72 +++++++
drivers/infiniband/core/user_mad.c | 5 +
include/trace/events/ib_mad.h | 385 +++++++++++++++++++++++++++++++++++++
include/trace/events/ib_umad.h | 312 ++++++++++++++++++++++++++++++
4 files changed, 774 insertions(+)
create mode 100644 include/trace/events/ib_mad.h
create mode 100644 include/trace/events/ib_umad.h
--
1.8.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/5 RFC] IB/MAD: add send path trace points
[not found] ` <1443675089-11786-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-10-01 4:51 ` ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1443675089-11786-2-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-01 4:51 ` [PATCH 2/5 RFC] IB/MAD: add recv path trace point ira.weiny-ral2JQCrhuEAvxtiuMwx3w
` (4 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w @ 2015-10-01 4:51 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
yun.wang-EIkl63zCoXaH+58JC4qpiA,
xerofoify-Re5JQEeQqe8AvxtiuMwx3w, Ira Weiny
From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/core/mad.c | 51 +++++++++++
include/trace/events/ib_mad.h | 191 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 242 insertions(+)
create mode 100644 include/trace/events/ib_mad.h
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 08ab92604e88..0631bff54755 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -48,6 +48,31 @@
#include "opa_smi.h"
#include "agent.h"
+struct ib_mad_addr {
+ u16 dlid;
+ u8 sl;
+ u16 pkey;
+ u32 rqpn;
+ u32 rqkey;
+};
+static void trace_create_mad_addr(struct ib_device *dev, u8 pnum,
+ struct ib_send_wr *wr,
+ struct ib_mad_addr *addr)
+{
+ struct ib_ah_attr attr;
+
+ memset(&attr, 0, sizeof(attr));
+ ib_query_ah(wr->wr.ud.ah, &attr);
+
+ addr->dlid = attr.dlid;
+ addr->sl = attr.sl;
+ ib_query_pkey(dev, pnum, wr->wr.ud.pkey_index, &addr->pkey);
+ addr->rqpn = wr->wr.ud.remote_qpn;
+ addr->rqkey = wr->wr.ud.remote_qkey;
+}
+#define CREATE_TRACE_POINTS
+#include <trace/events/ib_mad.h>
+
MODULE_LICENSE("Dual BSD/GPL");
MODULE_DESCRIPTION("kernel IB MAD API");
MODULE_AUTHOR("Hal Rosenstock");
@@ -982,6 +1007,14 @@ int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr)
spin_lock_irqsave(&qp_info->send_queue.lock, flags);
if (qp_info->send_queue.count < qp_info->send_queue.max_active) {
+ if (trace_ib_mad_ib_send_mad_enabled()) {
+ struct ib_mad_addr addr;
+
+ trace_create_mad_addr(qp_info->port_priv->device,
+ qp_info->port_priv->port_num,
+ &mad_send_wr->send_wr, &addr);
+ trace_ib_mad_ib_send_mad(mad_send_wr, &addr);
+ }
ret = ib_post_send(mad_agent->qp, &mad_send_wr->send_wr,
&bad_send_wr);
list = &qp_info->send_queue.list;
@@ -2226,6 +2259,8 @@ static void ib_mad_send_done_handler(struct ib_mad_port_private *port_priv,
send_queue = mad_list->mad_queue;
qp_info = send_queue->qp_info;
+ trace_ib_mad_send_done_handler(mad_send_wr, wc);
+
retry:
ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device,
mad_send_wr->header_mapping,
@@ -2254,6 +2289,14 @@ retry:
ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
if (queued_send_wr) {
+ if (trace_ib_mad_send_done_resend_enabled()) {
+ struct ib_mad_addr addr;
+
+ trace_create_mad_addr(qp_info->port_priv->device,
+ qp_info->port_priv->port_num,
+ &mad_send_wr->send_wr, &addr);
+ trace_ib_mad_send_done_resend(queued_send_wr, &addr);
+ }
ret = ib_post_send(qp_info->qp, &queued_send_wr->send_wr,
&bad_send_wr);
if (ret) {
@@ -2312,6 +2355,14 @@ static void mad_error_handler(struct ib_mad_port_private *port_priv,
struct ib_send_wr *bad_send_wr;
mad_send_wr->retry = 0;
+ if (trace_ib_mad_mad_error_handler_enabled()) {
+ struct ib_mad_addr addr;
+
+ trace_create_mad_addr(qp_info->port_priv->device,
+ qp_info->port_priv->port_num,
+ &mad_send_wr->send_wr, &addr);
+ trace_ib_mad_mad_error_handler(mad_send_wr, &addr);
+ }
ret = ib_post_send(qp_info->qp, &mad_send_wr->send_wr,
&bad_send_wr);
if (ret)
diff --git a/include/trace/events/ib_mad.h b/include/trace/events/ib_mad.h
new file mode 100644
index 000000000000..7e42ac35324a
--- /dev/null
+++ b/include/trace/events/ib_mad.h
@@ -0,0 +1,191 @@
+/*
+ * Copyright (c) 2015 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM ib_mad
+
+#if !defined(_TRACE_IB_MAD_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_IB_MAD_H
+
+#include <linux/tracepoint.h>
+#include <rdma/ib_mad.h>
+
+DECLARE_EVENT_CLASS(ib_mad_send_template,
+ TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_mad_addr *addr),
+ TP_ARGS(wr, addr),
+
+ TP_STRUCT__entry(
+ __array(char, dev_name, IB_DEVICE_NAME_MAX )
+ __field(u8, port_num )
+ __field(u32, qp_num )
+ __field(void *, agent_priv )
+ __field(u64, atid )
+ __field(int, retries_left )
+ __field(int, max_retries )
+ __field(int, retry )
+ __field(unsigned long, timeout )
+ __field(u32, length )
+ __field(u8, base_version )
+ __field(u8, mgmt_class )
+ __field(u8, class_version )
+ __field(u8, method )
+ __field(u16, status )
+ __field(u16, class_specific )
+ __field(u64, tid )
+ __field(u16, attr_id )
+ __field(u32, attr_mod )
+ __field(u16, dlid )
+ __field(u8, sl )
+ __field(u16, pkey )
+ __field(u32, rqpn )
+ __field(u32, rqkey )
+ ),
+
+ TP_fast_assign(
+ memcpy(__entry->dev_name, wr->mad_agent_priv->agent.device->name, IB_DEVICE_NAME_MAX);
+ __entry->port_num = wr->mad_agent_priv->agent.port_num;
+ __entry->qp_num = wr->mad_agent_priv->qp_info->qp->qp_num;
+ __entry->agent_priv = wr->mad_agent_priv;
+ __entry->atid = be64_to_cpu(wr->tid);
+ __entry->max_retries = wr->max_retries;
+ __entry->retries_left = wr->retries_left;
+ __entry->retry = wr->retry;
+ __entry->timeout = wr->timeout;
+ __entry->length = wr->send_buf.hdr_len +
+ wr->send_buf.data_len;
+ __entry->base_version = ((struct ib_mad_hdr *)wr->send_buf.mad)->base_version;
+ __entry->mgmt_class = ((struct ib_mad_hdr *)wr->send_buf.mad)->mgmt_class;
+ __entry->class_version = ((struct ib_mad_hdr *)wr->send_buf.mad)->class_version;
+ __entry->method = ((struct ib_mad_hdr *)wr->send_buf.mad)->method;
+ __entry->status = ((struct ib_mad_hdr *)wr->send_buf.mad)->status;
+ __entry->class_specific = ((struct ib_mad_hdr *)wr->send_buf.mad)->class_specific;
+ __entry->tid = ((struct ib_mad_hdr *)wr->send_buf.mad)->tid;
+ __entry->attr_id = ((struct ib_mad_hdr *)wr->send_buf.mad)->attr_id;
+ __entry->attr_mod = ((struct ib_mad_hdr *)wr->send_buf.mad)->attr_mod;
+ __entry->dlid = addr->dlid;
+ __entry->sl = addr->sl;
+ __entry->pkey = addr->pkey;
+ __entry->rqpn = addr->rqpn;
+ __entry->rqkey = addr->rqkey;
+ ),
+
+ TP_printk("%s:%d QP%d agent %p: " \
+ "atid 0x%llx; %d/%d retries(%d); timeout %lu length %d : " \
+ "base_ver 0x%x class 0x%x class_ver 0x%x method 0x%x " \
+ "status 0x%x class_specific 0x%x tid 0x%llx attr_id 0x%x attr_mod 0x%x " \
+ " => dlid 0x%x sl %d pkey 0x%x rpqn 0x%x rqpkey 0x%x",
+ __entry->dev_name, __entry->port_num, __entry->qp_num,
+ __entry->agent_priv, __entry->atid,
+ __entry->retries_left, __entry->max_retries,
+ __entry->retry, __entry->timeout, __entry->length,
+ __entry->base_version, __entry->mgmt_class, __entry->class_version,
+ __entry->method, be16_to_cpu(__entry->status),
+ be16_to_cpu(__entry->class_specific),
+ be64_to_cpu(__entry->tid), be16_to_cpu(__entry->attr_id),
+ be32_to_cpu(__entry->attr_mod),
+ be16_to_cpu(__entry->dlid), __entry->sl, __entry->pkey, __entry->rqpn,
+ __entry->rqkey
+ )
+);
+
+DEFINE_EVENT(ib_mad_send_template, ib_mad_mad_error_handler,
+ TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_mad_addr *addr),
+ TP_ARGS(wr, addr));
+DEFINE_EVENT(ib_mad_send_template, ib_mad_ib_send_mad,
+ TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_mad_addr *addr),
+ TP_ARGS(wr, addr));
+DEFINE_EVENT(ib_mad_send_template, ib_mad_send_done_resend,
+ TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_mad_addr *addr),
+ TP_ARGS(wr, addr));
+
+TRACE_EVENT(ib_mad_send_done_handler,
+ TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_wc *wc),
+ TP_ARGS(wr, wc),
+
+ TP_STRUCT__entry(
+ __array(char, dev_name, IB_DEVICE_NAME_MAX )
+ __field(u8, port_num )
+ __field(u32, qp_num )
+ __field(void *, agent_priv )
+ __field(u64, atid )
+ __field(int, retries_left )
+ __field(int, max_retries )
+ __field(int, retry )
+ __field(unsigned long, timeout )
+ __field(u8, base_version )
+ __field(u8, mgmt_class )
+ __field(u8, class_version )
+ __field(u8, method )
+ __field(u16, status )
+ __field(u16, wc_status )
+ __field(u32, length )
+ ),
+
+ TP_fast_assign(
+ memcpy(__entry->dev_name, wr->mad_agent_priv->agent.device->name, IB_DEVICE_NAME_MAX);
+ __entry->port_num = wr->mad_agent_priv->agent.port_num;
+ __entry->qp_num = wr->mad_agent_priv->qp_info->qp->qp_num;
+ __entry->agent_priv = wr->mad_agent_priv;
+ __entry->atid = wr->tid;
+ __entry->max_retries = wr->max_retries;
+ __entry->retries_left = wr->retries_left;
+ __entry->retry = wr->retry;
+ __entry->timeout = wr->timeout;
+ __entry->base_version = ((struct ib_mad_hdr *)wr->send_buf.mad)->base_version;
+ __entry->mgmt_class = ((struct ib_mad_hdr *)wr->send_buf.mad)->mgmt_class;
+ __entry->class_version = ((struct ib_mad_hdr *)wr->send_buf.mad)->class_version;
+ __entry->method = ((struct ib_mad_hdr *)wr->send_buf.mad)->method;
+ __entry->status = ((struct ib_mad_hdr *)wr->send_buf.mad)->status;
+ __entry->wc_status = wc->status;
+ __entry->length = wc->byte_len;
+ ),
+
+ TP_printk("%s:%d QP%d : SEND WC Status %d : agent %p: " \
+ "atid 0x%llx %d/%d retries(%d) timeout %lu length %d: " \
+ "base_ver 0x%x class 0x%x class_ver 0x%x method 0x%x " \
+ "status 0x%x",
+ __entry->dev_name, __entry->port_num, __entry->qp_num,
+ __entry->wc_status,
+ __entry->agent_priv, be64_to_cpu(__entry->atid),
+ __entry->retries_left, __entry->max_retries,
+ __entry->retry, __entry->timeout,
+ __entry->length,
+ __entry->base_version, __entry->mgmt_class, __entry->class_version,
+ __entry->method, be16_to_cpu(__entry->status)
+ )
+);
+
+
+#endif /* _TRACE_IB_MAD_H */
+
+#include <trace/define_trace.h>
--
1.8.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/5 RFC] IB/MAD: add recv path trace point
[not found] ` <1443675089-11786-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-01 4:51 ` [PATCH 1/5 RFC] IB/MAD: add send path trace points ira.weiny-ral2JQCrhuEAvxtiuMwx3w
@ 2015-10-01 4:51 ` ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-10-01 4:51 ` [PATCH 3/5 RFC] IB/MAD Add agent trace points ira.weiny-ral2JQCrhuEAvxtiuMwx3w
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w @ 2015-10-01 4:51 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
yun.wang-EIkl63zCoXaH+58JC4qpiA,
xerofoify-Re5JQEeQqe8AvxtiuMwx3w, Ira Weiny
From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/core/mad.c | 10 +++++++
include/trace/events/ib_mad.h | 63 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 73 insertions(+)
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 0631bff54755..0dc0ae78d313 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -2051,6 +2051,16 @@ static void ib_mad_recv_done_handler(struct ib_mad_port_private *port_priv,
if (!validate_mad((const struct ib_mad_hdr *)recv->mad, qp_info, opa))
goto out;
+ if (trace_ib_mad_recv_done_handler_enabled()) {
+ u16 pkey;
+
+ ib_query_pkey(qp_info->port_priv->device, qp_info->port_priv->port_num,
+ wc->pkey_index, &pkey);
+
+ trace_ib_mad_recv_done_handler(qp_info, wc, (struct ib_mad_hdr *)recv->mad,
+ pkey);
+ }
+
mad_size = recv->mad_size;
response = alloc_mad_private(mad_size, GFP_KERNEL);
if (!response) {
diff --git a/include/trace/events/ib_mad.h b/include/trace/events/ib_mad.h
index 7e42ac35324a..8704bbc476bd 100644
--- a/include/trace/events/ib_mad.h
+++ b/include/trace/events/ib_mad.h
@@ -185,6 +185,69 @@ TRACE_EVENT(ib_mad_send_done_handler,
)
);
+TRACE_EVENT(ib_mad_recv_done_handler,
+ TP_PROTO(struct ib_mad_qp_info *qp_info, struct ib_wc *wc, struct ib_mad_hdr *mad_hdr, u16 pkey),
+ TP_ARGS(qp_info, wc, mad_hdr, pkey),
+
+ TP_STRUCT__entry(
+ __array(char, dev_name, IB_DEVICE_NAME_MAX )
+ __field(u8, port_num )
+ __field(u32, qp_num )
+ __field(u32, length )
+ __field(u8, base_version )
+ __field(u8, mgmt_class )
+ __field(u8, class_version )
+ __field(u8, method )
+ __field(u16, status )
+ __field(u16, class_specific )
+ __field(u64, tid )
+ __field(u16, attr_id )
+ __field(u32, attr_mod )
+ __field(u16, slid )
+ __field(u16, src_qp )
+ __field(u8, sl )
+ __field(u16, pkey )
+ __field(u16, wc_status )
+ ),
+
+ TP_fast_assign(
+ memcpy(__entry->dev_name, qp_info->port_priv->device->name, IB_DEVICE_NAME_MAX);
+ __entry->port_num = qp_info->port_priv->port_num;
+ __entry->qp_num = qp_info->qp->qp_num;
+ __entry->length = wc->byte_len;
+ __entry->base_version = mad_hdr->base_version;
+ __entry->mgmt_class = mad_hdr->mgmt_class;
+ __entry->class_version = mad_hdr->class_version;
+ __entry->method = mad_hdr->method;
+ __entry->status = mad_hdr->status;
+ __entry->class_specific = mad_hdr->class_specific;
+ __entry->tid = mad_hdr->tid;
+ __entry->attr_id = mad_hdr->attr_id;
+ __entry->attr_mod = mad_hdr->attr_mod;
+ __entry->slid = wc->slid;
+ __entry->src_qp = wc->src_qp;
+ __entry->sl = wc->sl;
+ __entry->pkey = pkey;
+ __entry->wc_status = wc->status;
+ ),
+
+ TP_printk("%s:%d QP%d : RECV WC Status %d : length %d " \
+ "base_ver 0x%02x class 0x%02x class_ver 0x%02x method 0x%02x " \
+ "status 0x%04x class_specific 0x%04x tid 0x%016llx " \
+ "attr_id 0x%04x attr_mod 0x%08x slid 0x%04x src QP%d, sl %d " \
+ "pkey 0x%04x",
+ __entry->dev_name, __entry->port_num, __entry->qp_num,
+ __entry->wc_status,
+ __entry->length,
+ __entry->base_version, __entry->mgmt_class, __entry->class_version,
+ __entry->method, be16_to_cpu(__entry->status),
+ be16_to_cpu(__entry->class_specific),
+ be64_to_cpu(__entry->tid), be16_to_cpu(__entry->attr_id),
+ be32_to_cpu(__entry->attr_mod),
+ __entry->slid, __entry->src_qp, __entry->sl, __entry->pkey
+ )
+);
+
#endif /* _TRACE_IB_MAD_H */
--
1.8.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/5 RFC] IB/MAD Add agent trace points
[not found] ` <1443675089-11786-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-01 4:51 ` [PATCH 1/5 RFC] IB/MAD: add send path trace points ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-10-01 4:51 ` [PATCH 2/5 RFC] IB/MAD: add recv path trace point ira.weiny-ral2JQCrhuEAvxtiuMwx3w
@ 2015-10-01 4:51 ` ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-10-01 4:51 ` [PATCH 4/5 RFC] IB/mad: Add umad " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w @ 2015-10-01 4:51 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
yun.wang-EIkl63zCoXaH+58JC4qpiA,
xerofoify-Re5JQEeQqe8AvxtiuMwx3w, Ira Weiny
From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/core/mad.c | 3 +++
include/trace/events/ib_mad.h | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+)
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 0dc0ae78d313..189404194470 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -441,6 +441,7 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
list_add_tail(&mad_agent_priv->agent_list, &port_priv->agent_list);
spin_unlock_irqrestore(&port_priv->reg_lock, flags);
+ trace_ib_mad_create_agent(mad_agent_priv);
return &mad_agent_priv->agent;
error4:
@@ -465,6 +466,7 @@ static void unregister_mad_agent(struct ib_mad_agent_private *mad_agent_priv)
unsigned long flags;
/* Note that we could still be handling received MADs */
+ trace_ib_mad_unregister_agent(mad_agent_priv);
/*
* Canceling all sends results in dropping received response
@@ -2112,6 +2114,7 @@ static void ib_mad_recv_done_handler(struct ib_mad_port_private *port_priv,
mad_agent = find_mad_agent(port_priv, (const struct ib_mad_hdr *)recv->mad);
if (mad_agent) {
+ trace_ib_mad_recv_done_agent(mad_agent);
ib_mad_complete_recv(mad_agent, &recv->header.recv_wc);
/*
* recv is freed up in error cases in ib_mad_complete_recv
diff --git a/include/trace/events/ib_mad.h b/include/trace/events/ib_mad.h
index 8704bbc476bd..3ac94636784b 100644
--- a/include/trace/events/ib_mad.h
+++ b/include/trace/events/ib_mad.h
@@ -248,6 +248,47 @@ TRACE_EVENT(ib_mad_recv_done_handler,
)
);
+DECLARE_EVENT_CLASS(ib_mad_agent_template,
+ TP_PROTO(struct ib_mad_agent_private *agent),
+ TP_ARGS(agent),
+
+ TP_STRUCT__entry(
+ __array(char, dev_name, IB_DEVICE_NAME_MAX )
+ __field(u8, port_num )
+ __field(u32, hi_tid )
+ __field(u8, mgmt_class )
+ __field(u8, mgmt_class_version )
+ ),
+
+ TP_fast_assign(
+ memcpy(__entry->dev_name, agent->agent.device->name, IB_DEVICE_NAME_MAX);
+ __entry->port_num = agent->agent.port_num;
+ __entry->hi_tid = agent->agent.hi_tid;
+
+ if (agent->reg_req) {
+ __entry->mgmt_class = agent->reg_req->mgmt_class;
+ __entry->mgmt_class_version = agent->reg_req->mgmt_class_version;
+ } else {
+ __entry->mgmt_class = 0;
+ __entry->mgmt_class_version = 0;
+ }
+ ),
+
+ TP_printk("%s:%d hi_tid 0x%08x class 0x%02x class_ver 0x%02x",
+ __entry->dev_name, __entry->port_num,
+ __entry->hi_tid, __entry->mgmt_class, __entry->mgmt_class_version
+ )
+);
+DEFINE_EVENT(ib_mad_agent_template, ib_mad_recv_done_agent,
+ TP_PROTO(struct ib_mad_agent_private *agent),
+ TP_ARGS(agent));
+DEFINE_EVENT(ib_mad_agent_template, ib_mad_create_agent,
+ TP_PROTO(struct ib_mad_agent_private *agent),
+ TP_ARGS(agent));
+DEFINE_EVENT(ib_mad_agent_template, ib_mad_unregister_agent,
+ TP_PROTO(struct ib_mad_agent_private *agent),
+ TP_ARGS(agent));
+
#endif /* _TRACE_IB_MAD_H */
--
1.8.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/5 RFC] IB/mad: Add umad trace points
[not found] ` <1443675089-11786-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
` (2 preceding siblings ...)
2015-10-01 4:51 ` [PATCH 3/5 RFC] IB/MAD Add agent trace points ira.weiny-ral2JQCrhuEAvxtiuMwx3w
@ 2015-10-01 4:51 ` ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1443675089-11786-5-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-01 4:51 ` [PATCH 5/5 RFC] IB/mad: Add SMP tracing ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-10-05 17:46 ` [PATCH 0/5 RFC] IB/mad: Add kernel trace to umad/mad Hal Rosenstock
5 siblings, 1 reply; 10+ messages in thread
From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w @ 2015-10-01 4:51 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
yun.wang-EIkl63zCoXaH+58JC4qpiA,
xerofoify-Re5JQEeQqe8AvxtiuMwx3w, Ira Weiny
From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
This could potentially benefit from a read trace point.
Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/core/user_mad.c | 5 +
include/trace/events/ib_umad.h | 312 +++++++++++++++++++++++++++++++++++++
2 files changed, 317 insertions(+)
create mode 100644 include/trace/events/ib_umad.h
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
index 57f281f8d686..4b53f4c70cdc 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -125,6 +125,9 @@ struct ib_umad_packet {
struct ib_user_mad mad;
};
+#define CREATE_TRACE_POINTS
+#include <trace/events/ib_umad.h>
+
static struct class *umad_class;
static const dev_t base_dev = MKDEV(IB_UMAD_MAJOR, IB_UMAD_MINOR_BASE);
@@ -481,6 +484,8 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
mutex_lock(&file->mutex);
+ trace_ib_umad_write(file, &packet->mad);
+
agent = __get_agent(file, packet->mad.hdr.id);
if (!agent) {
ret = -EINVAL;
diff --git a/include/trace/events/ib_umad.h b/include/trace/events/ib_umad.h
new file mode 100644
index 000000000000..2a1c052acb37
--- /dev/null
+++ b/include/trace/events/ib_umad.h
@@ -0,0 +1,312 @@
+/*
+ * Copyright (c) 2015 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM ib_umad
+
+#if !defined(_TRACE_IB_UMAD_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_IB_UMAD_H
+
+#include <linux/tracepoint.h>
+
+DECLARE_EVENT_CLASS(ib_umad_write_template,
+ TP_PROTO(struct ib_umad_file *file, struct ib_user_mad *mad),
+ TP_ARGS(file, mad),
+
+ TP_STRUCT__entry(
+ __array(char, dev_name, IB_DEVICE_NAME_MAX )
+ __field(u8, port_num )
+
+ __field(u32, id )
+ __field(u32, status )
+ __field(u32, timeout_ms )
+ __field(u32, retires )
+ __field(u32, length )
+ __field(u32, qpn )
+ __field(u32, qkey )
+ __field(u16, lid )
+ __field(u8, sl )
+ __field(u8, path_bits )
+ __field(u8, grh_present )
+ __field(u8, gid_index )
+ __field(u8, hop_limit )
+ __field(u8, traffic_class )
+ __array(u8, gid, 16 )
+ __field(u32, flow_label )
+ __field(u16, pkey_index )
+
+ __field(u8, base_version )
+ __field(u8, mgmt_class )
+ __field(u8, class_version )
+ __field(u8, method )
+ __field(u16, mad_status )
+ __field(u16, class_specific )
+ __field(u64, tid )
+ __field(u16, attr_id )
+ __field(u32, attr_mod )
+ ),
+
+ TP_fast_assign(
+ memcpy(__entry->dev_name, file->port->ib_dev->name, IB_DEVICE_NAME_MAX);
+ __entry->port_num = file->port->port_num;
+
+ __entry->id = mad->hdr.id;
+ __entry->status = mad->hdr.status;
+ __entry->timeout_ms = mad->hdr.timeout_ms;
+ __entry->retires = mad->hdr.retries;
+ __entry->length = mad->hdr.length;
+ __entry->qpn = mad->hdr.qpn;
+ __entry->qkey = mad->hdr.qkey;
+ __entry->lid = mad->hdr.lid;
+ __entry->sl = mad->hdr.sl;
+ __entry->path_bits = mad->hdr.path_bits;
+ __entry->grh_present = mad->hdr.grh_present;
+ __entry->gid_index = mad->hdr.gid_index;
+ __entry->hop_limit = mad->hdr.hop_limit;
+ __entry->traffic_class = mad->hdr.traffic_class;
+ /* FIXME Byte reversed??? better way to handle this??? */
+ memcpy(__entry->gid, mad->hdr.gid, sizeof(mad->hdr.gid));
+ __entry->flow_label = mad->hdr.flow_label;
+ __entry->pkey_index = mad->hdr.pkey_index;
+
+ __entry->base_version = ((struct ib_mad_hdr *)mad->data)->base_version;
+ __entry->mgmt_class = ((struct ib_mad_hdr *)mad->data)->mgmt_class;
+ __entry->class_version = ((struct ib_mad_hdr *)mad->data)->class_version;
+ __entry->method = ((struct ib_mad_hdr *)mad->data)->method;
+ __entry->mad_status = ((struct ib_mad_hdr *)mad->data)->status;
+ __entry->class_specific = ((struct ib_mad_hdr *)mad->data)->class_specific;
+ __entry->tid = ((struct ib_mad_hdr *)mad->data)->tid;
+ __entry->attr_id = ((struct ib_mad_hdr *)mad->data)->attr_id;
+ __entry->attr_mod = ((struct ib_mad_hdr *)mad->data)->attr_mod;
+ ),
+
+/* FIXME go back and convert the other mad tracepoints to do the byte swap in
+ * the print. */
+ TP_printk("%s:%d umad_hdr: id %u status 0x%04x ms %u ret %u len %u QP%u " \
+ "qkey 0x%08x lid 0x%04x sl %u path_bits 0x%x grh 0x%x gidi %u " \
+ "hop_lim %u traf_cl %u gid %pI6c flow 0x%08x pkeyi %u " \
+ "MAD: base_ver 0x%x class 0x%x class_ver 0x%x method 0x%x " \
+ "status 0x%04x class_specific 0x%04x tid 0x%016llx attr_id 0x%04x attr_mod 0x%08x ",
+ __entry->dev_name, __entry->port_num,
+ __entry->id, __entry->status, __entry->timeout_ms,
+ __entry->retires, __entry->length, be32_to_cpu(__entry->qpn),
+ be32_to_cpu(__entry->qkey), be16_to_cpu(__entry->lid), __entry->sl,
+ __entry->path_bits, __entry->grh_present, __entry->gid_index,
+ __entry->hop_limit, __entry->traffic_class, &__entry->gid,
+ be32_to_cpu(__entry->flow_label), __entry->pkey_index,
+ __entry->base_version, __entry->mgmt_class, __entry->class_version,
+ __entry->method, be16_to_cpu(__entry->mad_status), be16_to_cpu(__entry->class_specific),
+ be64_to_cpu(__entry->tid), be16_to_cpu(__entry->attr_id), be32_to_cpu(__entry->attr_mod)
+ )
+);
+
+DEFINE_EVENT(ib_umad_write_template, ib_umad_write,
+ TP_PROTO(struct ib_umad_file *file, struct ib_user_mad *mad),
+ TP_ARGS(file, mad));
+
+#if 0
+
+/* FIXME The below was copied from the ib_mad.h trace ... */
+
+DEFINE_EVENT(ib_mad_send_template, ib_mad_ib_send_mad,
+ TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_mad_addr *addr),
+ TP_ARGS(wr, addr));
+DEFINE_EVENT(ib_mad_send_template, ib_mad_send_done_resend,
+ TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_mad_addr *addr),
+ TP_ARGS(wr, addr));
+
+TRACE_EVENT(ib_mad_send_done_handler,
+ TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_wc *wc),
+ TP_ARGS(wr, wc),
+
+ TP_STRUCT__entry(
+ __array(char, dev_name, IB_DEVICE_NAME_MAX )
+ __field(u8, port_num )
+ __field(u32, qp_num )
+ __field(void *, agent_priv )
+ __field(u64, atid )
+ __field(int, retries_left )
+ __field(int, max_retries )
+ __field(int, retry )
+ __field(unsigned long, timeout )
+ __field(u8, base_version )
+ __field(u8, mgmt_class )
+ __field(u8, class_version )
+ __field(u8, method )
+ __field(u16, status )
+ __field(u16, wc_status )
+ __field(u32, length )
+ ),
+
+ TP_fast_assign(
+ memcpy(__entry->dev_name, wr->mad_agent_priv->agent.device->name, IB_DEVICE_NAME_MAX);
+ __entry->port_num = wr->mad_agent_priv->agent.port_num;
+ __entry->qp_num = wr->mad_agent_priv->qp_info->qp->qp_num;
+ __entry->agent_priv = wr->mad_agent_priv;
+ __entry->atid = be64_to_cpu(wr->tid);
+ __entry->max_retries = wr->max_retries;
+ __entry->retries_left = wr->retries_left;
+ __entry->retry = wr->retry;
+ __entry->timeout = wr->timeout;
+ __entry->base_version = ((struct ib_mad_hdr *)wr->send_buf.mad)->base_version;
+ __entry->mgmt_class = ((struct ib_mad_hdr *)wr->send_buf.mad)->mgmt_class;
+ __entry->class_version = ((struct ib_mad_hdr *)wr->send_buf.mad)->class_version;
+ __entry->method = ((struct ib_mad_hdr *)wr->send_buf.mad)->method;
+ __entry->status = be16_to_cpu(((struct ib_mad_hdr *)wr->send_buf.mad)->status);
+ __entry->wc_status = wc->status;
+ __entry->length = wc->byte_len;
+ ),
+
+ TP_printk("%s:%d QP%d : SEND WC Status %d : agent %p: " \
+ "atid 0x%llx %d/%d retries(%d) timeout %lu length %d: " \
+ "base_ver 0x%x class 0x%x class_ver 0x%x method 0x%x " \
+ "status 0x%x",
+ __entry->dev_name, __entry->port_num, __entry->qp_num,
+ __entry->wc_status,
+ __entry->agent_priv, __entry->atid,
+ __entry->retries_left, __entry->max_retries,
+ __entry->retry, __entry->timeout,
+ __entry->length,
+ __entry->base_version, __entry->mgmt_class, __entry->class_version,
+ __entry->method, __entry->status
+ )
+);
+
+TRACE_EVENT(ib_mad_recv_done_handler,
+ TP_PROTO(struct ib_mad_qp_info *qp_info, struct ib_wc *wc, struct ib_mad_hdr *mad_hdr, u16 pkey),
+ TP_ARGS(qp_info, wc, mad_hdr, pkey),
+
+ TP_STRUCT__entry(
+ __array(char, dev_name, IB_DEVICE_NAME_MAX )
+ __field(u8, port_num )
+ __field(u32, qp_num )
+ __field(u32, length )
+ __field(u8, base_version )
+ __field(u8, mgmt_class )
+ __field(u8, class_version )
+ __field(u8, method )
+ __field(u16, status )
+ __field(u16, class_specific )
+ __field(u64, tid )
+ __field(u16, attr_id )
+ __field(u32, attr_mod )
+ __field(u16, slid )
+ __field(u16, src_qp )
+ __field(u8, sl )
+ __field(u16, pkey )
+ __field(u16, wc_status )
+ ),
+
+ TP_fast_assign(
+ memcpy(__entry->dev_name, qp_info->port_priv->device->name, IB_DEVICE_NAME_MAX);
+ __entry->port_num = qp_info->port_priv->port_num;
+ __entry->qp_num = qp_info->qp->qp_num;
+ __entry->length = wc->byte_len;
+ __entry->base_version = mad_hdr->base_version;
+ __entry->mgmt_class = mad_hdr->mgmt_class;
+ __entry->class_version = mad_hdr->class_version;
+ __entry->method = mad_hdr->method;
+ __entry->status = be16_to_cpu(mad_hdr->status);
+ __entry->class_specific = be16_to_cpu(mad_hdr->class_specific);
+ __entry->tid = be64_to_cpu(mad_hdr->tid);
+ __entry->attr_id = be16_to_cpu(mad_hdr->attr_id);
+ __entry->attr_mod = be32_to_cpu(mad_hdr->attr_mod);
+ __entry->slid = wc->slid;
+ __entry->src_qp = wc->src_qp;
+ __entry->sl = wc->sl;
+ __entry->pkey = pkey;
+ __entry->wc_status = wc->status;
+ ),
+
+ TP_printk("%s:%d QP%d : RECV WC Status %d : length %d " \
+ "base_ver 0x%02x class 0x%02x class_ver 0x%02x method 0x%02x " \
+ "status 0x%04x class_specific 0x%04x tid 0x%016llx " \
+ "attr_id 0x%04x attr_mod 0x%08x slid 0x%04x src QP%d, sl %d " \
+ "pkey 0x%04x",
+ __entry->dev_name, __entry->port_num, __entry->qp_num,
+ __entry->wc_status,
+ __entry->length,
+ __entry->base_version, __entry->mgmt_class, __entry->class_version,
+ __entry->method, __entry->status, __entry->class_specific,
+ __entry->tid, __entry->attr_id, __entry->attr_mod,
+ __entry->slid, __entry->src_qp, __entry->sl, __entry->pkey
+ )
+);
+
+DECLARE_EVENT_CLASS(ib_mad_agent_template,
+ TP_PROTO(struct ib_mad_agent_private *agent),
+ TP_ARGS(agent),
+
+ TP_STRUCT__entry(
+ __field(void *, agent_priv )
+ __array(char, dev_name, IB_DEVICE_NAME_MAX )
+ __field(u32, qp_num )
+ __field(u8, port_num )
+ __field(u32, hi_tid )
+ __field(u8, mgmt_class )
+ __field(u8, mgmt_class_version )
+ ),
+
+ TP_fast_assign(
+ __entry->agent_priv = agent;
+ memcpy(__entry->dev_name, agent->agent.device->name, IB_DEVICE_NAME_MAX);
+ __entry->qp_num = agent->qp_info->qp->qp_num;
+ __entry->port_num = agent->agent.port_num;
+ __entry->hi_tid = agent->agent.hi_tid;
+
+ __entry->mgmt_class = agent->reg_req->mgmt_class;
+ __entry->mgmt_class_version = agent->reg_req->mgmt_class_version;
+ ),
+
+ TP_printk("%s:%d QP%d agent %p: " \
+ "hi_tid 0x%08x class 0x%02x class_ver 0x%02x",
+ __entry->dev_name, __entry->port_num, __entry->qp_num, __entry->agent_priv,
+ __entry->hi_tid,
+ __entry->mgmt_class, __entry->mgmt_class_version
+ )
+);
+DEFINE_EVENT(ib_mad_agent_template, ib_mad_recv_done_agent,
+ TP_PROTO(struct ib_mad_agent_private *agent),
+ TP_ARGS(agent));
+DEFINE_EVENT(ib_mad_agent_template, ib_mad_create_agent,
+ TP_PROTO(struct ib_mad_agent_private *agent),
+ TP_ARGS(agent));
+DEFINE_EVENT(ib_mad_agent_template, ib_mad_unregister_agent,
+ TP_PROTO(struct ib_mad_agent_private *agent),
+ TP_ARGS(agent));
+
+#endif /* 0 */
+
+#endif /* _TRACE_IB_UMAD_H */
+
+#include <trace/define_trace.h>
--
1.8.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 5/5 RFC] IB/mad: Add SMP tracing
[not found] ` <1443675089-11786-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
` (3 preceding siblings ...)
2015-10-01 4:51 ` [PATCH 4/5 RFC] IB/mad: Add umad " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
@ 2015-10-01 4:51 ` ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-10-05 17:46 ` [PATCH 0/5 RFC] IB/mad: Add kernel trace to umad/mad Hal Rosenstock
5 siblings, 0 replies; 10+ messages in thread
From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w @ 2015-10-01 4:51 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
yun.wang-EIkl63zCoXaH+58JC4qpiA,
xerofoify-Re5JQEeQqe8AvxtiuMwx3w, Ira Weiny
From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/core/mad.c | 8 ++++
include/trace/events/ib_mad.h | 90 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+)
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 189404194470..6ff87fcc6aea 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -604,6 +604,8 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv,
if (opa && smp->class_version == OPA_SMP_CLASS_VERSION) {
u32 opa_drslid;
+ trace_ib_mad_handle_out_opa_smi(opa_smp);
+
if ((opa_get_smp_direction(opa_smp)
? opa_smp->route.dr.dr_dlid : opa_smp->route.dr.dr_slid) ==
OPA_LID_PERMISSIVE &&
@@ -629,6 +631,8 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv,
opa_smi_check_local_returning_smp(opa_smp, device) == IB_SMI_DISCARD)
goto out;
} else {
+ trace_ib_mad_handle_out_ib_smi(smp);
+
if ((ib_get_smp_direction(smp) ? smp->dr_dlid : smp->dr_slid) ==
IB_LID_PERMISSIVE &&
smi_handle_dr_smp_send(smp, rdma_cap_ib_switch(device), port_num) ==
@@ -1858,6 +1862,8 @@ static enum smi_action handle_ib_smi(const struct ib_mad_port_private *port_priv
enum smi_forward_action retsmi;
struct ib_smp *smp = (struct ib_smp *)recv->mad;
+ trace_ib_mad_handle_ib_smi(smp);
+
if (smi_handle_dr_smp_recv(smp,
rdma_cap_ib_switch(port_priv->device),
port_num,
@@ -1943,6 +1949,8 @@ handle_opa_smi(struct ib_mad_port_private *port_priv,
enum smi_forward_action retsmi;
struct opa_smp *smp = (struct opa_smp *)recv->mad;
+ trace_ib_mad_handle_opa_smi(smp);
+
if (opa_smi_handle_dr_smp_recv(smp,
rdma_cap_ib_switch(port_priv->device),
port_num,
diff --git a/include/trace/events/ib_mad.h b/include/trace/events/ib_mad.h
index 3ac94636784b..8312eb1e7daf 100644
--- a/include/trace/events/ib_mad.h
+++ b/include/trace/events/ib_mad.h
@@ -290,6 +290,96 @@ DEFINE_EVENT(ib_mad_agent_template, ib_mad_unregister_agent,
TP_ARGS(agent));
+
+DECLARE_EVENT_CLASS(ib_mad_opa_smi_template,
+ TP_PROTO(struct opa_smp *smp),
+ TP_ARGS(smp),
+
+ TP_STRUCT__entry(
+ __field(u8, hop_ptr )
+ __field(u8, hop_cnt )
+ __field(u64, mkey )
+ __field(u32, dr_slid )
+ __field(u32, dr_dlid )
+ __array(u8, initial_path, OPA_SMP_MAX_PATH_HOPS )
+ __array(u8, return_path, OPA_SMP_MAX_PATH_HOPS )
+ ),
+
+ TP_fast_assign(
+ __entry->hop_ptr = smp->hop_ptr;
+ __entry->hop_cnt = smp->hop_cnt;
+ __entry->mkey = smp->mkey;
+ __entry->dr_slid = smp->route.dr.dr_slid;
+ __entry->dr_dlid = smp->route.dr.dr_dlid;
+ memcpy(__entry->initial_path, smp->route.dr.initial_path,
+ OPA_SMP_MAX_PATH_HOPS);
+ memcpy(__entry->return_path, smp->route.dr.return_path,
+ OPA_SMP_MAX_PATH_HOPS);
+ ),
+
+ TP_printk("OPA SMP: hop_ptr %d hop_cnt %d " \
+ "mkey 0x%016llx dr_slid 0x%08x dr_dlid 0x%08x " \
+ "initial_path %*ph return_path %*ph ",
+ __entry->hop_ptr, __entry->hop_cnt,
+ be64_to_cpu(__entry->mkey), be32_to_cpu(__entry->dr_slid),
+ be32_to_cpu(__entry->dr_dlid),
+ OPA_SMP_MAX_PATH_HOPS, __entry->initial_path,
+ OPA_SMP_MAX_PATH_HOPS, __entry->return_path
+ )
+);
+
+DEFINE_EVENT(ib_mad_opa_smi_template, ib_mad_handle_opa_smi,
+ TP_PROTO(struct opa_smp *smp),
+ TP_ARGS(smp));
+DEFINE_EVENT(ib_mad_opa_smi_template, ib_mad_handle_out_opa_smi,
+ TP_PROTO(struct opa_smp *smp),
+ TP_ARGS(smp));
+
+
+DECLARE_EVENT_CLASS(ib_mad_opa_ib_template,
+ TP_PROTO(struct ib_smp *smp),
+ TP_ARGS(smp),
+
+ TP_STRUCT__entry(
+ __field(u8, hop_ptr )
+ __field(u8, hop_cnt )
+ __field(u64, mkey )
+ __field(u32, dr_slid )
+ __field(u32, dr_dlid )
+ __array(u8, initial_path, IB_SMP_MAX_PATH_HOPS )
+ __array(u8, return_path, IB_SMP_MAX_PATH_HOPS )
+ ),
+
+ TP_fast_assign(
+ __entry->hop_ptr = smp->hop_ptr;
+ __entry->hop_cnt = smp->hop_cnt;
+ __entry->mkey = smp->mkey;
+ __entry->dr_slid = smp->dr_slid;
+ __entry->dr_dlid = smp->dr_dlid;
+ memcpy(__entry->initial_path, smp->initial_path,
+ IB_SMP_MAX_PATH_HOPS);
+ memcpy(__entry->return_path, smp->return_path,
+ IB_SMP_MAX_PATH_HOPS);
+ ),
+
+ TP_printk("OPA SMP: hop_ptr %d hop_cnt %d " \
+ "mkey 0x%016llx dr_slid 0x%04x dr_dlid 0x%04x " \
+ "initial_path %*ph return_path %*ph ",
+ __entry->hop_ptr, __entry->hop_cnt,
+ be64_to_cpu(__entry->mkey), be16_to_cpu(__entry->dr_slid),
+ be16_to_cpu(__entry->dr_dlid),
+ IB_SMP_MAX_PATH_HOPS, __entry->initial_path,
+ IB_SMP_MAX_PATH_HOPS, __entry->return_path
+ )
+);
+
+DEFINE_EVENT(ib_mad_opa_ib_template, ib_mad_handle_ib_smi,
+ TP_PROTO(struct ib_smp *smp),
+ TP_ARGS(smp));
+DEFINE_EVENT(ib_mad_opa_ib_template, ib_mad_handle_out_ib_smi,
+ TP_PROTO(struct ib_smp *smp),
+ TP_ARGS(smp));
+
#endif /* _TRACE_IB_MAD_H */
#include <trace/define_trace.h>
--
1.8.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 4/5 RFC] IB/mad: Add umad trace points
[not found] ` <1443675089-11786-5-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-10-01 6:06 ` kbuild test robot
0 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2015-10-01 6:06 UTC (permalink / raw)
Cc: kbuild-all-JC7UmRfGjtg, dledford-H+wXaHxf7aLQT0dZR+AlfA,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
yun.wang-EIkl63zCoXaH+58JC4qpiA,
xerofoify-Re5JQEeQqe8AvxtiuMwx3w, Ira Weiny
Hi Ira,
[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be64
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be64
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be64
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be64
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be64
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be64
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be64
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be64
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be64
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be64
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be16
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: cast to restricted __be32
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned int [unsigned] [usertype] qpn
include/trace/events/ib_umad.h:42:1: got restricted __be32 [usertype] qpn
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned int [unsigned] [usertype] qkey
include/trace/events/ib_umad.h:42:1: got restricted __be32 [usertype] qkey
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned short [unsigned] [usertype] lid
include/trace/events/ib_umad.h:42:1: got restricted __be16 [usertype] lid
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned int [unsigned] [usertype] flow_label
include/trace/events/ib_umad.h:42:1: got restricted __be32 [usertype] flow_label
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned short [unsigned] [usertype] mad_status
include/trace/events/ib_umad.h:42:1: got restricted __be16 [usertype] status
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned short [unsigned] [usertype] class_specific
include/trace/events/ib_umad.h:42:1: got restricted __be16 [usertype] class_specific
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned long long [unsigned] [usertype] tid
include/trace/events/ib_umad.h:42:1: got restricted __be64 [usertype] tid
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned short [unsigned] [usertype] attr_id
include/trace/events/ib_umad.h:42:1: got restricted __be16 [usertype] attr_id
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned int [unsigned] [usertype] attr_mod
include/trace/events/ib_umad.h:42:1: got restricted __be32 [usertype] attr_mod
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned int [unsigned] [usertype] qpn
include/trace/events/ib_umad.h:42:1: got restricted __be32 [usertype] qpn
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned int [unsigned] [usertype] qkey
include/trace/events/ib_umad.h:42:1: got restricted __be32 [usertype] qkey
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned short [unsigned] [usertype] lid
include/trace/events/ib_umad.h:42:1: got restricted __be16 [usertype] lid
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned int [unsigned] [usertype] flow_label
include/trace/events/ib_umad.h:42:1: got restricted __be32 [usertype] flow_label
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned short [unsigned] [usertype] mad_status
include/trace/events/ib_umad.h:42:1: got restricted __be16 [usertype] status
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned short [unsigned] [usertype] class_specific
include/trace/events/ib_umad.h:42:1: got restricted __be16 [usertype] class_specific
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned long long [unsigned] [usertype] tid
include/trace/events/ib_umad.h:42:1: got restricted __be64 [usertype] tid
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned short [unsigned] [usertype] attr_id
include/trace/events/ib_umad.h:42:1: got restricted __be16 [usertype] attr_id
>> include/trace/events/ib_umad.h:42:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_umad.h:42:1: expected unsigned int [unsigned] [usertype] attr_mod
include/trace/events/ib_umad.h:42:1: got restricted __be32 [usertype] attr_mod
vim +42 include/trace/events/ib_umad.h
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 *
32 */
33
34 #undef TRACE_SYSTEM
35 #define TRACE_SYSTEM ib_umad
36
37 #if !defined(_TRACE_IB_UMAD_H) || defined(TRACE_HEADER_MULTI_READ)
38 #define _TRACE_IB_UMAD_H
39
40 #include <linux/tracepoint.h>
41
> 42 DECLARE_EVENT_CLASS(ib_umad_write_template,
43 TP_PROTO(struct ib_umad_file *file, struct ib_user_mad *mad),
44 TP_ARGS(file, mad),
45
46 TP_STRUCT__entry(
47 __array(char, dev_name, IB_DEVICE_NAME_MAX )
48 __field(u8, port_num )
49
50 __field(u32, id )
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/5 RFC] IB/MAD: add send path trace points
[not found] ` <1443675089-11786-2-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-10-01 6:34 ` kbuild test robot
[not found] ` <201510011455.a7LAn2jp%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: kbuild test robot @ 2015-10-01 6:34 UTC (permalink / raw)
Cc: kbuild-all-JC7UmRfGjtg, dledford-H+wXaHxf7aLQT0dZR+AlfA,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
yun.wang-EIkl63zCoXaH+58JC4qpiA,
xerofoify-Re5JQEeQqe8AvxtiuMwx3w, Ira Weiny
Hi Ira,
[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be16
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be16
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be16
include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be16
>> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned] [usertype] status
include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype] status
>> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned] [usertype] class_specific
include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype] class_specific
>> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:43:1: expected unsigned long long [unsigned] [usertype] tid
include/trace/events/ib_mad.h:43:1: got restricted __be64 [usertype] tid
>> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned] [usertype] attr_id
include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype] attr_id
>> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:43:1: expected unsigned int [unsigned] [usertype] attr_mod
include/trace/events/ib_mad.h:43:1: got restricted __be32 [usertype] attr_mod
>> include/trace/events/ib_mad.h:131:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:131:1: expected unsigned long long [unsigned] [usertype] atid
include/trace/events/ib_mad.h:131:1: got restricted __be64 [usertype] tid
include/trace/events/ib_mad.h:131:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:131:1: expected unsigned short [unsigned] [usertype] status
include/trace/events/ib_mad.h:131:1: got restricted __be16 [usertype] status
>> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned] [usertype] status
include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype] status
>> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned] [usertype] class_specific
include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype] class_specific
>> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:43:1: expected unsigned long long [unsigned] [usertype] tid
include/trace/events/ib_mad.h:43:1: got restricted __be64 [usertype] tid
>> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned] [usertype] attr_id
include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype] attr_id
>> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:43:1: expected unsigned int [unsigned] [usertype] attr_mod
include/trace/events/ib_mad.h:43:1: got restricted __be32 [usertype] attr_mod
>> include/trace/events/ib_mad.h:131:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:131:1: expected unsigned long long [unsigned] [usertype] atid
include/trace/events/ib_mad.h:131:1: got restricted __be64 [usertype] tid
include/trace/events/ib_mad.h:131:1: sparse: incorrect type in assignment (different base types)
include/trace/events/ib_mad.h:131:1: expected unsigned short [unsigned] [usertype] status
include/trace/events/ib_mad.h:131:1: got restricted __be16 [usertype] status
vim +43 include/trace/events/ib_mad.h
37 #if !defined(_TRACE_IB_MAD_H) || defined(TRACE_HEADER_MULTI_READ)
38 #define _TRACE_IB_MAD_H
39
40 #include <linux/tracepoint.h>
41 #include <rdma/ib_mad.h>
42
> 43 DECLARE_EVENT_CLASS(ib_mad_send_template,
44 TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_mad_addr *addr),
45 TP_ARGS(wr, addr),
46
47 TP_STRUCT__entry(
48 __array(char, dev_name, IB_DEVICE_NAME_MAX )
49 __field(u8, port_num )
50 __field(u32, qp_num )
51 __field(void *, agent_priv )
52 __field(u64, atid )
53 __field(int, retries_left )
54 __field(int, max_retries )
55 __field(int, retry )
56 __field(unsigned long, timeout )
57 __field(u32, length )
58 __field(u8, base_version )
59 __field(u8, mgmt_class )
60 __field(u8, class_version )
61 __field(u8, method )
62 __field(u16, status )
63 __field(u16, class_specific )
64 __field(u64, tid )
65 __field(u16, attr_id )
66 __field(u32, attr_mod )
67 __field(u16, dlid )
68 __field(u8, sl )
69 __field(u16, pkey )
70 __field(u32, rqpn )
71 __field(u32, rqkey )
72 ),
73
74 TP_fast_assign(
75 memcpy(__entry->dev_name, wr->mad_agent_priv->agent.device->name, IB_DEVICE_NAME_MAX);
76 __entry->port_num = wr->mad_agent_priv->agent.port_num;
77 __entry->qp_num = wr->mad_agent_priv->qp_info->qp->qp_num;
78 __entry->agent_priv = wr->mad_agent_priv;
79 __entry->atid = be64_to_cpu(wr->tid);
80 __entry->max_retries = wr->max_retries;
81 __entry->retries_left = wr->retries_left;
82 __entry->retry = wr->retry;
83 __entry->timeout = wr->timeout;
84 __entry->length = wr->send_buf.hdr_len +
85 wr->send_buf.data_len;
86 __entry->base_version = ((struct ib_mad_hdr *)wr->send_buf.mad)->base_version;
87 __entry->mgmt_class = ((struct ib_mad_hdr *)wr->send_buf.mad)->mgmt_class;
88 __entry->class_version = ((struct ib_mad_hdr *)wr->send_buf.mad)->class_version;
89 __entry->method = ((struct ib_mad_hdr *)wr->send_buf.mad)->method;
90 __entry->status = ((struct ib_mad_hdr *)wr->send_buf.mad)->status;
91 __entry->class_specific = ((struct ib_mad_hdr *)wr->send_buf.mad)->class_specific;
92 __entry->tid = ((struct ib_mad_hdr *)wr->send_buf.mad)->tid;
93 __entry->attr_id = ((struct ib_mad_hdr *)wr->send_buf.mad)->attr_id;
94 __entry->attr_mod = ((struct ib_mad_hdr *)wr->send_buf.mad)->attr_mod;
95 __entry->dlid = addr->dlid;
96 __entry->sl = addr->sl;
97 __entry->pkey = addr->pkey;
98 __entry->rqpn = addr->rqpn;
99 __entry->rqkey = addr->rqkey;
100 ),
101
102 TP_printk("%s:%d QP%d agent %p: " \
103 "atid 0x%llx; %d/%d retries(%d); timeout %lu length %d : " \
104 "base_ver 0x%x class 0x%x class_ver 0x%x method 0x%x " \
105 "status 0x%x class_specific 0x%x tid 0x%llx attr_id 0x%x attr_mod 0x%x " \
106 " => dlid 0x%x sl %d pkey 0x%x rpqn 0x%x rqpkey 0x%x",
107 __entry->dev_name, __entry->port_num, __entry->qp_num,
108 __entry->agent_priv, __entry->atid,
109 __entry->retries_left, __entry->max_retries,
110 __entry->retry, __entry->timeout, __entry->length,
111 __entry->base_version, __entry->mgmt_class, __entry->class_version,
112 __entry->method, be16_to_cpu(__entry->status),
113 be16_to_cpu(__entry->class_specific),
114 be64_to_cpu(__entry->tid), be16_to_cpu(__entry->attr_id),
115 be32_to_cpu(__entry->attr_mod),
116 be16_to_cpu(__entry->dlid), __entry->sl, __entry->pkey, __entry->rqpn,
117 __entry->rqkey
118 )
119 );
120
121 DEFINE_EVENT(ib_mad_send_template, ib_mad_mad_error_handler,
122 TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_mad_addr *addr),
123 TP_ARGS(wr, addr));
124 DEFINE_EVENT(ib_mad_send_template, ib_mad_ib_send_mad,
125 TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_mad_addr *addr),
126 TP_ARGS(wr, addr));
127 DEFINE_EVENT(ib_mad_send_template, ib_mad_send_done_resend,
128 TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_mad_addr *addr),
129 TP_ARGS(wr, addr));
130
> 131 TRACE_EVENT(ib_mad_send_done_handler,
132 TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_wc *wc),
133 TP_ARGS(wr, wc),
134
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/5 RFC] IB/MAD: add send path trace points
[not found] ` <201510011455.a7LAn2jp%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-10-01 16:36 ` Weiny, Ira
0 siblings, 0 replies; 10+ messages in thread
From: Weiny, Ira @ 2015-10-01 16:36 UTC (permalink / raw)
To: lkp
Cc: kbuild-all-JC7UmRfGjtg, dledford-H+wXaHxf7aLQT0dZR+AlfA,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Hefty, Sean,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
yun.wang-EIkl63zCoXaH+58JC4qpiA
Do we have some auto checks running when we submit to Linux-rdma...
I hope it was clear that these patches are _half_ _baked_ and I only submitted them to let Hal, and the rest of you, know what I was thinking...
Ira
> -----Original Message-----
> From: lkp
> Sent: Wednesday, September 30, 2015 11:34 PM
> To: Weiny, Ira
> Cc: kbuild-all-JC7UmRfGjtg@public.gmane.org; dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org;
> linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Hefty, Sean; jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org;
> yun.wang-EIkl63zCoXaH+58JC4qpiA@public.gmane.org; xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; Weiny, Ira
> Subject: Re: [PATCH 1/5 RFC] IB/MAD: add send path trace points
>
> Hi Ira,
>
> [auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]
>
> reproduce:
> # apt-get install sparse
> make ARCH=x86_64 allmodconfig
> make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be64
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be32
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: cast to restricted __be16
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be64
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be16
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be16
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be16
> include/trace/events/ib_mad.h:131:1: sparse: cast to restricted __be16
> >> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned]
> [usertype] status
> include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype] status
> >> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned]
> [usertype] class_specific
> include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype]
> class_specific
> >> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:43:1: expected unsigned long long
> [unsigned] [usertype] tid
> include/trace/events/ib_mad.h:43:1: got restricted __be64 [usertype] tid
> >> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned]
> [usertype] attr_id
> include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype]
> attr_id
> >> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:43:1: expected unsigned int [unsigned]
> [usertype] attr_mod
> include/trace/events/ib_mad.h:43:1: got restricted __be32 [usertype]
> attr_mod
> >> include/trace/events/ib_mad.h:131:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:131:1: expected unsigned long long
> [unsigned] [usertype] atid
> include/trace/events/ib_mad.h:131:1: got restricted __be64 [usertype] tid
> include/trace/events/ib_mad.h:131:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:131:1: expected unsigned short [unsigned]
> [usertype] status
> include/trace/events/ib_mad.h:131:1: got restricted __be16 [usertype]
> status
> >> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned]
> [usertype] status
> include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype] status
> >> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned]
> [usertype] class_specific
> include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype]
> class_specific
> >> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:43:1: expected unsigned long long
> [unsigned] [usertype] tid
> include/trace/events/ib_mad.h:43:1: got restricted __be64 [usertype] tid
> >> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:43:1: expected unsigned short [unsigned]
> [usertype] attr_id
> include/trace/events/ib_mad.h:43:1: got restricted __be16 [usertype]
> attr_id
> >> include/trace/events/ib_mad.h:43:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:43:1: expected unsigned int [unsigned]
> [usertype] attr_mod
> include/trace/events/ib_mad.h:43:1: got restricted __be32 [usertype]
> attr_mod
> >> include/trace/events/ib_mad.h:131:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:131:1: expected unsigned long long
> [unsigned] [usertype] atid
> include/trace/events/ib_mad.h:131:1: got restricted __be64 [usertype] tid
> include/trace/events/ib_mad.h:131:1: sparse: incorrect type in assignment
> (different base types)
> include/trace/events/ib_mad.h:131:1: expected unsigned short [unsigned]
> [usertype] status
> include/trace/events/ib_mad.h:131:1: got restricted __be16 [usertype]
> status
>
> vim +43 include/trace/events/ib_mad.h
>
> 37 #if !defined(_TRACE_IB_MAD_H) ||
> defined(TRACE_HEADER_MULTI_READ)
> 38 #define _TRACE_IB_MAD_H
> 39
> 40 #include <linux/tracepoint.h>
> 41 #include <rdma/ib_mad.h>
> 42
> > 43 DECLARE_EVENT_CLASS(ib_mad_send_template,
> 44 TP_PROTO(struct ib_mad_send_wr_private *wr, struct
> ib_mad_addr *addr),
> 45 TP_ARGS(wr, addr),
> 46
> 47 TP_STRUCT__entry(
> 48 __array(char, dev_name,
> IB_DEVICE_NAME_MAX )
> 49 __field(u8, port_num )
> 50 __field(u32, qp_num )
> 51 __field(void *, agent_priv )
> 52 __field(u64, atid )
> 53 __field(int, retries_left )
> 54 __field(int, max_retries )
> 55 __field(int, retry )
> 56 __field(unsigned long, timeout )
> 57 __field(u32, length )
> 58 __field(u8, base_version )
> 59 __field(u8, mgmt_class )
> 60 __field(u8, class_version )
> 61 __field(u8, method )
> 62 __field(u16, status )
> 63 __field(u16, class_specific )
> 64 __field(u64, tid )
> 65 __field(u16, attr_id )
> 66 __field(u32, attr_mod )
> 67 __field(u16, dlid )
> 68 __field(u8, sl )
> 69 __field(u16, pkey )
> 70 __field(u32, rqpn )
> 71 __field(u32, rqkey )
> 72 ),
> 73
> 74 TP_fast_assign(
> 75 memcpy(__entry->dev_name, wr->mad_agent_priv-
> >agent.device->name, IB_DEVICE_NAME_MAX);
> 76 __entry->port_num = wr->mad_agent_priv-
> >agent.port_num;
> 77 __entry->qp_num = wr->mad_agent_priv->qp_info-
> >qp->qp_num;
> 78 __entry->agent_priv = wr->mad_agent_priv;
> 79 __entry->atid = be64_to_cpu(wr->tid);
> 80 __entry->max_retries = wr->max_retries;
> 81 __entry->retries_left = wr->retries_left;
> 82 __entry->retry = wr->retry;
> 83 __entry->timeout = wr->timeout;
> 84 __entry->length = wr->send_buf.hdr_len +
> 85 wr->send_buf.data_len;
> 86 __entry->base_version = ((struct ib_mad_hdr *)wr-
> >send_buf.mad)->base_version;
> 87 __entry->mgmt_class = ((struct ib_mad_hdr *)wr-
> >send_buf.mad)->mgmt_class;
> 88 __entry->class_version = ((struct ib_mad_hdr *)wr-
> >send_buf.mad)->class_version;
> 89 __entry->method = ((struct ib_mad_hdr *)wr-
> >send_buf.mad)->method;
> 90 __entry->status = ((struct ib_mad_hdr *)wr-
> >send_buf.mad)->status;
> 91 __entry->class_specific = ((struct ib_mad_hdr *)wr-
> >send_buf.mad)->class_specific;
> 92 __entry->tid = ((struct ib_mad_hdr *)wr-
> >send_buf.mad)->tid;
> 93 __entry->attr_id = ((struct ib_mad_hdr *)wr-
> >send_buf.mad)->attr_id;
> 94 __entry->attr_mod = ((struct ib_mad_hdr *)wr-
> >send_buf.mad)->attr_mod;
> 95 __entry->dlid = addr->dlid;
> 96 __entry->sl = addr->sl;
> 97 __entry->pkey = addr->pkey;
> 98 __entry->rqpn = addr->rqpn;
> 99 __entry->rqkey = addr->rqkey;
> 100 ),
> 101
> 102 TP_printk("%s:%d QP%d agent %p: " \
> 103 "atid 0x%llx; %d/%d retries(%d); timeout %lu length
> %d : " \
> 104 "base_ver 0x%x class 0x%x class_ver 0x%x method
> 0x%x " \
> 105 "status 0x%x class_specific 0x%x tid 0x%llx attr_id
> 0x%x attr_mod 0x%x " \
> 106 " => dlid 0x%x sl %d pkey 0x%x rpqn 0x%x rqpkey
> 0x%x",
> 107 __entry->dev_name, __entry->port_num, __entry-
> >qp_num,
> 108 __entry->agent_priv, __entry->atid,
> 109 __entry->retries_left, __entry->max_retries,
> 110 __entry->retry, __entry->timeout, __entry->length,
> 111 __entry->base_version, __entry->mgmt_class, __entry-
> >class_version,
> 112 __entry->method, be16_to_cpu(__entry->status),
> 113 be16_to_cpu(__entry->class_specific),
> 114 be64_to_cpu(__entry->tid), be16_to_cpu(__entry-
> >attr_id),
> 115 be32_to_cpu(__entry->attr_mod),
> 116 be16_to_cpu(__entry->dlid), __entry->sl, __entry-
> >pkey, __entry->rqpn,
> 117 __entry->rqkey
> 118 )
> 119 );
> 120
> 121 DEFINE_EVENT(ib_mad_send_template, ib_mad_mad_error_handler,
> 122 TP_PROTO(struct ib_mad_send_wr_private *wr, struct
> ib_mad_addr *addr),
> 123 TP_ARGS(wr, addr));
> 124 DEFINE_EVENT(ib_mad_send_template, ib_mad_ib_send_mad,
> 125 TP_PROTO(struct ib_mad_send_wr_private *wr, struct
> ib_mad_addr *addr),
> 126 TP_ARGS(wr, addr));
> 127 DEFINE_EVENT(ib_mad_send_template, ib_mad_send_done_resend,
> 128 TP_PROTO(struct ib_mad_send_wr_private *wr, struct
> ib_mad_addr *addr),
> 129 TP_ARGS(wr, addr));
> 130
> > 131 TRACE_EVENT(ib_mad_send_done_handler,
> 132 TP_PROTO(struct ib_mad_send_wr_private *wr, struct ib_wc
> *wc),
> 133 TP_ARGS(wr, wc),
> 134
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5 RFC] IB/mad: Add kernel trace to umad/mad
[not found] ` <1443675089-11786-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
` (4 preceding siblings ...)
2015-10-01 4:51 ` [PATCH 5/5 RFC] IB/mad: Add SMP tracing ira.weiny-ral2JQCrhuEAvxtiuMwx3w
@ 2015-10-05 17:46 ` Hal Rosenstock
5 siblings, 0 replies; 10+ messages in thread
From: Hal Rosenstock @ 2015-10-05 17:46 UTC (permalink / raw)
To: ira.weiny-ral2JQCrhuEAvxtiuMwx3w,
dledford-H+wXaHxf7aLQT0dZR+AlfA,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
yun.wang-EIkl63zCoXaH+58JC4qpiA,
xerofoify-Re5JQEeQqe8AvxtiuMwx3w
On 10/1/2015 12:51 AM, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
> From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> This has mild testing and still has some FIXMEs etc. I'm submitting to help
> decide if we wish to remove the MAD snooping infrastructure.
I think this has a ways to go before it has equivalent functionality to
madeye.
I'm also not sure that this is a replacement for MAD snooping. There's
some overlap but they are somewhat complementary right now.
IMO, at a minimum, the snooping interface should not be removed until
this has equivalent functionality.
> I believe this to be a more efficient debugging mechanism as it is most always
> available (if debugfs is available)
Snooping could be exposed to user space via user_mad and madeye could be
ported to user space.
> and should have limited performance impact when off.
This is true for snooping too.
-- Hal
>
> Ira Weiny (5):
> IB/MAD: add send path trace points
> IB/MAD: add recv path trace point
> IB/MAD Add agent trace points
> IB/mad: Add umad trace points
> IB/mad: Add SMP tracing
>
> drivers/infiniband/core/mad.c | 72 +++++++
> drivers/infiniband/core/user_mad.c | 5 +
> include/trace/events/ib_mad.h | 385 +++++++++++++++++++++++++++++++++++++
> include/trace/events/ib_umad.h | 312 ++++++++++++++++++++++++++++++
> 4 files changed, 774 insertions(+)
> create mode 100644 include/trace/events/ib_mad.h
> create mode 100644 include/trace/events/ib_umad.h
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-10-05 17:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01 4:51 [PATCH 0/5 RFC] IB/mad: Add kernel trace to umad/mad ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1443675089-11786-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-01 4:51 ` [PATCH 1/5 RFC] IB/MAD: add send path trace points ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1443675089-11786-2-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-01 6:34 ` kbuild test robot
[not found] ` <201510011455.a7LAn2jp%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-01 16:36 ` Weiny, Ira
2015-10-01 4:51 ` [PATCH 2/5 RFC] IB/MAD: add recv path trace point ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-10-01 4:51 ` [PATCH 3/5 RFC] IB/MAD Add agent trace points ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-10-01 4:51 ` [PATCH 4/5 RFC] IB/mad: Add umad " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
[not found] ` <1443675089-11786-5-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-01 6:06 ` kbuild test robot
2015-10-01 4:51 ` [PATCH 5/5 RFC] IB/mad: Add SMP tracing ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-10-05 17:46 ` [PATCH 0/5 RFC] IB/mad: Add kernel trace to umad/mad Hal Rosenstock
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.