diff options
author | David Howells <dhowells@redhat.com> | 2017-04-06 05:12:00 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-04-06 06:10:41 -0400 |
commit | 005ede286f1b801be21d9667d6080bca79ef2a26 (patch) | |
tree | 92e9f22ab2b39a4ee36fb721dfdda0fa9b81fe34 | |
parent | fb46f6ee10e78799ea38cf97e4bf52cb70f1228a (diff) |
rxrpc: Trace received aborts
Add a tracepoint (rxrpc_rx_abort) to record received aborts.
Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | include/trace/events/rxrpc.h | 24 | ||||
-rw-r--r-- | net/rxrpc/input.c | 4 |
2 files changed, 27 insertions, 1 deletions
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h index 626af97863e8..85e0148c88a8 100644 --- a/include/trace/events/rxrpc.h +++ b/include/trace/events/rxrpc.h | |||
@@ -683,6 +683,30 @@ TRACE_EVENT(rxrpc_rx_ack, | |||
683 | __entry->n_acks) | 683 | __entry->n_acks) |
684 | ); | 684 | ); |
685 | 685 | ||
686 | TRACE_EVENT(rxrpc_rx_abort, | ||
687 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, | ||
688 | u32 abort_code), | ||
689 | |||
690 | TP_ARGS(call, serial, abort_code), | ||
691 | |||
692 | TP_STRUCT__entry( | ||
693 | __field(struct rxrpc_call *, call ) | ||
694 | __field(rxrpc_serial_t, serial ) | ||
695 | __field(u32, abort_code ) | ||
696 | ), | ||
697 | |||
698 | TP_fast_assign( | ||
699 | __entry->call = call; | ||
700 | __entry->serial = serial; | ||
701 | __entry->abort_code = abort_code; | ||
702 | ), | ||
703 | |||
704 | TP_printk("c=%p ABORT %08x ac=%d", | ||
705 | __entry->call, | ||
706 | __entry->serial, | ||
707 | __entry->abort_code) | ||
708 | ); | ||
709 | |||
686 | TRACE_EVENT(rxrpc_tx_data, | 710 | TRACE_EVENT(rxrpc_tx_data, |
687 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, | 711 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, |
688 | rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), | 712 | rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), |
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 3685dbe05a8f..241e989597f2 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c | |||
@@ -877,7 +877,7 @@ static void rxrpc_input_ackall(struct rxrpc_call *call, struct sk_buff *skb) | |||
877 | } | 877 | } |
878 | 878 | ||
879 | /* | 879 | /* |
880 | * Process an ABORT packet. | 880 | * Process an ABORT packet directed at a call. |
881 | */ | 881 | */ |
882 | static void rxrpc_input_abort(struct rxrpc_call *call, struct sk_buff *skb) | 882 | static void rxrpc_input_abort(struct rxrpc_call *call, struct sk_buff *skb) |
883 | { | 883 | { |
@@ -892,6 +892,8 @@ static void rxrpc_input_abort(struct rxrpc_call *call, struct sk_buff *skb) | |||
892 | &wtmp, sizeof(wtmp)) >= 0) | 892 | &wtmp, sizeof(wtmp)) >= 0) |
893 | abort_code = ntohl(wtmp); | 893 | abort_code = ntohl(wtmp); |
894 | 894 | ||
895 | trace_rxrpc_rx_abort(call, sp->hdr.serial, abort_code); | ||
896 | |||
895 | _proto("Rx ABORT %%%u { %x }", sp->hdr.serial, abort_code); | 897 | _proto("Rx ABORT %%%u { %x }", sp->hdr.serial, abort_code); |
896 | 898 | ||
897 | if (rxrpc_set_call_completion(call, RXRPC_CALL_REMOTELY_ABORTED, | 899 | if (rxrpc_set_call_completion(call, RXRPC_CALL_REMOTELY_ABORTED, |