diff options
| author | Trond Myklebust <trond.myklebust@fys.uio.no> | 2005-03-10 08:01:43 -0500 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@fys.uio.no> | 2005-03-10 08:01:43 -0500 |
| commit | afdc754f2b8528423553d0ed443341685fd1ae09 (patch) | |
| tree | 450153189a4345285d59f174d723dbfb7473cfeb /include/linux/sunrpc | |
| parent | 388a910da2a61717581135118611340a086aadb5 (diff) | |
NFS,RPC: RPC client now advertises maximum payload size
The RPC client now reports the maximum payload size supported by the chosen
transport method. This is something a little less than 64KB for RPC over
UDP, and about 2GB - 1 for RPC over TCP. The effective rsize and wsize
values are not allowed to exceed the reported maximum RPC payload size.
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 2cdea3ba5002..2709caf4d128 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -128,6 +128,7 @@ void rpc_restart_call(struct rpc_task *); void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); +size_t rpc_max_payload(struct rpc_clnt *); static __inline__ int rpc_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags) diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 78dbc7bedd7b..e618c1649814 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -140,6 +140,9 @@ struct rpc_xprt { unsigned int rcvsize, /* socket receive buffer size */ sndsize; /* socket send buffer size */ + size_t max_payload; /* largest RPC payload size, + in bytes */ + struct rpc_wait_queue sending; /* requests waiting to send */ struct rpc_wait_queue resend; /* requests waiting to resend */ struct rpc_wait_queue pending; /* requests in flight */ |
