Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * linux/include/linux/sunrpc/svc.h
0004  *
0005  * RPC server declarations.
0006  *
0007  * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
0008  */
0009 
0010 
0011 #ifndef SUNRPC_SVC_H
0012 #define SUNRPC_SVC_H
0013 
0014 #include <linux/in.h>
0015 #include <linux/in6.h>
0016 #include <linux/sunrpc/types.h>
0017 #include <linux/sunrpc/xdr.h>
0018 #include <linux/sunrpc/auth.h>
0019 #include <linux/sunrpc/svcauth.h>
0020 #include <linux/wait.h>
0021 #include <linux/mm.h>
0022 #include <linux/pagevec.h>
0023 
0024 /* statistics for svc_pool structures */
0025 struct svc_pool_stats {
0026     atomic_long_t   packets;
0027     unsigned long   sockets_queued;
0028     atomic_long_t   threads_woken;
0029     atomic_long_t   threads_timedout;
0030 };
0031 
0032 /*
0033  *
0034  * RPC service thread pool.
0035  *
0036  * Pool of threads and temporary sockets.  Generally there is only
0037  * a single one of these per RPC service, but on NUMA machines those
0038  * services that can benefit from it (i.e. nfs but not lockd) will
0039  * have one pool per NUMA node.  This optimisation reduces cross-
0040  * node traffic on multi-node NUMA NFS servers.
0041  */
0042 struct svc_pool {
0043     unsigned int        sp_id;          /* pool id; also node id on NUMA */
0044     spinlock_t      sp_lock;    /* protects all fields */
0045     struct list_head    sp_sockets; /* pending sockets */
0046     unsigned int        sp_nrthreads;   /* # of threads in pool */
0047     struct list_head    sp_all_threads; /* all server threads */
0048     struct svc_pool_stats   sp_stats;   /* statistics on pool operation */
0049 #define SP_TASK_PENDING     (0)     /* still work to do even if no
0050                          * xprt is queued. */
0051 #define SP_CONGESTED        (1)
0052     unsigned long       sp_flags;
0053 } ____cacheline_aligned_in_smp;
0054 
0055 /*
0056  * RPC service.
0057  *
0058  * An RPC service is a ``daemon,'' possibly multithreaded, which
0059  * receives and processes incoming RPC messages.
0060  * It has one or more transport sockets associated with it, and maintains
0061  * a list of idle threads waiting for input.
0062  *
0063  * We currently do not support more than one RPC program per daemon.
0064  */
0065 struct svc_serv {
0066     struct svc_program *    sv_program; /* RPC program */
0067     struct svc_stat *   sv_stats;   /* RPC statistics */
0068     spinlock_t      sv_lock;
0069     struct kref     sv_refcnt;
0070     unsigned int        sv_nrthreads;   /* # of server threads */
0071     unsigned int        sv_maxconn; /* max connections allowed or
0072                          * '0' causing max to be based
0073                          * on number of threads. */
0074 
0075     unsigned int        sv_max_payload; /* datagram payload size */
0076     unsigned int        sv_max_mesg;    /* max_payload + 1 page for overheads */
0077     unsigned int        sv_xdrsize; /* XDR buffer size */
0078     struct list_head    sv_permsocks;   /* all permanent sockets */
0079     struct list_head    sv_tempsocks;   /* all temporary sockets */
0080     int         sv_tmpcnt;  /* count of temporary sockets */
0081     struct timer_list   sv_temptimer;   /* timer for aging temporary sockets */
0082 
0083     char *          sv_name;    /* service name */
0084 
0085     unsigned int        sv_nrpools; /* number of thread pools */
0086     struct svc_pool *   sv_pools;   /* array of thread pools */
0087     int         (*sv_threadfn)(void *data);
0088 
0089 #if defined(CONFIG_SUNRPC_BACKCHANNEL)
0090     struct list_head    sv_cb_list; /* queue for callback requests
0091                          * that arrive over the same
0092                          * connection */
0093     spinlock_t      sv_cb_lock; /* protects the svc_cb_list */
0094     wait_queue_head_t   sv_cb_waitq;    /* sleep here if there are no
0095                          * entries in the svc_cb_list */
0096     bool            sv_bc_enabled;  /* service uses backchannel */
0097 #endif /* CONFIG_SUNRPC_BACKCHANNEL */
0098 };
0099 
0100 /**
0101  * svc_get() - increment reference count on a SUNRPC serv
0102  * @serv:  the svc_serv to have count incremented
0103  *
0104  * Returns: the svc_serv that was passed in.
0105  */
0106 static inline struct svc_serv *svc_get(struct svc_serv *serv)
0107 {
0108     kref_get(&serv->sv_refcnt);
0109     return serv;
0110 }
0111 
0112 void svc_destroy(struct kref *);
0113 
0114 /**
0115  * svc_put - decrement reference count on a SUNRPC serv
0116  * @serv:  the svc_serv to have count decremented
0117  *
0118  * When the reference count reaches zero, svc_destroy()
0119  * is called to clean up and free the serv.
0120  */
0121 static inline void svc_put(struct svc_serv *serv)
0122 {
0123     kref_put(&serv->sv_refcnt, svc_destroy);
0124 }
0125 
0126 /**
0127  * svc_put_not_last - decrement non-final reference count on SUNRPC serv
0128  * @serv:  the svc_serv to have count decremented
0129  *
0130  * Returns: %true is refcount was decremented.
0131  *
0132  * If the refcount is 1, it is not decremented and instead failure is reported.
0133  */
0134 static inline bool svc_put_not_last(struct svc_serv *serv)
0135 {
0136     return refcount_dec_not_one(&serv->sv_refcnt.refcount);
0137 }
0138 
0139 /*
0140  * Maximum payload size supported by a kernel RPC server.
0141  * This is use to determine the max number of pages nfsd is
0142  * willing to return in a single READ operation.
0143  *
0144  * These happen to all be powers of 2, which is not strictly
0145  * necessary but helps enforce the real limitation, which is
0146  * that they should be multiples of PAGE_SIZE.
0147  *
0148  * For UDP transports, a block plus NFS,RPC, and UDP headers
0149  * has to fit into the IP datagram limit of 64K.  The largest
0150  * feasible number for all known page sizes is probably 48K,
0151  * but we choose 32K here.  This is the same as the historical
0152  * Linux limit; someone who cares more about NFS/UDP performance
0153  * can test a larger number.
0154  *
0155  * For TCP transports we have more freedom.  A size of 1MB is
0156  * chosen to match the client limit.  Other OSes are known to
0157  * have larger limits, but those numbers are probably beyond
0158  * the point of diminishing returns.
0159  */
0160 #define RPCSVC_MAXPAYLOAD   (1*1024*1024u)
0161 #define RPCSVC_MAXPAYLOAD_TCP   RPCSVC_MAXPAYLOAD
0162 #define RPCSVC_MAXPAYLOAD_UDP   (32*1024u)
0163 
0164 extern u32 svc_max_payload(const struct svc_rqst *rqstp);
0165 
0166 /*
0167  * RPC Requsts and replies are stored in one or more pages.
0168  * We maintain an array of pages for each server thread.
0169  * Requests are copied into these pages as they arrive.  Remaining
0170  * pages are available to write the reply into.
0171  *
0172  * Pages are sent using ->sendpage so each server thread needs to
0173  * allocate more to replace those used in sending.  To help keep track
0174  * of these pages we have a receive list where all pages initialy live,
0175  * and a send list where pages are moved to when there are to be part
0176  * of a reply.
0177  *
0178  * We use xdr_buf for holding responses as it fits well with NFS
0179  * read responses (that have a header, and some data pages, and possibly
0180  * a tail) and means we can share some client side routines.
0181  *
0182  * The xdr_buf.head kvec always points to the first page in the rq_*pages
0183  * list.  The xdr_buf.pages pointer points to the second page on that
0184  * list.  xdr_buf.tail points to the end of the first page.
0185  * This assumes that the non-page part of an rpc reply will fit
0186  * in a page - NFSd ensures this.  lockd also has no trouble.
0187  *
0188  * Each request/reply pair can have at most one "payload", plus two pages,
0189  * one for the request, and one for the reply.
0190  * We using ->sendfile to return read data, we might need one extra page
0191  * if the request is not page-aligned.  So add another '1'.
0192  */
0193 #define RPCSVC_MAXPAGES     ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE \
0194                 + 2 + 1)
0195 
0196 static inline u32 svc_getnl(struct kvec *iov)
0197 {
0198     __be32 val, *vp;
0199     vp = iov->iov_base;
0200     val = *vp++;
0201     iov->iov_base = (void*)vp;
0202     iov->iov_len -= sizeof(__be32);
0203     return ntohl(val);
0204 }
0205 
0206 static inline void svc_putnl(struct kvec *iov, u32 val)
0207 {
0208     __be32 *vp = iov->iov_base + iov->iov_len;
0209     *vp = htonl(val);
0210     iov->iov_len += sizeof(__be32);
0211 }
0212 
0213 static inline __be32 svc_getu32(struct kvec *iov)
0214 {
0215     __be32 val, *vp;
0216     vp = iov->iov_base;
0217     val = *vp++;
0218     iov->iov_base = (void*)vp;
0219     iov->iov_len -= sizeof(__be32);
0220     return val;
0221 }
0222 
0223 static inline void svc_ungetu32(struct kvec *iov)
0224 {
0225     __be32 *vp = (__be32 *)iov->iov_base;
0226     iov->iov_base = (void *)(vp - 1);
0227     iov->iov_len += sizeof(*vp);
0228 }
0229 
0230 static inline void svc_putu32(struct kvec *iov, __be32 val)
0231 {
0232     __be32 *vp = iov->iov_base + iov->iov_len;
0233     *vp = val;
0234     iov->iov_len += sizeof(__be32);
0235 }
0236 
0237 /*
0238  * The context of a single thread, including the request currently being
0239  * processed.
0240  */
0241 struct svc_rqst {
0242     struct list_head    rq_all;     /* all threads list */
0243     struct rcu_head     rq_rcu_head;    /* for RCU deferred kfree */
0244     struct svc_xprt *   rq_xprt;    /* transport ptr */
0245 
0246     struct sockaddr_storage rq_addr;    /* peer address */
0247     size_t          rq_addrlen;
0248     struct sockaddr_storage rq_daddr;   /* dest addr of request
0249                          *  - reply from here */
0250     size_t          rq_daddrlen;
0251 
0252     struct svc_serv *   rq_server;  /* RPC service definition */
0253     struct svc_pool *   rq_pool;    /* thread pool */
0254     const struct svc_procedure *rq_procinfo;/* procedure info */
0255     struct auth_ops *   rq_authop;  /* authentication flavour */
0256     struct svc_cred     rq_cred;    /* auth info */
0257     void *          rq_xprt_ctxt;   /* transport specific context ptr */
0258     struct svc_deferred_req*rq_deferred;    /* deferred request we are replaying */
0259 
0260     struct xdr_buf      rq_arg;
0261     struct xdr_stream   rq_arg_stream;
0262     struct xdr_stream   rq_res_stream;
0263     struct page     *rq_scratch_page;
0264     struct xdr_buf      rq_res;
0265     struct page     *rq_pages[RPCSVC_MAXPAGES + 1];
0266     struct page *       *rq_respages;   /* points into rq_pages */
0267     struct page *       *rq_next_page; /* next reply page to use */
0268     struct page *       *rq_page_end;  /* one past the last page */
0269 
0270     struct pagevec      rq_pvec;
0271     struct kvec     rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */
0272     struct bio_vec      rq_bvec[RPCSVC_MAXPAGES];
0273 
0274     __be32          rq_xid;     /* transmission id */
0275     u32         rq_prog;    /* program number */
0276     u32         rq_vers;    /* program version */
0277     u32         rq_proc;    /* procedure number */
0278     u32         rq_prot;    /* IP protocol */
0279     int         rq_cachetype;   /* catering to nfsd */
0280 #define RQ_SECURE   (0)         /* secure port */
0281 #define RQ_LOCAL    (1)         /* local request */
0282 #define RQ_USEDEFERRAL  (2)         /* use deferral */
0283 #define RQ_DROPME   (3)         /* drop current reply */
0284 #define RQ_SPLICE_OK    (4)         /* turned off in gss privacy
0285                          * to prevent encrypting page
0286                          * cache pages */
0287 #define RQ_VICTIM   (5)         /* about to be shut down */
0288 #define RQ_BUSY     (6)         /* request is busy */
0289 #define RQ_DATA     (7)         /* request has data */
0290     unsigned long       rq_flags;   /* flags field */
0291     ktime_t         rq_qtime;   /* enqueue time */
0292 
0293     void *          rq_argp;    /* decoded arguments */
0294     void *          rq_resp;    /* xdr'd results */
0295     void *          rq_auth_data;   /* flavor-specific data */
0296     __be32          rq_auth_stat;   /* authentication status */
0297     int         rq_auth_slack;  /* extra space xdr code
0298                          * should leave in head
0299                          * for krb5i, krb5p.
0300                          */
0301     int         rq_reserved;    /* space on socket outq
0302                          * reserved for this request
0303                          */
0304     ktime_t         rq_stime;   /* start time */
0305 
0306     struct cache_req    rq_chandle; /* handle passed to caches for 
0307                          * request delaying 
0308                          */
0309     /* Catering to nfsd */
0310     struct auth_domain *    rq_client;  /* RPC peer info */
0311     struct auth_domain *    rq_gssclient;   /* "gss/"-style peer info */
0312     struct svc_cacherep *   rq_cacherep;    /* cache info */
0313     struct task_struct  *rq_task;   /* service thread */
0314     spinlock_t      rq_lock;    /* per-request lock */
0315     struct net      *rq_bc_net; /* pointer to backchannel's
0316                          * net namespace
0317                          */
0318     void **         rq_lease_breaker; /* The v4 client breaking a lease */
0319 };
0320 
0321 #define SVC_NET(rqst) (rqst->rq_xprt ? rqst->rq_xprt->xpt_net : rqst->rq_bc_net)
0322 
0323 /*
0324  * Rigorous type checking on sockaddr type conversions
0325  */
0326 static inline struct sockaddr_in *svc_addr_in(const struct svc_rqst *rqst)
0327 {
0328     return (struct sockaddr_in *) &rqst->rq_addr;
0329 }
0330 
0331 static inline struct sockaddr_in6 *svc_addr_in6(const struct svc_rqst *rqst)
0332 {
0333     return (struct sockaddr_in6 *) &rqst->rq_addr;
0334 }
0335 
0336 static inline struct sockaddr *svc_addr(const struct svc_rqst *rqst)
0337 {
0338     return (struct sockaddr *) &rqst->rq_addr;
0339 }
0340 
0341 static inline struct sockaddr_in *svc_daddr_in(const struct svc_rqst *rqst)
0342 {
0343     return (struct sockaddr_in *) &rqst->rq_daddr;
0344 }
0345 
0346 static inline struct sockaddr_in6 *svc_daddr_in6(const struct svc_rqst *rqst)
0347 {
0348     return (struct sockaddr_in6 *) &rqst->rq_daddr;
0349 }
0350 
0351 static inline struct sockaddr *svc_daddr(const struct svc_rqst *rqst)
0352 {
0353     return (struct sockaddr *) &rqst->rq_daddr;
0354 }
0355 
0356 /*
0357  * Check buffer bounds after decoding arguments
0358  */
0359 static inline int
0360 xdr_argsize_check(struct svc_rqst *rqstp, __be32 *p)
0361 {
0362     char *cp = (char *)p;
0363     struct kvec *vec = &rqstp->rq_arg.head[0];
0364     return cp >= (char*)vec->iov_base
0365         && cp <= (char*)vec->iov_base + vec->iov_len;
0366 }
0367 
0368 static inline int
0369 xdr_ressize_check(struct svc_rqst *rqstp, __be32 *p)
0370 {
0371     struct kvec *vec = &rqstp->rq_res.head[0];
0372     char *cp = (char*)p;
0373 
0374     vec->iov_len = cp - (char*)vec->iov_base;
0375 
0376     return vec->iov_len <= PAGE_SIZE;
0377 }
0378 
0379 static inline void svc_free_res_pages(struct svc_rqst *rqstp)
0380 {
0381     while (rqstp->rq_next_page != rqstp->rq_respages) {
0382         struct page **pp = --rqstp->rq_next_page;
0383         if (*pp) {
0384             put_page(*pp);
0385             *pp = NULL;
0386         }
0387     }
0388 }
0389 
0390 struct svc_deferred_req {
0391     u32         prot;   /* protocol (UDP or TCP) */
0392     struct svc_xprt     *xprt;
0393     struct sockaddr_storage addr;   /* where reply must go */
0394     size_t          addrlen;
0395     struct sockaddr_storage daddr;  /* where reply must come from */
0396     size_t          daddrlen;
0397     void            *xprt_ctxt;
0398     struct cache_deferred_req handle;
0399     int         argslen;
0400     __be32          args[];
0401 };
0402 
0403 struct svc_process_info {
0404     union {
0405         int  (*dispatch)(struct svc_rqst *, __be32 *);
0406         struct {
0407             unsigned int lovers;
0408             unsigned int hivers;
0409         } mismatch;
0410     };
0411 };
0412 
0413 /*
0414  * List of RPC programs on the same transport endpoint
0415  */
0416 struct svc_program {
0417     struct svc_program *    pg_next;    /* other programs (same xprt) */
0418     u32         pg_prog;    /* program number */
0419     unsigned int        pg_lovers;  /* lowest version */
0420     unsigned int        pg_hivers;  /* highest version */
0421     unsigned int        pg_nvers;   /* number of versions */
0422     const struct svc_version **pg_vers; /* version array */
0423     char *          pg_name;    /* service name */
0424     char *          pg_class;   /* class name: services sharing authentication */
0425     struct svc_stat *   pg_stats;   /* rpc statistics */
0426     int         (*pg_authenticate)(struct svc_rqst *);
0427     __be32          (*pg_init_request)(struct svc_rqst *,
0428                            const struct svc_program *,
0429                            struct svc_process_info *);
0430     int         (*pg_rpcbind_set)(struct net *net,
0431                           const struct svc_program *,
0432                           u32 version, int family,
0433                           unsigned short proto,
0434                           unsigned short port);
0435 };
0436 
0437 /*
0438  * RPC program version
0439  */
0440 struct svc_version {
0441     u32         vs_vers;    /* version number */
0442     u32         vs_nproc;   /* number of procedures */
0443     const struct svc_procedure *vs_proc;    /* per-procedure info */
0444     unsigned int        *vs_count;  /* call counts */
0445     u32         vs_xdrsize; /* xdrsize needed for this version */
0446 
0447     /* Don't register with rpcbind */
0448     bool            vs_hidden;
0449 
0450     /* Don't care if the rpcbind registration fails */
0451     bool            vs_rpcb_optnl;
0452 
0453     /* Need xprt with congestion control */
0454     bool            vs_need_cong_ctrl;
0455 
0456     /* Dispatch function */
0457     int         (*vs_dispatch)(struct svc_rqst *, __be32 *);
0458 };
0459 
0460 /*
0461  * RPC procedure info
0462  */
0463 struct svc_procedure {
0464     /* process the request: */
0465     __be32          (*pc_func)(struct svc_rqst *);
0466     /* XDR decode args: */
0467     bool            (*pc_decode)(struct svc_rqst *rqstp,
0468                          struct xdr_stream *xdr);
0469     /* XDR encode result: */
0470     bool            (*pc_encode)(struct svc_rqst *rqstp,
0471                          struct xdr_stream *xdr);
0472     /* XDR free result: */
0473     void            (*pc_release)(struct svc_rqst *);
0474     unsigned int        pc_argsize; /* argument struct size */
0475     unsigned int        pc_ressize; /* result struct size */
0476     unsigned int        pc_cachetype;   /* cache info (NFS) */
0477     unsigned int        pc_xdrressize;  /* maximum size of XDR reply */
0478     const char *        pc_name;    /* for display */
0479 };
0480 
0481 /*
0482  * Function prototypes.
0483  */
0484 int svc_rpcb_setup(struct svc_serv *serv, struct net *net);
0485 void svc_rpcb_cleanup(struct svc_serv *serv, struct net *net);
0486 int svc_bind(struct svc_serv *serv, struct net *net);
0487 struct svc_serv *svc_create(struct svc_program *, unsigned int,
0488                 int (*threadfn)(void *data));
0489 struct svc_rqst *svc_rqst_alloc(struct svc_serv *serv,
0490                     struct svc_pool *pool, int node);
0491 void           svc_rqst_replace_page(struct svc_rqst *rqstp,
0492                      struct page *page);
0493 void           svc_rqst_free(struct svc_rqst *);
0494 void           svc_exit_thread(struct svc_rqst *);
0495 struct svc_serv *  svc_create_pooled(struct svc_program *, unsigned int,
0496                      int (*threadfn)(void *data));
0497 int        svc_set_num_threads(struct svc_serv *, struct svc_pool *, int);
0498 int        svc_pool_stats_open(struct svc_serv *serv, struct file *file);
0499 int        svc_process(struct svc_rqst *);
0500 int        bc_svc_process(struct svc_serv *, struct rpc_rqst *,
0501             struct svc_rqst *);
0502 int        svc_register(const struct svc_serv *, struct net *, const int,
0503                 const unsigned short, const unsigned short);
0504 
0505 void           svc_wake_up(struct svc_serv *);
0506 void           svc_reserve(struct svc_rqst *rqstp, int space);
0507 struct svc_pool   *svc_pool_for_cpu(struct svc_serv *serv);
0508 char *         svc_print_addr(struct svc_rqst *, char *, size_t);
0509 const char *       svc_proc_name(const struct svc_rqst *rqstp);
0510 int        svc_encode_result_payload(struct svc_rqst *rqstp,
0511                          unsigned int offset,
0512                          unsigned int length);
0513 unsigned int       svc_fill_write_vector(struct svc_rqst *rqstp,
0514                      struct xdr_buf *payload);
0515 char          *svc_fill_symlink_pathname(struct svc_rqst *rqstp,
0516                          struct kvec *first, void *p,
0517                          size_t total);
0518 __be32         svc_generic_init_request(struct svc_rqst *rqstp,
0519                         const struct svc_program *progp,
0520                         struct svc_process_info *procinfo);
0521 int        svc_generic_rpcbind_set(struct net *net,
0522                        const struct svc_program *progp,
0523                        u32 version, int family,
0524                        unsigned short proto,
0525                        unsigned short port);
0526 int        svc_rpcbind_set_version(struct net *net,
0527                        const struct svc_program *progp,
0528                        u32 version, int family,
0529                        unsigned short proto,
0530                        unsigned short port);
0531 
0532 #define RPC_MAX_ADDRBUFLEN  (63U)
0533 
0534 /*
0535  * When we want to reduce the size of the reserved space in the response
0536  * buffer, we need to take into account the size of any checksum data that
0537  * may be at the end of the packet. This is difficult to determine exactly
0538  * for all cases without actually generating the checksum, so we just use a
0539  * static value.
0540  */
0541 static inline void svc_reserve_auth(struct svc_rqst *rqstp, int space)
0542 {
0543     svc_reserve(rqstp, space + rqstp->rq_auth_slack);
0544 }
0545 
0546 /**
0547  * svcxdr_init_decode - Prepare an xdr_stream for svc Call decoding
0548  * @rqstp: controlling server RPC transaction context
0549  *
0550  */
0551 static inline void svcxdr_init_decode(struct svc_rqst *rqstp)
0552 {
0553     struct xdr_stream *xdr = &rqstp->rq_arg_stream;
0554     struct kvec *argv = rqstp->rq_arg.head;
0555 
0556     xdr_init_decode(xdr, &rqstp->rq_arg, argv->iov_base, NULL);
0557     xdr_set_scratch_page(xdr, rqstp->rq_scratch_page);
0558 }
0559 
0560 /**
0561  * svcxdr_init_encode - Prepare an xdr_stream for svc Reply encoding
0562  * @rqstp: controlling server RPC transaction context
0563  *
0564  */
0565 static inline void svcxdr_init_encode(struct svc_rqst *rqstp)
0566 {
0567     struct xdr_stream *xdr = &rqstp->rq_res_stream;
0568     struct xdr_buf *buf = &rqstp->rq_res;
0569     struct kvec *resv = buf->head;
0570 
0571     xdr_reset_scratch_buffer(xdr);
0572 
0573     xdr->buf = buf;
0574     xdr->iov = resv;
0575     xdr->p   = resv->iov_base + resv->iov_len;
0576     xdr->end = resv->iov_base + PAGE_SIZE - rqstp->rq_auth_slack;
0577     buf->len = resv->iov_len;
0578     xdr->page_ptr = buf->pages - 1;
0579     buf->buflen = PAGE_SIZE * (1 + rqstp->rq_page_end - buf->pages);
0580     buf->buflen -= rqstp->rq_auth_slack;
0581     xdr->rqst = NULL;
0582 }
0583 
0584 #endif /* SUNRPC_SVC_H */