Commit 3a9568fe authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

xprtrdma: Clean up reply parsing error tracepoints

- Rename the tracepoints with the "_err" suffix to indicate these
  are rare error events
- Replace display of kernel memory addresses
- Tie the XID and error to a connection IP address instead
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 36a55edf
...@@ -60,7 +60,7 @@ DECLARE_EVENT_CLASS(rpcrdma_completion_class, ...@@ -60,7 +60,7 @@ DECLARE_EVENT_CLASS(rpcrdma_completion_class,
), \ ), \
TP_ARGS(wc, cid)) TP_ARGS(wc, cid))
DECLARE_EVENT_CLASS(xprtrdma_reply_event, DECLARE_EVENT_CLASS(xprtrdma_reply_class,
TP_PROTO( TP_PROTO(
const struct rpcrdma_rep *rep const struct rpcrdma_rep *rep
), ),
...@@ -68,29 +68,30 @@ DECLARE_EVENT_CLASS(xprtrdma_reply_event, ...@@ -68,29 +68,30 @@ DECLARE_EVENT_CLASS(xprtrdma_reply_event,
TP_ARGS(rep), TP_ARGS(rep),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(const void *, rep)
__field(const void *, r_xprt)
__field(u32, xid) __field(u32, xid)
__field(u32, version) __field(u32, version)
__field(u32, proc) __field(u32, proc)
__string(addr, rpcrdma_addrstr(rep->rr_rxprt))
__string(port, rpcrdma_portstr(rep->rr_rxprt))
), ),
TP_fast_assign( TP_fast_assign(
__entry->rep = rep;
__entry->r_xprt = rep->rr_rxprt;
__entry->xid = be32_to_cpu(rep->rr_xid); __entry->xid = be32_to_cpu(rep->rr_xid);
__entry->version = be32_to_cpu(rep->rr_vers); __entry->version = be32_to_cpu(rep->rr_vers);
__entry->proc = be32_to_cpu(rep->rr_proc); __entry->proc = be32_to_cpu(rep->rr_proc);
__assign_str(addr, rpcrdma_addrstr(rep->rr_rxprt));
__assign_str(port, rpcrdma_portstr(rep->rr_rxprt));
), ),
TP_printk("rxprt %p xid=0x%08x rep=%p: version %u proc %u", TP_printk("peer=[%s]:%s xid=0x%08x version=%u proc=%u",
__entry->r_xprt, __entry->xid, __entry->rep, __get_str(addr), __get_str(port),
__entry->version, __entry->proc __entry->xid, __entry->version, __entry->proc
) )
); );
#define DEFINE_REPLY_EVENT(name) \ #define DEFINE_REPLY_EVENT(name) \
DEFINE_EVENT(xprtrdma_reply_event, name, \ DEFINE_EVENT(xprtrdma_reply_class, \
xprtrdma_reply_##name##_err, \
TP_PROTO( \ TP_PROTO( \
const struct rpcrdma_rep *rep \ const struct rpcrdma_rep *rep \
), \ ), \
...@@ -1030,10 +1031,10 @@ TRACE_EVENT(xprtrdma_defer_cmp, ...@@ -1030,10 +1031,10 @@ TRACE_EVENT(xprtrdma_defer_cmp,
) )
); );
DEFINE_REPLY_EVENT(xprtrdma_reply_vers); DEFINE_REPLY_EVENT(vers);
DEFINE_REPLY_EVENT(xprtrdma_reply_rqst); DEFINE_REPLY_EVENT(rqst);
DEFINE_REPLY_EVENT(xprtrdma_reply_short); DEFINE_REPLY_EVENT(short);
DEFINE_REPLY_EVENT(xprtrdma_reply_hdr); DEFINE_REPLY_EVENT(hdr);
TRACE_EVENT(xprtrdma_err_vers, TRACE_EVENT(xprtrdma_err_vers,
TP_PROTO( TP_PROTO(
......
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/* /*
* Copyright (c) 2014-2017 Oracle. All rights reserved. * Copyright (c) 2014-2020, Oracle and/or its affiliates.
* Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved. * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
...@@ -1369,7 +1369,7 @@ void rpcrdma_complete_rqst(struct rpcrdma_rep *rep) ...@@ -1369,7 +1369,7 @@ void rpcrdma_complete_rqst(struct rpcrdma_rep *rep)
return; return;
out_badheader: out_badheader:
trace_xprtrdma_reply_hdr(rep); trace_xprtrdma_reply_hdr_err(rep);
r_xprt->rx_stats.bad_reply_count++; r_xprt->rx_stats.bad_reply_count++;
rqst->rq_task->tk_status = status; rqst->rq_task->tk_status = status;
status = 0; status = 0;
...@@ -1462,16 +1462,16 @@ void rpcrdma_reply_handler(struct rpcrdma_rep *rep) ...@@ -1462,16 +1462,16 @@ void rpcrdma_reply_handler(struct rpcrdma_rep *rep)
return; return;
out_badversion: out_badversion:
trace_xprtrdma_reply_vers(rep); trace_xprtrdma_reply_vers_err(rep);
goto out; goto out;
out_norqst: out_norqst:
spin_unlock(&xprt->queue_lock); spin_unlock(&xprt->queue_lock);
trace_xprtrdma_reply_rqst(rep); trace_xprtrdma_reply_rqst_err(rep);
goto out; goto out;
out_shortreply: out_shortreply:
trace_xprtrdma_reply_short(rep); trace_xprtrdma_reply_short_err(rep);
out: out:
rpcrdma_recv_buffer_put(rep); rpcrdma_recv_buffer_put(rep);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment