diff options
| author | J. Bruce Fields <bfields@redhat.com> | 2012-12-03 16:45:35 -0500 |
|---|---|---|
| committer | J. Bruce Fields <bfields@redhat.com> | 2012-12-04 07:49:14 -0500 |
| commit | 8af345f58ac9b350bb23c1457c613381d9f00472 (patch) | |
| tree | 5713862546aad1e24784079ef4eae8edfc37de83 /include/linux/sunrpc | |
| parent | 6a72ae2e23922bc96e8f3de24a5203be6edc2539 (diff) | |
svcrpc: track rpc data length separately from sk_tcplen
Keep a separate field, sk_datalen, that tracks only the data contained
in a fragment, not including the fragment header.
For now, this is always just max(0, sk_tcplen - 4), but after we allow
multiple fragments sk_datalen will accumulate the total rpc data size
while sk_tcplen only tracks progress receiving the current fragment.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/svcsock.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 613cf42227aa..62fd1b756e99 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
| @@ -26,8 +26,15 @@ 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 | __be32 sk_reclen; /* length of record */ | 29 | /* On-the-wire fragment header: */ |
| 30 | u32 sk_tcplen; /* current read length */ | 30 | __be32 sk_reclen; |
| 31 | /* As we receive a record, this includes the length received so | ||
| 32 | * far (including the fragment header): */ | ||
| 33 | u32 sk_tcplen; | ||
| 34 | /* Total length of the data (not including fragment headers) | ||
| 35 | * received so far in the fragments making up this rpc: */ | ||
| 36 | u32 sk_datalen; | ||
| 37 | |||
| 31 | struct page * sk_pages[RPCSVC_MAXPAGES]; /* received data */ | 38 | struct page * sk_pages[RPCSVC_MAXPAGES]; /* received data */ |
| 32 | }; | 39 | }; |
| 33 | 40 | ||
