summaryrefslogtreecommitdiff
path: root/net/rxrpc
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-08 11:10:12 +0100
committerDavid Howells <dhowells@redhat.com>2016-09-08 11:10:12 +0100
commit49e19ec7d3499f79d2b3a45bb28418e89512fd7a (patch)
treef1969d57bc0f7018b64552a4b1a45028addc90d0 /net/rxrpc
parent2ab27215ea27475a0b279732ba8a934bfab57ef0 (diff)
rxrpc: Add tracepoints to record received packets and end of data_ready
Add two tracepoints: (1) Record the RxRPC protocol header of packets retrieved from the UDP socket by the data_ready handler. (2) Record the outcome of the data_ready handler. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc')
-rw-r--r--net/rxrpc/input.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 8e624109750a..6c4b7df05e95 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -683,6 +683,7 @@ void rxrpc_data_ready(struct sock *sk)
/* dig out the RxRPC connection details */
if (rxrpc_extract_header(sp, skb) < 0)
goto bad_message;
+ trace_rxrpc_rx_packet(sp);
_net("Rx RxRPC %s ep=%x call=%x:%x",
sp->hdr.flags & RXRPC_CLIENT_INITIATED ? "ToServer" : "ToClient",
@@ -767,6 +768,7 @@ discard_unlock:
out_unlock:
rcu_read_unlock();
out:
+ trace_rxrpc_rx_done(0, 0);
return;
cant_route_call:
@@ -780,7 +782,7 @@ cant_route_call:
skb_queue_tail(&local->accept_queue, skb);
rxrpc_queue_work(&local->processor);
_leave(" [incoming]");
- return;
+ goto out;
}
skb->priority = RX_INVALID_OPERATION;
} else {
@@ -789,7 +791,7 @@ cant_route_call:
if (sp->hdr.type != RXRPC_PACKET_TYPE_ABORT) {
_debug("reject type %d",sp->hdr.type);
- rxrpc_reject_packet(local, skb);
+ goto reject_packet;
} else {
rxrpc_free_skb(skb);
}
@@ -798,6 +800,8 @@ cant_route_call:
bad_message:
skb->priority = RX_PROTOCOL_ERROR;
+reject_packet:
+ trace_rxrpc_rx_done(skb->mark, skb->priority);
rxrpc_reject_packet(local, skb);
_leave(" [badmsg]");
}