Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
svc.h File Reference
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/sunrpc/types.h>
#include <linux/sunrpc/xdr.h>
#include <linux/sunrpc/auth.h>
#include <linux/sunrpc/svcauth.h>
#include <linux/wait.h>
#include <linux/mm.h>

Go to the source code of this file.

Data Structures

struct  svc_pool_stats
 
struct  svc_pool
 
struct  svc_serv
 
struct  svc_rqst
 
struct  svc_deferred_req
 
struct  svc_program
 
struct  svc_version
 
struct  svc_procedure
 

Macros

#define RPCSVC_MAXPAYLOAD   (1*1024*1024u)
 
#define RPCSVC_MAXPAYLOAD_TCP   RPCSVC_MAXPAYLOAD
 
#define RPCSVC_MAXPAYLOAD_UDP   (32*1024u)
 
#define RPCSVC_MAXPAGES
 
#define SVC_NET(svc_rqst)   (svc_rqst->rq_xprt->xpt_net)
 
#define RPC_MAX_ADDRBUFLEN   (63U)
 

Typedefs

typedef int(* svc_thread_fn )(void *)
 
typedef __be32(* svc_procfunc )(struct svc_rqst *, void *argp, void *resp)
 

Functions

u32 svc_max_payload (const struct svc_rqst *rqstp)
 
int svc_rpcb_setup (struct svc_serv *serv, struct net *net)
 
void svc_rpcb_cleanup (struct svc_serv *serv, struct net *net)
 
int svc_bind (struct svc_serv *serv, struct net *net)
 
struct svc_servsvc_create (struct svc_program *, unsigned int, void(*shutdown)(struct svc_serv *, struct net *net))
 
struct svc_rqstsvc_prepare_thread (struct svc_serv *serv, struct svc_pool *pool, int node)
 
void svc_exit_thread (struct svc_rqst *)
 
struct svc_servsvc_create_pooled (struct svc_program *, unsigned int, void(*shutdown)(struct svc_serv *, struct net *net), svc_thread_fn, struct module *)
 
int svc_set_num_threads (struct svc_serv *, struct svc_pool *, int)
 
int svc_pool_stats_open (struct svc_serv *serv, struct file *file)
 
void svc_destroy (struct svc_serv *)
 
void svc_shutdown_net (struct svc_serv *, struct net *)
 
int svc_process (struct svc_rqst *)
 
int bc_svc_process (struct svc_serv *, struct rpc_rqst *, struct svc_rqst *)
 
int svc_register (const struct svc_serv *, struct net *, const int, const unsigned short, const unsigned short)
 
void svc_wake_up (struct svc_serv *)
 
void svc_reserve (struct svc_rqst *rqstp, int space)
 
struct svc_poolsvc_pool_for_cpu (struct svc_serv *serv, int cpu)
 
charsvc_print_addr (struct svc_rqst *, char *, size_t)
 

Variables

struct svc_pool ____cacheline_aligned_in_smp
 

Macro Definition Documentation

#define RPC_MAX_ADDRBUFLEN   (63U)

Definition at line 444 of file svc.h.

#define RPCSVC_MAXPAGES
Value:

Definition at line 172 of file svc.h.

#define RPCSVC_MAXPAYLOAD   (1*1024*1024u)

Definition at line 139 of file svc.h.

#define RPCSVC_MAXPAYLOAD_TCP   RPCSVC_MAXPAYLOAD

Definition at line 140 of file svc.h.

#define RPCSVC_MAXPAYLOAD_UDP   (32*1024u)

Definition at line 141 of file svc.h.

#define SVC_NET (   svc_rqst)    (svc_rqst->rq_xprt->xpt_net)

Definition at line 281 of file svc.h.

Typedef Documentation

typedef __be32(* svc_procfunc)(struct svc_rqst *, void *argp, void *resp)

Definition at line 402 of file svc.h.

typedef int(* svc_thread_fn)(void *)

Definition at line 25 of file svc.h.

Function Documentation

int bc_svc_process ( struct svc_serv ,
struct rpc_rqst *  ,
struct svc_rqst  
)
int svc_bind ( struct svc_serv serv,
struct net net 
)

Definition at line 410 of file svc.c.

struct svc_serv* svc_create ( struct svc_program ,
unsigned  int,
void(*)(struct svc_serv *, struct net *net shutdown 
)
read
struct svc_serv* svc_create_pooled ( struct svc_program ,
unsigned  int,
void(*)(struct svc_serv *, struct net *net shutdown,
svc_thread_fn  ,
struct module  
)
read
void svc_destroy ( struct svc_serv )

Definition at line 538 of file svc.c.

void svc_exit_thread ( struct svc_rqst )

Definition at line 780 of file svc.c.

u32 svc_max_payload ( const struct svc_rqst rqstp)

Definition at line 1388 of file svc.c.

struct svc_pool* svc_pool_for_cpu ( struct svc_serv serv,
int  cpu 
)
read

Definition at line 349 of file svc.c.

int svc_pool_stats_open ( struct svc_serv serv,
struct file file 
)

Definition at line 1311 of file svc_xprt.c.

struct svc_rqst* svc_prepare_thread ( struct svc_serv serv,
struct svc_pool pool,
int  node 
)
read

Definition at line 613 of file svc.c.

char* svc_print_addr ( struct svc_rqst rqstp,
char buf,
size_t  len 
)

svc_print_addr - Format rq_addr field for printing : svc_rqst struct containing address to print : target buffer for formatted address : length of target buffer

Definition at line 302 of file svc_xprt.c.

int svc_process ( struct svc_rqst )

Definition at line 1291 of file svc.c.

int svc_register ( const struct svc_serv serv,
struct net net,
const int  family,
const unsigned short  proto,
const unsigned short  port 
)

svc_register - register an RPC service with the local portmapper : svc_serv struct for the service to register : net namespace for the service to register : protocol family of service's listener socket : transport protocol number to advertise : port to advertise

Service is registered for any address in the passed-in protocol family

Definition at line 941 of file svc.c.

void svc_reserve ( struct svc_rqst rqstp,
int  space 
)

svc_reserve - change the space reserved for the reply to a request. : The request in question : new max space to reserve

Each request reserves some space on the output queue of the transport to make sure the reply fits. This function reduces that reserved space to be the amount of space used already, plus .

Definition at line 431 of file svc_xprt.c.

void svc_rpcb_cleanup ( struct svc_serv serv,
struct net net 
)

Definition at line 386 of file svc.c.

int svc_rpcb_setup ( struct svc_serv serv,
struct net net 
)

Definition at line 372 of file svc.c.

int svc_set_num_threads ( struct svc_serv ,
struct svc_pool ,
int   
)

Definition at line 717 of file svc.c.

void svc_shutdown_net ( struct svc_serv ,
struct net  
)

Definition at line 515 of file svc.c.

void svc_wake_up ( struct svc_serv )

Definition at line 480 of file svc_xprt.c.

Variable Documentation

struct svc_pool ____cacheline_aligned_in_smp