diff options
author | David Howells <dhowells@redhat.com> | 2016-09-17 05:49:13 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-09-17 06:24:03 -0400 |
commit | f3639df2d90bc919328c459b3c7c49ed5667a52f (patch) | |
tree | 3d8f8e234a88edd8d86c64656ca718fbf54ee248 /net/rxrpc/output.c | |
parent | ec71eb9ada34f8d1a58b7c35d906c59411295445 (diff) |
rxrpc: Add a tracepoint to log ACK transmission
Add a tracepoint to log information about ACK transmission.
Signed-off-by: David Howels <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/output.c')
-rw-r--r-- | net/rxrpc/output.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c index 0b21ed859de7..2c9daeadce87 100644 --- a/net/rxrpc/output.c +++ b/net/rxrpc/output.c | |||
@@ -38,12 +38,14 @@ struct rxrpc_pkt_buffer { | |||
38 | static size_t rxrpc_fill_out_ack(struct rxrpc_call *call, | 38 | static size_t rxrpc_fill_out_ack(struct rxrpc_call *call, |
39 | struct rxrpc_pkt_buffer *pkt) | 39 | struct rxrpc_pkt_buffer *pkt) |
40 | { | 40 | { |
41 | rxrpc_serial_t serial; | ||
41 | rxrpc_seq_t hard_ack, top, seq; | 42 | rxrpc_seq_t hard_ack, top, seq; |
42 | int ix; | 43 | int ix; |
43 | u32 mtu, jmax; | 44 | u32 mtu, jmax; |
44 | u8 *ackp = pkt->acks; | 45 | u8 *ackp = pkt->acks; |
45 | 46 | ||
46 | /* Barrier against rxrpc_input_data(). */ | 47 | /* Barrier against rxrpc_input_data(). */ |
48 | serial = call->ackr_serial; | ||
47 | hard_ack = READ_ONCE(call->rx_hard_ack); | 49 | hard_ack = READ_ONCE(call->rx_hard_ack); |
48 | top = smp_load_acquire(&call->rx_top); | 50 | top = smp_load_acquire(&call->rx_top); |
49 | 51 | ||
@@ -51,7 +53,7 @@ static size_t rxrpc_fill_out_ack(struct rxrpc_call *call, | |||
51 | pkt->ack.maxSkew = htons(call->ackr_skew); | 53 | pkt->ack.maxSkew = htons(call->ackr_skew); |
52 | pkt->ack.firstPacket = htonl(hard_ack + 1); | 54 | pkt->ack.firstPacket = htonl(hard_ack + 1); |
53 | pkt->ack.previousPacket = htonl(call->ackr_prev_seq); | 55 | pkt->ack.previousPacket = htonl(call->ackr_prev_seq); |
54 | pkt->ack.serial = htonl(call->ackr_serial); | 56 | pkt->ack.serial = htonl(serial); |
55 | pkt->ack.reason = call->ackr_reason; | 57 | pkt->ack.reason = call->ackr_reason; |
56 | pkt->ack.nAcks = top - hard_ack; | 58 | pkt->ack.nAcks = top - hard_ack; |
57 | 59 | ||
@@ -75,6 +77,9 @@ static size_t rxrpc_fill_out_ack(struct rxrpc_call *call, | |||
75 | pkt->ackinfo.rwind = htonl(call->rx_winsize); | 77 | pkt->ackinfo.rwind = htonl(call->rx_winsize); |
76 | pkt->ackinfo.jumbo_max = htonl(jmax); | 78 | pkt->ackinfo.jumbo_max = htonl(jmax); |
77 | 79 | ||
80 | trace_rxrpc_tx_ack(call, hard_ack + 1, serial, call->ackr_reason, | ||
81 | top - hard_ack); | ||
82 | |||
78 | *ackp++ = 0; | 83 | *ackp++ = 0; |
79 | *ackp++ = 0; | 84 | *ackp++ = 0; |
80 | *ackp++ = 0; | 85 | *ackp++ = 0; |