diff options
author | David Howells <dhowells@redhat.com> | 2016-09-17 05:49:13 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-09-17 06:24:03 -0400 |
commit | a3868bfc8d5b0f36c784deab644ee1d2b0e6974b (patch) | |
tree | 097f6a0fc63e8e939087f05f6ac2365c244a214b | |
parent | 182f50562490e5861afaa7a2e42dcc0dd9dcfcca (diff) |
rxrpc: Print the packet type name in the Rx packet trace
Print a symbolic packet type name for each valid received packet in the
trace output, not just a number.
Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | include/trace/events/rxrpc.h | 5 | ||||
-rw-r--r-- | net/rxrpc/ar-internal.h | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h index ea3b10ed91a8..0a30c673509c 100644 --- a/include/trace/events/rxrpc.h +++ b/include/trace/events/rxrpc.h | |||
@@ -93,11 +93,12 @@ TRACE_EVENT(rxrpc_rx_packet, | |||
93 | memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); | 93 | memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); |
94 | ), | 94 | ), |
95 | 95 | ||
96 | TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x", | 96 | TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", |
97 | __entry->hdr.epoch, __entry->hdr.cid, | 97 | __entry->hdr.epoch, __entry->hdr.cid, |
98 | __entry->hdr.callNumber, __entry->hdr.serviceId, | 98 | __entry->hdr.callNumber, __entry->hdr.serviceId, |
99 | __entry->hdr.serial, __entry->hdr.seq, | 99 | __entry->hdr.serial, __entry->hdr.seq, |
100 | __entry->hdr.type, __entry->hdr.flags) | 100 | __entry->hdr.type, __entry->hdr.flags, |
101 | __entry->hdr.type <= 15 ? rxrpc_pkts[__entry->hdr.type] : "?UNK") | ||
101 | ); | 102 | ); |
102 | 103 | ||
103 | TRACE_EVENT(rxrpc_rx_done, | 104 | TRACE_EVENT(rxrpc_rx_done, |
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index e78c40b37db5..0f6fafa2c271 100644 --- a/net/rxrpc/ar-internal.h +++ b/net/rxrpc/ar-internal.h | |||
@@ -551,6 +551,9 @@ enum rxrpc_call_trace { | |||
551 | 551 | ||
552 | extern const char rxrpc_call_traces[rxrpc_call__nr_trace][4]; | 552 | extern const char rxrpc_call_traces[rxrpc_call__nr_trace][4]; |
553 | 553 | ||
554 | extern const char *const rxrpc_pkts[]; | ||
555 | extern const char *rxrpc_acks(u8 reason); | ||
556 | |||
554 | #include <trace/events/rxrpc.h> | 557 | #include <trace/events/rxrpc.h> |
555 | 558 | ||
556 | /* | 559 | /* |
@@ -851,11 +854,8 @@ extern unsigned int rxrpc_rx_mtu; | |||
851 | extern unsigned int rxrpc_rx_jumbo_max; | 854 | extern unsigned int rxrpc_rx_jumbo_max; |
852 | extern unsigned int rxrpc_resend_timeout; | 855 | extern unsigned int rxrpc_resend_timeout; |
853 | 856 | ||
854 | extern const char *const rxrpc_pkts[]; | ||
855 | extern const s8 rxrpc_ack_priority[]; | 857 | extern const s8 rxrpc_ack_priority[]; |
856 | 858 | ||
857 | extern const char *rxrpc_acks(u8 reason); | ||
858 | |||
859 | /* | 859 | /* |
860 | * output.c | 860 | * output.c |
861 | */ | 861 | */ |