Lines Matching +full:rpc +full:- +full:if

1 /* SPDX-License-Identifier: GPL-2.0 */
5 * RPC server declarations.
33 * RPC service thread pool.
36 * a single one of these per RPC service, but on NUMA machines those
38 * have one pool per NUMA node. This optimisation reduces cross-
39 * node traffic on multi-node NUMA NFS servers.
48 #define SP_TASK_PENDING (0) /* still work to do even if no
74 * RPC service.
76 * An RPC service is a ``daemon,'' possibly multithreaded, which
77 * receives and processes incoming RPC messages.
81 * We currently do not support more than one RPC program per daemon.
84 struct svc_program * sv_program; /* RPC program */
85 struct svc_stat * sv_stats; /* RPC statistics */
105 #if defined(CONFIG_SUNRPC_BACKCHANNEL)
110 wait_queue_head_t sv_cb_waitq; /* sleep here if there are no
124 serv->sv_nrthreads++; in svc_get()
128 * Maximum payload size supported by a kernel RPC server.
136 * For UDP transports, a block plus NFS,RPC, and UDP headers
155 * RPC Requsts and replies are stored in one or more pages.
160 * Pages are sent using ->sendpage so each server thread needs to
173 * This assumes that the non-page part of an rpc reply will fit
174 * in a page - NFSd ensures this. lockd also has no trouble.
178 * We using ->sendfile to return read data, we might need one extra page
179 * if the request is not page-aligned. So add another '1'.
181 #define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE \
187 vp = iov->iov_base; in svc_getnl()
189 iov->iov_base = (void*)vp; in svc_getnl()
190 iov->iov_len -= sizeof(__be32); in svc_getnl()
196 __be32 *vp = iov->iov_base + iov->iov_len; in svc_putnl()
198 iov->iov_len += sizeof(__be32); in svc_putnl()
204 vp = iov->iov_base; in svc_getu32()
206 iov->iov_base = (void*)vp; in svc_getu32()
207 iov->iov_len -= sizeof(__be32); in svc_getu32()
213 __be32 *vp = (__be32 *)iov->iov_base; in svc_ungetu32()
214 iov->iov_base = (void *)(vp - 1); in svc_ungetu32()
215 iov->iov_len += sizeof(*vp); in svc_ungetu32()
220 __be32 *vp = iov->iov_base + iov->iov_len; in svc_putu32()
222 iov->iov_len += sizeof(__be32); in svc_putu32()
237 * - reply from here */
240 struct svc_serv * rq_server; /* RPC service definition */
281 void * rq_auth_data; /* flavor-specific data */
295 struct auth_domain * rq_client; /* RPC peer info */
296 struct auth_domain * rq_gssclient; /* "gss/"-style peer info */
299 spinlock_t rq_lock; /* per-request lock */
306 #define SVC_NET(rqst) (rqst->rq_xprt ? rqst->rq_xprt->xpt_net : rqst->rq_bc_net)
313 return (struct sockaddr_in *) &rqst->rq_addr; in svc_addr_in()
318 return (struct sockaddr_in6 *) &rqst->rq_addr; in svc_addr_in6()
323 return (struct sockaddr *) &rqst->rq_addr; in svc_addr()
328 return (struct sockaddr_in *) &rqst->rq_daddr; in svc_daddr_in()
333 return (struct sockaddr_in6 *) &rqst->rq_daddr; in svc_daddr_in6()
338 return (struct sockaddr *) &rqst->rq_daddr; in svc_daddr()
348 struct kvec *vec = &rqstp->rq_arg.head[0]; in xdr_argsize_check()
349 return cp >= (char*)vec->iov_base in xdr_argsize_check()
350 && cp <= (char*)vec->iov_base + vec->iov_len; in xdr_argsize_check()
356 struct kvec *vec = &rqstp->rq_res.head[0]; in xdr_ressize_check()
359 vec->iov_len = cp - (char*)vec->iov_base; in xdr_ressize_check()
361 return vec->iov_len <= PAGE_SIZE; in xdr_ressize_check()
366 while (rqstp->rq_next_page != rqstp->rq_respages) { in svc_free_res_pages()
367 struct page **pp = --rqstp->rq_next_page; in svc_free_res_pages()
368 if (*pp) { in svc_free_res_pages()
399 * List of RPC programs on the same transport endpoint
410 struct svc_stat * pg_stats; /* rpc statistics */
423 * RPC program version
428 const struct svc_procedure *vs_proc; /* per-procedure info */
435 /* Don't care if the rpcbind registration fails */
449 * RPC procedure info
470 SVC_POOL_AUTO = -1, /* choose one of the others */
557 svc_reserve(rqstp, space + rqstp->rq_auth_slack); in svc_reserve_auth()