rxrpc: Add a tracepoint to follow the life of a packet in the Tx buffer
Add a tracepoint to follow the insertion of a packet into the transmit
buffer, its transmission and its rotation out of the buffer.
Signed-off-by: David Howells <dhowells@redhat.com>
diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c
index 8bfddf4..28d8f73 100644
--- a/net/rxrpc/sendmsg.c
+++ b/net/rxrpc/sendmsg.c
@@ -56,6 +56,7 @@
break;
}
+ trace_rxrpc_transmit(call, rxrpc_transmit_wait);
release_sock(&rx->sk);
*timeo = schedule_timeout(*timeo);
lock_sock(&rx->sk);
@@ -104,8 +105,14 @@
smp_wmb();
call->rxtx_buffer[ix] = skb;
call->tx_top = seq;
- if (last)
+ if (last) {
set_bit(RXRPC_CALL_TX_LAST, &call->flags);
+ trace_rxrpc_transmit(call, rxrpc_transmit_queue_last);
+ } else if (sp->hdr.flags & RXRPC_REQUEST_ACK) {
+ trace_rxrpc_transmit(call, rxrpc_transmit_queue_reqack);
+ } else {
+ trace_rxrpc_transmit(call, rxrpc_transmit_queue);
+ }
if (last || call->state == RXRPC_CALL_SERVER_ACK_REQUEST) {
_debug("________awaiting reply/ACK__________");