summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/misc.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-22 01:41:53 +0200
committerDavid Howells <dhowells@redhat.com>2016-09-22 02:26:25 +0200
commitcf1a6474f80735ff4a5d99f3dd68a94dbec8455f (patch)
tree8ca17608fce76f66375297f2395b0943d8f1e988 /net/rxrpc/misc.c
parentrxrpc: Add re-sent Tx annotation (diff)
downloadlinux-cf1a6474f80735ff4a5d99f3dd68a94dbec8455f.tar.xz
linux-cf1a6474f80735ff4a5d99f3dd68a94dbec8455f.zip
rxrpc: Add per-peer RTT tracker
Add a function to track the average RTT for a peer. Sources of RTT data will be added in subsequent patches. The RTT data will be useful in the future for determining resend timeouts and for handling the slow-start part of the Rx protocol. Also add a pair of tracepoints, one to log transmissions to elicit a response for RTT purposes and one to log responses that contribute RTT data. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/misc.c')
-rw-r--r--net/rxrpc/misc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/rxrpc/misc.c b/net/rxrpc/misc.c
index 026e1f2e83ff..6321c23f9a6e 100644
--- a/net/rxrpc/misc.c
+++ b/net/rxrpc/misc.c
@@ -182,3 +182,11 @@ const char rxrpc_recvmsg_traces[rxrpc_recvmsg__nr_trace][5] = {
[rxrpc_recvmsg_to_be_accepted] = "TBAC",
[rxrpc_recvmsg_return] = "RETN",
};
+
+const char rxrpc_rtt_tx_traces[rxrpc_rtt_tx__nr_trace][5] = {
+ [rxrpc_rtt_tx_ping] = "PING",
+};
+
+const char rxrpc_rtt_rx_traces[rxrpc_rtt_rx__nr_trace][5] = {
+ [rxrpc_rtt_rx_ping_response] = "PONG",
+};