Skip to content

Commit

Permalink
rxrpc: Trace changes in a call's receive window size
Browse files Browse the repository at this point in the history
Add a tracepoint (rxrpc_rx_rwind_change) to log changes in a call's receive
window size as imposed by the peer through an ACK packet.

Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Apr 6, 2017
1 parent 005ede2 commit 740586d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
27 changes: 27 additions & 0 deletions include/trace/events/rxrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,33 @@ TRACE_EVENT(rxrpc_rx_abort,
__entry->abort_code)
);

TRACE_EVENT(rxrpc_rx_rwind_change,
TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
u32 rwind, bool wake),

TP_ARGS(call, serial, rwind, wake),

TP_STRUCT__entry(
__field(struct rxrpc_call *, call )
__field(rxrpc_serial_t, serial )
__field(u32, rwind )
__field(bool, wake )
),

TP_fast_assign(
__entry->call = call;
__entry->serial = serial;
__entry->rwind = rwind;
__entry->wake = wake;
),

TP_printk("c=%p %08x rw=%u%s",
__entry->call,
__entry->serial,
__entry->rwind,
__entry->wake ? " wake" : "")
);

TRACE_EVENT(rxrpc_tx_data,
TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq,
rxrpc_serial_t serial, u8 flags, bool retrans, bool lose),
Expand Down
2 changes: 2 additions & 0 deletions net/rxrpc/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,8 @@ static void rxrpc_input_ackinfo(struct rxrpc_call *call, struct sk_buff *skb,
rwind = RXRPC_RXTX_BUFF_SIZE - 1;
if (rwind > call->tx_winsize)
wake = true;
trace_rxrpc_rx_rwind_change(call, sp->hdr.serial,
ntohl(ackinfo->rwind), wake);
call->tx_winsize = rwind;
}

Expand Down

0 comments on commit 740586d

Please sign in to comment.