Skip to content

Commit

Permalink
rxrpc: Trace received aborts
Browse files Browse the repository at this point in the history
Add a tracepoint (rxrpc_rx_abort) to record received aborts.

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

TRACE_EVENT(rxrpc_rx_abort,
TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
u32 abort_code),

TP_ARGS(call, serial, abort_code),

TP_STRUCT__entry(
__field(struct rxrpc_call *, call )
__field(rxrpc_serial_t, serial )
__field(u32, abort_code )
),

TP_fast_assign(
__entry->call = call;
__entry->serial = serial;
__entry->abort_code = abort_code;
),

TP_printk("c=%p ABORT %08x ac=%d",
__entry->call,
__entry->serial,
__entry->abort_code)
);

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
4 changes: 3 additions & 1 deletion net/rxrpc/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ static void rxrpc_input_ackall(struct rxrpc_call *call, struct sk_buff *skb)
}

/*
* Process an ABORT packet.
* Process an ABORT packet directed at a call.
*/
static void rxrpc_input_abort(struct rxrpc_call *call, struct sk_buff *skb)
{
Expand All @@ -892,6 +892,8 @@ static void rxrpc_input_abort(struct rxrpc_call *call, struct sk_buff *skb)
&wtmp, sizeof(wtmp)) >= 0)
abort_code = ntohl(wtmp);

trace_rxrpc_rx_abort(call, sp->hdr.serial, abort_code);

_proto("Rx ABORT %%%u { %x }", sp->hdr.serial, abort_code);

if (rxrpc_set_call_completion(call, RXRPC_CALL_REMOTELY_ABORTED,
Expand Down

0 comments on commit 005ede2

Please sign in to comment.