diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-10-28 14:24:14 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-11-24 12:53:35 -0500 |
commit | 1a867a0898b2e366a1eb5b7fe21413a2b2b1629f (patch) | |
tree | 854b8e2516a0b2545414cd9cc00eeda7900dc052 /include/linux/sunrpc | |
parent | 3705ad64f123271b2b88dbff0c9891b7b90299d2 (diff) |
sunrpc: add tracepoints in xs_tcp_data_recv
Add tracepoints inside the main loop on xs_tcp_data_recv that allow
us to keep an eye on what's happening during each phase of it.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/xprtsock.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h index 1ad36cc25b2e..7591788e9fbf 100644 --- a/include/linux/sunrpc/xprtsock.h +++ b/include/linux/sunrpc/xprtsock.h | |||
@@ -17,6 +17,65 @@ void cleanup_socket_xprt(void); | |||
17 | #define RPC_DEF_MIN_RESVPORT (665U) | 17 | #define RPC_DEF_MIN_RESVPORT (665U) |
18 | #define RPC_DEF_MAX_RESVPORT (1023U) | 18 | #define RPC_DEF_MAX_RESVPORT (1023U) |
19 | 19 | ||
20 | struct sock_xprt { | ||
21 | struct rpc_xprt xprt; | ||
22 | |||
23 | /* | ||
24 | * Network layer | ||
25 | */ | ||
26 | struct socket * sock; | ||
27 | struct sock * inet; | ||
28 | |||
29 | /* | ||
30 | * State of TCP reply receive | ||
31 | */ | ||
32 | __be32 tcp_fraghdr, | ||
33 | tcp_xid, | ||
34 | tcp_calldir; | ||
35 | |||
36 | u32 tcp_offset, | ||
37 | tcp_reclen; | ||
38 | |||
39 | unsigned long tcp_copied, | ||
40 | tcp_flags; | ||
41 | |||
42 | /* | ||
43 | * Connection of transports | ||
44 | */ | ||
45 | struct delayed_work connect_worker; | ||
46 | struct sockaddr_storage srcaddr; | ||
47 | unsigned short srcport; | ||
48 | |||
49 | /* | ||
50 | * UDP socket buffer size parameters | ||
51 | */ | ||
52 | size_t rcvsize, | ||
53 | sndsize; | ||
54 | |||
55 | /* | ||
56 | * Saved socket callback addresses | ||
57 | */ | ||
58 | void (*old_data_ready)(struct sock *); | ||
59 | void (*old_state_change)(struct sock *); | ||
60 | void (*old_write_space)(struct sock *); | ||
61 | void (*old_error_report)(struct sock *); | ||
62 | }; | ||
63 | |||
64 | /* | ||
65 | * TCP receive state flags | ||
66 | */ | ||
67 | #define TCP_RCV_LAST_FRAG (1UL << 0) | ||
68 | #define TCP_RCV_COPY_FRAGHDR (1UL << 1) | ||
69 | #define TCP_RCV_COPY_XID (1UL << 2) | ||
70 | #define TCP_RCV_COPY_DATA (1UL << 3) | ||
71 | #define TCP_RCV_READ_CALLDIR (1UL << 4) | ||
72 | #define TCP_RCV_COPY_CALLDIR (1UL << 5) | ||
73 | |||
74 | /* | ||
75 | * TCP RPC flags | ||
76 | */ | ||
77 | #define TCP_RPC_REPLY (1UL << 6) | ||
78 | |||
20 | #endif /* __KERNEL__ */ | 79 | #endif /* __KERNEL__ */ |
21 | 80 | ||
22 | #endif /* _LINUX_SUNRPC_XPRTSOCK_H */ | 81 | #endif /* _LINUX_SUNRPC_XPRTSOCK_H */ |