summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-17 10:49:13 +0100
committerDavid Howells <dhowells@redhat.com>2016-09-17 11:24:03 +0100
commitec71eb9ada34f8d1a58b7c35d906c59411295445 (patch)
treee8eba61aa60043b2f96719a4505661cdf5c18fb0
parenta124fe3ee5d82f2c9a9b8818ed5cb9f61685f1d3 (diff)
rxrpc: Add a tracepoint to log received ACK packets
Add a tracepoint to log information from received ACK packets. Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--include/trace/events/rxrpc.h26
-rw-r--r--net/rxrpc/input.c2
2 files changed, 28 insertions, 0 deletions
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h
index ffc74b3e5b76..2b19f3fa5174 100644
--- a/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -234,6 +234,32 @@ TRACE_EVENT(rxrpc_transmit,
__entry->tx_top - __entry->tx_hard_ack)
);
+TRACE_EVENT(rxrpc_rx_ack,
+ TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t first, u8 reason, u8 n_acks),
+
+ TP_ARGS(call, first, reason, n_acks),
+
+ TP_STRUCT__entry(
+ __field(struct rxrpc_call *, call )
+ __field(rxrpc_seq_t, first )
+ __field(u8, reason )
+ __field(u8, n_acks )
+ ),
+
+ TP_fast_assign(
+ __entry->call = call;
+ __entry->first = first;
+ __entry->reason = reason;
+ __entry->n_acks = n_acks;
+ ),
+
+ TP_printk("c=%p %s f=%08x n=%u",
+ __entry->call,
+ rxrpc_acks(__entry->reason),
+ __entry->first,
+ __entry->n_acks)
+ );
+
#endif /* _TRACE_RXRPC_H */
/* This part must be outside protection */
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index c7eb5104e91a..7b18ca124978 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -440,6 +440,8 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb,
hard_ack = first_soft_ack - 1;
nr_acks = buf.ack.nAcks;
+ trace_rxrpc_rx_ack(call, first_soft_ack, buf.ack.reason, nr_acks);
+
_proto("Rx ACK %%%u { m=%hu f=#%u p=#%u s=%%%u r=%s n=%u }",
sp->hdr.serial,
ntohs(buf.ack.maxSkew),