aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-04-06 14:22:46 -0700
committerDavid S. Miller <davem@davemloft.net>2017-04-06 14:22:46 -0700
commitec1af27ea8f99ae893aebc38b54b470a69227388 (patch)
tree9e30c8ffb93307788b53c698bd6fdadeb0373756 /include
parentMerge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue (diff)
parentrxrpc: Trace client call connection (diff)
downloadlinux-dev-ec1af27ea8f99ae893aebc38b54b470a69227388.tar.xz
linux-dev-ec1af27ea8f99ae893aebc38b54b470a69227388.zip
Merge tag 'rxrpc-rewrite-20170406' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
David Howells says: ==================== rxrpc: Miscellany Here's a set of patches that make some minor changes to AF_RXRPC: (1) Store error codes in struct rxrpc_call::error as negative codes and only convert to positive in recvmsg() to avoid confusion inside the kernel. (2) Note the result of trying to abort a call (this fails if the call is already 'completed'). (3) Don't abort on temporary errors whilst processing challenge and response packets, but rather drop the packet and wait for retransmission. And also adds some more tracing: (4) Protocol errors. (5) Received abort packets. (6) Changes in the Rx window size due to ACK packet information. (7) Client call initiation (to allow the rxrpc_call struct pointer, the wire call ID and the user ID/afs_call pointer to be cross-referenced). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/af_rxrpc.h2
-rw-r--r--include/trace/events/rxrpc.h101
2 files changed, 102 insertions, 1 deletions
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h
index 1061a472a3e3..b5f5187f488c 100644
--- a/include/net/af_rxrpc.h
+++ b/include/net/af_rxrpc.h
@@ -39,7 +39,7 @@ int rxrpc_kernel_send_data(struct socket *, struct rxrpc_call *,
struct msghdr *, size_t);
int rxrpc_kernel_recv_data(struct socket *, struct rxrpc_call *,
void *, size_t, size_t *, bool, u32 *);
-void rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *,
+bool rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *,
u32, int, const char *);
void rxrpc_kernel_end_call(struct socket *, struct rxrpc_call *);
void rxrpc_kernel_get_peer(struct socket *, struct rxrpc_call *,
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h
index 39123c06a566..29a3d53a4015 100644
--- a/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -683,6 +683,57 @@ 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_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),
@@ -1087,6 +1138,56 @@ TRACE_EVENT(rxrpc_improper_term,
__entry->abort_code)
);
+TRACE_EVENT(rxrpc_rx_eproto,
+ TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial,
+ const char *why),
+
+ TP_ARGS(call, serial, why),
+
+ TP_STRUCT__entry(
+ __field(struct rxrpc_call *, call )
+ __field(rxrpc_serial_t, serial )
+ __field(const char *, why )
+ ),
+
+ TP_fast_assign(
+ __entry->call = call;
+ __entry->serial = serial;
+ __entry->why = why;
+ ),
+
+ TP_printk("c=%p EPROTO %08x %s",
+ __entry->call,
+ __entry->serial,
+ __entry->why)
+ );
+
+TRACE_EVENT(rxrpc_connect_call,
+ TP_PROTO(struct rxrpc_call *call),
+
+ TP_ARGS(call),
+
+ TP_STRUCT__entry(
+ __field(struct rxrpc_call *, call )
+ __field(unsigned long, user_call_ID )
+ __field(u32, cid )
+ __field(u32, call_id )
+ ),
+
+ TP_fast_assign(
+ __entry->call = call;
+ __entry->user_call_ID = call->user_call_ID;
+ __entry->cid = call->cid;
+ __entry->call_id = call->call_id;
+ ),
+
+ TP_printk("c=%p u=%p %08x:%08x",
+ __entry->call,
+ (void *)__entry->user_call_ID,
+ __entry->cid,
+ __entry->call_id)
+ );
+
#endif /* _TRACE_RXRPC_H */
/* This part must be outside protection */