From: Chuck Lever <chuck.lever@oracle.com>
To: anna.schumaker@netapp.com
Cc: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: [PATCH v1 11/12] xprtrdma: Add trace points to instrument QP and CQ access upcalls
Date: Wed, 20 Dec 2017 16:31:45 -0500 [thread overview]
Message-ID: <20171220213145.29321.82361.stgit@manet.1015granger.net> (raw)
In-Reply-To: <20171220210236.29321.59307.stgit@manet.1015granger.net>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
include/trace/events/rpcrdma.h | 31 +++++++++++++++++++++++++++++++
net/sunrpc/xprtrdma/verbs.c | 3 +++
2 files changed, 34 insertions(+)
diff --git a/include/trace/events/rpcrdma.h b/include/trace/events/rpcrdma.h
index 16ac4d4..5aa3ec7 100644
--- a/include/trace/events/rpcrdma.h
+++ b/include/trace/events/rpcrdma.h
@@ -374,6 +374,37 @@
DEFINE_RXPRT_EVENT(xprtrdma_reconnect);
DEFINE_RXPRT_EVENT(xprtrdma_inject_dsc);
+TRACE_EVENT(xprtrdma_qp_error,
+ TP_PROTO(
+ const struct rpcrdma_xprt *r_xprt,
+ const struct ib_event *event
+ ),
+
+ TP_ARGS(r_xprt, event),
+
+ TP_STRUCT__entry(
+ __field(const void *, r_xprt)
+ __field(unsigned int, event)
+ __string(name, event->device->name)
+ __string(addr, rpcrdma_addrstr(r_xprt))
+ __string(port, rpcrdma_portstr(r_xprt))
+ ),
+
+ TP_fast_assign(
+ __entry->r_xprt = r_xprt;
+ __entry->event = event->event;
+ __assign_str(name, event->device->name);
+ __assign_str(addr, rpcrdma_addrstr(r_xprt));
+ __assign_str(port, rpcrdma_portstr(r_xprt));
+ ),
+
+ TP_printk("peer=[%s]:%s r_xprt=%p: dev %s: %s (%u)",
+ __get_str(addr), __get_str(port), __entry->r_xprt,
+ __get_str(name), rdma_show_ib_event(__entry->event),
+ __entry->event
+ )
+);
+
/**
** Call events
**/
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 7f9e902..fb81d3a 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -108,7 +108,10 @@
rpcrdma_qp_async_error_upcall(struct ib_event *event, void *context)
{
struct rpcrdma_ep *ep = context;
+ struct rpcrdma_xprt *r_xprt = container_of(ep, struct rpcrdma_xprt,
+ rx_ep);
+ trace_xprtrdma_qp_error(r_xprt, event);
pr_err("rpcrdma: %s on device %s ep %p\n",
ib_event_msg(event->event), event->device->name, context);
next prev parent reply other threads:[~2017-12-20 21:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 21:30 [PATCH v1 00/12] Add static trace points to xprtrdma Chuck Lever
2017-12-20 21:30 ` [PATCH v1 01/12] rdma/ib: Add trace point macros to display human-readable values Chuck Lever
2018-01-18 21:49 ` Anna Schumaker
2018-01-18 21:53 ` Fwd: " Chuck Lever
2018-01-18 22:34 ` Jason Gunthorpe
2018-01-19 11:18 ` Leon Romanovsky
2018-01-19 16:19 ` Chuck Lever
2018-01-19 19:58 ` Jason Gunthorpe
2017-12-20 21:30 ` [PATCH v1 02/12] rpcrdma: infrastructure for static trace points in rpcrdma.ko Chuck Lever
2017-12-20 21:30 ` [PATCH v1 03/12] xprtrdma: Add trace points in RPC Call transmit paths Chuck Lever
2017-12-20 21:30 ` [PATCH v1 04/12] xprtrdma: Add trace points in the RPC Reply handler paths Chuck Lever
2017-12-20 21:30 ` [PATCH v1 05/12] xprtrdma: Add trace points to instrument memory registration Chuck Lever
2017-12-20 21:31 ` [PATCH v1 06/12] xprtrdma: Add trace points in reply decoder path Chuck Lever
2017-12-20 21:31 ` [PATCH v1 07/12] xprtrdma: Add trace points to instrument memory invalidation Chuck Lever
2017-12-20 21:31 ` [PATCH v1 08/12] xprtrdma: Add trace points to instrument MR allocation and recovery Chuck Lever
2017-12-20 21:31 ` [PATCH v1 09/12] xprtrdma: Add trace points for connect events Chuck Lever
2017-12-20 21:31 ` [PATCH v1 10/12] xprtrdma: Add trace points in the client-side backchannel code paths Chuck Lever
2017-12-20 21:31 ` Chuck Lever [this message]
2017-12-20 21:31 ` [PATCH v1 12/12] xprtrdma: Instrument allocation/release of rpcrdma_req/rep objects Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171220213145.29321.82361.stgit@manet.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=anna.schumaker@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).