mirror of https://gitee.com/openkylin/linux.git
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: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
36a55edfc3
commit
3a9568fedc
|
@ -60,7 +60,7 @@ DECLARE_EVENT_CLASS(rpcrdma_completion_class,
|
|||
), \
|
||||
TP_ARGS(wc, cid))
|
||||
|
||||
DECLARE_EVENT_CLASS(xprtrdma_reply_event,
|
||||
DECLARE_EVENT_CLASS(xprtrdma_reply_class,
|
||||
TP_PROTO(
|
||||
const struct rpcrdma_rep *rep
|
||||
),
|
||||
|
@ -68,29 +68,30 @@ DECLARE_EVENT_CLASS(xprtrdma_reply_event,
|
|||
TP_ARGS(rep),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(const void *, rep)
|
||||
__field(const void *, r_xprt)
|
||||
__field(u32, xid)
|
||||
__field(u32, version)
|
||||
__field(u32, proc)
|
||||
__string(addr, rpcrdma_addrstr(rep->rr_rxprt))
|
||||
__string(port, rpcrdma_portstr(rep->rr_rxprt))
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->rep = rep;
|
||||
__entry->r_xprt = rep->rr_rxprt;
|
||||
__entry->xid = be32_to_cpu(rep->rr_xid);
|
||||
__entry->version = be32_to_cpu(rep->rr_vers);
|
||||
__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",
|
||||
__entry->r_xprt, __entry->xid, __entry->rep,
|
||||
__entry->version, __entry->proc
|
||||
TP_printk("peer=[%s]:%s xid=0x%08x version=%u proc=%u",
|
||||
__get_str(addr), __get_str(port),
|
||||
__entry->xid, __entry->version, __entry->proc
|
||||
)
|
||||
);
|
||||
|
||||
#define DEFINE_REPLY_EVENT(name) \
|
||||
DEFINE_EVENT(xprtrdma_reply_event, name, \
|
||||
DEFINE_EVENT(xprtrdma_reply_class, \
|
||||
xprtrdma_reply_##name##_err, \
|
||||
TP_PROTO( \
|
||||
const struct rpcrdma_rep *rep \
|
||||
), \
|
||||
|
@ -1030,10 +1031,10 @@ TRACE_EVENT(xprtrdma_defer_cmp,
|
|||
)
|
||||
);
|
||||
|
||||
DEFINE_REPLY_EVENT(xprtrdma_reply_vers);
|
||||
DEFINE_REPLY_EVENT(xprtrdma_reply_rqst);
|
||||
DEFINE_REPLY_EVENT(xprtrdma_reply_short);
|
||||
DEFINE_REPLY_EVENT(xprtrdma_reply_hdr);
|
||||
DEFINE_REPLY_EVENT(vers);
|
||||
DEFINE_REPLY_EVENT(rqst);
|
||||
DEFINE_REPLY_EVENT(short);
|
||||
DEFINE_REPLY_EVENT(hdr);
|
||||
|
||||
TRACE_EVENT(xprtrdma_err_vers,
|
||||
TP_PROTO(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// 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.
|
||||
*
|
||||
* 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)
|
|||
return;
|
||||
|
||||
out_badheader:
|
||||
trace_xprtrdma_reply_hdr(rep);
|
||||
trace_xprtrdma_reply_hdr_err(rep);
|
||||
r_xprt->rx_stats.bad_reply_count++;
|
||||
rqst->rq_task->tk_status = status;
|
||||
status = 0;
|
||||
|
@ -1462,16 +1462,16 @@ void rpcrdma_reply_handler(struct rpcrdma_rep *rep)
|
|||
return;
|
||||
|
||||
out_badversion:
|
||||
trace_xprtrdma_reply_vers(rep);
|
||||
trace_xprtrdma_reply_vers_err(rep);
|
||||
goto out;
|
||||
|
||||
out_norqst:
|
||||
spin_unlock(&xprt->queue_lock);
|
||||
trace_xprtrdma_reply_rqst(rep);
|
||||
trace_xprtrdma_reply_rqst_err(rep);
|
||||
goto out;
|
||||
|
||||
out_shortreply:
|
||||
trace_xprtrdma_reply_short(rep);
|
||||
trace_xprtrdma_reply_short_err(rep);
|
||||
|
||||
out:
|
||||
rpcrdma_recv_buffer_put(rep);
|
||||
|
|
Loading…
Reference in New Issue