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>
This commit is contained in:
@@ -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;
|
||||
|
||||
/*
|
||||
@@ -76,21 +77,9 @@ struct sock_xprt {
|
||||
void (*old_error_report)(struct sock *);
|
||||
};
|
||||
|
||||
/*
|
||||
* 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)
|
||||
|
Reference in New Issue
Block a user