diff options
author | David Howells <dhowells@redhat.com> | 2017-04-06 10:12:00 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-04-06 11:09:39 +0100 |
commit | fb46f6ee10e78799ea38cf97e4bf52cb70f1228a (patch) | |
tree | 070c369bd2417cc34c6e61b93e8567450406a55c /include/trace/events/rxrpc.h | |
parent | ef68622da9cc0c4e5202f90093a3a5314e41e9e9 (diff) | |
download | linux-fb46f6ee10e78799ea38cf97e4bf52cb70f1228a.tar.gz linux-fb46f6ee10e78799ea38cf97e4bf52cb70f1228a.tar.bz2 linux-fb46f6ee10e78799ea38cf97e4bf52cb70f1228a.zip |
rxrpc: Trace protocol errors in received packets
Add a tracepoint (rxrpc_rx_proto) to record protocol errors in received
packets. The following changes are made:
(1) Add a function, __rxrpc_abort_eproto(), to note a protocol error on a
call and mark the call aborted. This is wrapped by
rxrpc_abort_eproto() that makes the why string usable in trace.
(2) Add trace_rxrpc_rx_proto() or rxrpc_abort_eproto() to protocol error
generation points, replacing rxrpc_abort_call() with the latter.
(3) Only send an abort packet in rxkad_verify_packet*() if we actually
managed to abort the call.
Note that a trace event is also emitted if a kernel user (e.g. afs) tries
to send data through a call when it's not in the transmission phase, though
it's not technically a receive event.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/trace/events/rxrpc.h')
-rw-r--r-- | include/trace/events/rxrpc.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h index 39123c06a566..626af97863e8 100644 --- a/include/trace/events/rxrpc.h +++ b/include/trace/events/rxrpc.h @@ -1087,6 +1087,30 @@ TRACE_EVENT(rxrpc_improper_term, __entry->abort_code) ); +TRACE_EVENT(rxrpc_rx_eproto, + TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, + const char *why), + + TP_ARGS(call, serial, why), + + TP_STRUCT__entry( + __field(struct rxrpc_call *, call ) + __field(rxrpc_serial_t, serial ) + __field(const char *, why ) + ), + + TP_fast_assign( + __entry->call = call; + __entry->serial = serial; + __entry->why = why; + ), + + TP_printk("c=%p EPROTO %08x %s", + __entry->call, + __entry->serial, + __entry->why) + ); + #endif /* _TRACE_RXRPC_H */ /* This part must be outside protection */ |