diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sunrpc/svcsock.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 92ad02f0dcc..613cf42227a 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
| @@ -26,11 +26,21 @@ struct svc_sock { | |||
| 26 | void (*sk_owspace)(struct sock *); | 26 | void (*sk_owspace)(struct sock *); |
| 27 | 27 | ||
| 28 | /* private TCP part */ | 28 | /* private TCP part */ |
| 29 | u32 sk_reclen; /* length of record */ | 29 | __be32 sk_reclen; /* length of record */ |
| 30 | u32 sk_tcplen; /* current read length */ | 30 | u32 sk_tcplen; /* current read length */ |
| 31 | struct page * sk_pages[RPCSVC_MAXPAGES]; /* received data */ | 31 | struct page * sk_pages[RPCSVC_MAXPAGES]; /* received data */ |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | static inline u32 svc_sock_reclen(struct svc_sock *svsk) | ||
| 35 | { | ||
| 36 | return ntohl(svsk->sk_reclen) & RPC_FRAGMENT_SIZE_MASK; | ||
| 37 | } | ||
| 38 | |||
| 39 | static inline u32 svc_sock_final_rec(struct svc_sock *svsk) | ||
| 40 | { | ||
| 41 | return ntohl(svsk->sk_reclen) & RPC_LAST_STREAM_FRAGMENT; | ||
| 42 | } | ||
| 43 | |||
| 34 | /* | 44 | /* |
| 35 | * Function prototypes. | 45 | * Function prototypes. |
| 36 | */ | 46 | */ |
