Skip to content

Commit a3868bf

Browse files
committed
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>
1 parent 182f505 commit a3868bf

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎include/trace/events/rxrpc.h‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,12 @@ TRACE_EVENT(rxrpc_rx_packet,
9393
memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
9494
),
9595

96-
TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x",
96+
TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
9797
__entry->hdr.epoch, __entry->hdr.cid,
9898
__entry->hdr.callNumber, __entry->hdr.serviceId,
9999
__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")
101102
);
102103

103104
TRACE_EVENT(rxrpc_rx_done,

‎net/rxrpc/ar-internal.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,9 @@ enum rxrpc_call_trace {
551551

552552
extern const char rxrpc_call_traces[rxrpc_call__nr_trace][4];
553553

554+
extern const char *const rxrpc_pkts[];
555+
extern const char *rxrpc_acks(u8 reason);
556+
554557
#include <trace/events/rxrpc.h>
555558

556559
/*
@@ -851,11 +854,8 @@ extern unsigned int rxrpc_rx_mtu;
851854
extern unsigned int rxrpc_rx_jumbo_max;
852855
extern unsigned int rxrpc_resend_timeout;
853856

854-
extern const char *const rxrpc_pkts[];
855857
extern const s8 rxrpc_ack_priority[];
856858

857-
extern const char *rxrpc_acks(u8 reason);
858-
859859
/*
860860
* output.c
861861
*/

0 commit comments

Comments
 (0)