diff options
author | Alexandros Batsakis <batsakis@netapp.com> | 2009-09-10 10:33:30 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-09-13 15:46:15 -0400 |
commit | f300baba5a1536070d6d77bf0c8c4ca999bb4f0f (patch) | |
tree | 648d0020d9a9325cfcb07571d9f11a5c797ee900 /include | |
parent | 908329f2c08b8b5af7b394f709b0ee9c43b93041 (diff) |
nfsd41: sunrpc: add new xprt class for nfsv4.1 backchannel
[sunrpc: change idle timeout value for the backchannel]
Signed-off-by: Alexandros Batsakis <batsakis@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/clnt.h | 1 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 18 | ||||
-rw-r--r-- | include/linux/sunrpc/xprtrdma.h | 5 | ||||
-rw-r--r-- | include/linux/sunrpc/xprtsock.h | 11 |
4 files changed, 19 insertions, 16 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 3d025588e56e..8ed9642a5a76 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -114,6 +114,7 @@ struct rpc_create_args { | |||
114 | rpc_authflavor_t authflavor; | 114 | rpc_authflavor_t authflavor; |
115 | unsigned long flags; | 115 | unsigned long flags; |
116 | char *client_name; | 116 | char *client_name; |
117 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ | ||
117 | }; | 118 | }; |
118 | 119 | ||
119 | /* Values for "flags" field */ | 120 | /* Values for "flags" field */ |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 228d694dbb90..6f9457a75b8f 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -124,6 +124,23 @@ struct rpc_xprt_ops { | |||
124 | void (*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq); | 124 | void (*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq); |
125 | }; | 125 | }; |
126 | 126 | ||
127 | /* | ||
128 | * RPC transport identifiers | ||
129 | * | ||
130 | * To preserve compatibility with the historical use of raw IP protocol | ||
131 | * id's for transport selection, UDP and TCP identifiers are specified | ||
132 | * with the previous values. No such restriction exists for new transports, | ||
133 | * except that they may not collide with these values (17 and 6, | ||
134 | * respectively). | ||
135 | */ | ||
136 | #define XPRT_TRANSPORT_BC (1 << 31) | ||
137 | enum xprt_transports { | ||
138 | XPRT_TRANSPORT_UDP = IPPROTO_UDP, | ||
139 | XPRT_TRANSPORT_TCP = IPPROTO_TCP, | ||
140 | XPRT_TRANSPORT_BC_TCP = IPPROTO_TCP | XPRT_TRANSPORT_BC, | ||
141 | XPRT_TRANSPORT_RDMA = 256 | ||
142 | }; | ||
143 | |||
127 | struct rpc_xprt { | 144 | struct rpc_xprt { |
128 | struct kref kref; /* Reference count */ | 145 | struct kref kref; /* Reference count */ |
129 | struct rpc_xprt_ops * ops; /* transport methods */ | 146 | struct rpc_xprt_ops * ops; /* transport methods */ |
@@ -232,6 +249,7 @@ struct xprt_create { | |||
232 | struct sockaddr * srcaddr; /* optional local address */ | 249 | struct sockaddr * srcaddr; /* optional local address */ |
233 | struct sockaddr * dstaddr; /* remote peer address */ | 250 | struct sockaddr * dstaddr; /* remote peer address */ |
234 | size_t addrlen; | 251 | size_t addrlen; |
252 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ | ||
235 | }; | 253 | }; |
236 | 254 | ||
237 | struct xprt_class { | 255 | struct xprt_class { |
diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrpc/xprtrdma.h index 54a379c9e8eb..c2f04e1ae159 100644 --- a/include/linux/sunrpc/xprtrdma.h +++ b/include/linux/sunrpc/xprtrdma.h | |||
@@ -41,11 +41,6 @@ | |||
41 | #define _LINUX_SUNRPC_XPRTRDMA_H | 41 | #define _LINUX_SUNRPC_XPRTRDMA_H |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * RPC transport identifier for RDMA | ||
45 | */ | ||
46 | #define XPRT_TRANSPORT_RDMA 256 | ||
47 | |||
48 | /* | ||
49 | * rpcbind (v3+) RDMA netid. | 44 | * rpcbind (v3+) RDMA netid. |
50 | */ | 45 | */ |
51 | #define RPCBIND_NETID_RDMA "rdma" | 46 | #define RPCBIND_NETID_RDMA "rdma" |
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h index c2a46c45c8f7..3f14a02e9cc0 100644 --- a/include/linux/sunrpc/xprtsock.h +++ b/include/linux/sunrpc/xprtsock.h | |||
@@ -13,17 +13,6 @@ int init_socket_xprt(void); | |||
13 | void cleanup_socket_xprt(void); | 13 | void cleanup_socket_xprt(void); |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * RPC transport identifiers for UDP, TCP | ||
17 | * | ||
18 | * To preserve compatibility with the historical use of raw IP protocol | ||
19 | * id's for transport selection, these are specified with the previous | ||
20 | * values. No such restriction exists for new transports, except that | ||
21 | * they may not collide with these values (17 and 6, respectively). | ||
22 | */ | ||
23 | #define XPRT_TRANSPORT_UDP IPPROTO_UDP | ||
24 | #define XPRT_TRANSPORT_TCP IPPROTO_TCP | ||
25 | |||
26 | /* | ||
27 | * RPC slot table sizes for UDP, TCP transports | 16 | * RPC slot table sizes for UDP, TCP transports |
28 | */ | 17 | */ |
29 | extern unsigned int xprt_udp_slot_table_entries; | 18 | extern unsigned int xprt_udp_slot_table_entries; |