summaryrefslogtreecommitdiff
path: root/net/rxrpc/output.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-17 12:49:13 +0300
committerDavid Howells <dhowells@redhat.com>2016-09-17 13:24:03 +0300
commitf3639df2d90bc919328c459b3c7c49ed5667a52f (patch)
tree3d8f8e234a88edd8d86c64656ca718fbf54ee248 /net/rxrpc/output.c
parentec71eb9ada34f8d1a58b7c35d906c59411295445 (diff)
downloadlinux-f3639df2d90bc919328c459b3c7c49ed5667a52f.tar.xz
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.c7
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 {
static size_t rxrpc_fill_out_ack(struct rxrpc_call *call,
struct rxrpc_pkt_buffer *pkt)
{
+ rxrpc_serial_t serial;
rxrpc_seq_t hard_ack, top, seq;
int ix;
u32 mtu, jmax;
u8 *ackp = pkt->acks;
/* Barrier against rxrpc_input_data(). */
+ serial = call->ackr_serial;
hard_ack = READ_ONCE(call->rx_hard_ack);
top = smp_load_acquire(&call->rx_top);
@@ -51,7 +53,7 @@ static size_t rxrpc_fill_out_ack(struct rxrpc_call *call,
pkt->ack.maxSkew = htons(call->ackr_skew);
pkt->ack.firstPacket = htonl(hard_ack + 1);
pkt->ack.previousPacket = htonl(call->ackr_prev_seq);
- pkt->ack.serial = htonl(call->ackr_serial);
+ pkt->ack.serial = htonl(serial);
pkt->ack.reason = call->ackr_reason;
pkt->ack.nAcks = top - hard_ack;
@@ -75,6 +77,9 @@ static size_t rxrpc_fill_out_ack(struct rxrpc_call *call,
pkt->ackinfo.rwind = htonl(call->rx_winsize);
pkt->ackinfo.jumbo_max = htonl(jmax);
+ trace_rxrpc_tx_ack(call, hard_ack + 1, serial, call->ackr_reason,
+ top - hard_ack);
+
*ackp++ = 0;
*ackp++ = 0;
*ackp++ = 0;