Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1485642

[PATCH net-next 01/11] rxrpc: Print the packet type name in the Rx packet trace

From David Howells <dhowells@redhat.com>
Newsgroups linux.kernel
Subject [PATCH net-next 01/11] rxrpc: Print the packet type name in the Rx packet trace
Date 2016-09-18 01:30 +0200
Message-ID <sixdw-qm-27@gated-at.bofh.it> (permalink)
References <sixdw-qm-3@gated-at.bofh.it>
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903

Show all headers | View raw


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>
---

 include/trace/events/rxrpc.h |    5 +++--
 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,
 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
 			   ),
 
-	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x",
+	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
 		      __entry->hdr.epoch, __entry->hdr.cid,
 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
 		      __entry->hdr.serial, __entry->hdr.seq,
-		      __entry->hdr.type, __entry->hdr.flags)
+		      __entry->hdr.type, __entry->hdr.flags,
+		      __entry->hdr.type <= 15 ? rxrpc_pkts[__entry->hdr.type] : "?UNK")
 	    );
 
 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 {
 
 extern const char rxrpc_call_traces[rxrpc_call__nr_trace][4];
 
+extern const char *const rxrpc_pkts[];
+extern const char *rxrpc_acks(u8 reason);
+
 #include <trace/events/rxrpc.h>
 
 /*
@@ -851,11 +854,8 @@ extern unsigned int rxrpc_rx_mtu;
 extern unsigned int rxrpc_rx_jumbo_max;
 extern unsigned int rxrpc_resend_timeout;
 
-extern const char *const rxrpc_pkts[];
 extern const s8 rxrpc_ack_priority[];
 
-extern const char *rxrpc_acks(u8 reason);
-
 /*
  * output.c
  */

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next 00/11] rxrpc: Tracepoint addition and improvement David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
  [PATCH net-next 04/11] rxrpc: Add a tracepoint to follow the life  of a packet in the Tx buffer David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
  [PATCH net-next 08/11] rxrpc: Add a tracepoint to follow what  recvmsg does David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
  [PATCH net-next 05/11] rxrpc: Add a tracepoint to log received ACK  packets David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
  [PATCH net-next 01/11] rxrpc: Print the packet type name in the Rx  packet trace David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
  [PATCH net-next 11/11] rxrpc: Add config to inject packet loss David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
    Re: [PATCH net-next 11/11] rxrpc: Add config to inject packet loss Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-09-18 13:50 +0200
  [PATCH net-next 10/11] rxrpc: Improve skb tracing David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
  [PATCH net-next 06/11] rxrpc: Add a tracepoint to log ACK  transmission David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
  [PATCH net-next 03/11] rxrpc: Add connection tracepoint and client  conn state tracepoint David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
  Re: [PATCH net-next 00/11] rxrpc: Tracepoint addition and  improvement David Miller <davem@davemloft.net> - 2016-09-19 08:00 +0200

csiph-web