aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/xprtsock.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-14 09:49:06 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-30 15:35:16 -0400
commit277e4ab7d530bf287e02b65cfcd3ea8f489784f6 (patch)
tree0f4270d8e180ba57e50bb1e77f127a8f03217a34 /include/linux/sunrpc/xprtsock.h
parentSUNRPC: Add a bvec array to struct xdr_buf for use with iovec_iter() (diff)
downloadlinux-dev-277e4ab7d530bf287e02b65cfcd3ea8f489784f6.tar.xz
linux-dev-277e4ab7d530bf287e02b65cfcd3ea8f489784f6.zip
SUNRPC: Simplify TCP receive code by switching to using iterators
Most of this code should also be reusable with other socket types. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include/linux/sunrpc/xprtsock.h')
-rw-r--r--include/linux/sunrpc/xprtsock.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h
index 005cfb6e7238..458bfe0137f5 100644
--- a/include/linux/sunrpc/xprtsock.h
+++ b/include/linux/sunrpc/xprtsock.h
@@ -31,15 +31,16 @@ struct sock_xprt {
* State of TCP reply receive
*/
struct {
- __be32 fraghdr,
+ struct {
+ __be32 fraghdr,
xid,
calldir;
+ } __attribute__((packed));
u32 offset,
len;
- unsigned long copied,
- flags;
+ unsigned long copied;
} recv;
/*
@@ -77,20 +78,8 @@ struct sock_xprt {
};
/*
- * TCP receive state flags
- */
-#define TCP_RCV_LAST_FRAG (1UL << 0)
-#define TCP_RCV_COPY_FRAGHDR (1UL << 1)
-#define TCP_RCV_COPY_XID (1UL << 2)
-#define TCP_RCV_COPY_DATA (1UL << 3)
-#define TCP_RCV_READ_CALLDIR (1UL << 4)
-#define TCP_RCV_COPY_CALLDIR (1UL << 5)
-
-/*
* TCP RPC flags
*/
-#define TCP_RPC_REPLY (1UL << 6)
-
#define XPRT_SOCK_CONNECTING 1U
#define XPRT_SOCK_DATA_READY (2)
#define XPRT_SOCK_UPD_TIMEOUT (3)