rxrpc: Trace packet transmission
Trace successful packet transmission (kernel_sendmsg() succeeded, that is) in AF_RXRPC. We can share the enum that defines the transmission points with the trace_rxrpc_tx_fail() tracepoint, so rename its constants to be applicable to both. Also, save the internal call->debug_id in the rxrpc_channel struct so that it can be used in retransmission trace lines. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
@@ -496,7 +496,7 @@ next_subpacket:
|
||||
return rxrpc_proto_abort("LSA", call, seq);
|
||||
}
|
||||
|
||||
trace_rxrpc_rx_data(call, seq, serial, flags, annotation);
|
||||
trace_rxrpc_rx_data(call->debug_id, seq, serial, flags, annotation);
|
||||
if (before_eq(seq, hard_ack)) {
|
||||
ack = RXRPC_ACK_DUPLICATE;
|
||||
ack_serial = serial;
|
||||
@@ -592,6 +592,10 @@ ack:
|
||||
rxrpc_propose_ACK(call, ack, skew, ack_serial,
|
||||
immediate_ack, true,
|
||||
rxrpc_propose_ack_input_data);
|
||||
else
|
||||
rxrpc_propose_ACK(call, RXRPC_ACK_DELAY, skew, serial,
|
||||
false, true,
|
||||
rxrpc_propose_ack_input_data);
|
||||
|
||||
if (sp->hdr.seq == READ_ONCE(call->rx_hard_ack) + 1)
|
||||
rxrpc_notify_socket(call);
|
||||
@@ -1262,6 +1266,11 @@ void rxrpc_data_ready(struct sock *udp_sk)
|
||||
/* But otherwise we need to retransmit the final packet
|
||||
* from data cached in the connection record.
|
||||
*/
|
||||
if (sp->hdr.type == RXRPC_PACKET_TYPE_DATA)
|
||||
trace_rxrpc_rx_data(chan->call_debug_id,
|
||||
sp->hdr.seq,
|
||||
sp->hdr.serial,
|
||||
sp->hdr.flags, 0);
|
||||
rxrpc_post_packet_to_conn(conn, skb);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user