Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
svc.c File Reference
#include <linux/linkage.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/net.h>
#include <linux/in.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/slab.h>
#include <linux/nsproxy.h>
#include <linux/sunrpc/types.h>
#include <linux/sunrpc/xdr.h>
#include <linux/sunrpc/stats.h>
#include <linux/sunrpc/svcsock.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/bc_xprt.h>

Go to the source code of this file.

Data Structures

struct  svc_pool_map
 

Macros

#define RPCDBG_FACILITY   RPCDBG_SVCDSP
 
#define svc_serv_is_pooled(serv)   ((serv)->sv_function)
 
#define SVC_POOL_DEFAULT   SVC_POOL_GLOBAL
 

Enumerations

enum  { SVC_POOL_AUTO = -1, SVC_POOL_GLOBAL, SVC_POOL_PERCPU, SVC_POOL_PERNODE }
 

Functions

 module_param_call (pool_mode, param_set_pool_mode, param_get_pool_mode,&svc_pool_map.mode, 0644)
 
struct svc_poolsvc_pool_for_cpu (struct svc_serv *serv, int cpu)
 
int svc_rpcb_setup (struct svc_serv *serv, struct net *net)
 
 EXPORT_SYMBOL_GPL (svc_rpcb_setup)
 
void svc_rpcb_cleanup (struct svc_serv *serv, struct net *net)
 
 EXPORT_SYMBOL_GPL (svc_rpcb_cleanup)
 
int svc_bind (struct svc_serv *serv, struct net *net)
 
 EXPORT_SYMBOL_GPL (svc_bind)
 
struct svc_servsvc_create (struct svc_program *prog, unsigned int bufsize, void(*shutdown)(struct svc_serv *serv, struct net *net))
 
 EXPORT_SYMBOL_GPL (svc_create)
 
struct svc_servsvc_create_pooled (struct svc_program *prog, unsigned int bufsize, void(*shutdown)(struct svc_serv *serv, struct net *net), svc_thread_fn func, struct module *mod)
 
 EXPORT_SYMBOL_GPL (svc_create_pooled)
 
void svc_shutdown_net (struct svc_serv *serv, struct net *net)
 
 EXPORT_SYMBOL_GPL (svc_shutdown_net)
 
void svc_destroy (struct svc_serv *serv)
 
 EXPORT_SYMBOL_GPL (svc_destroy)
 
struct svc_rqstsvc_prepare_thread (struct svc_serv *serv, struct svc_pool *pool, int node)
 
 EXPORT_SYMBOL_GPL (svc_prepare_thread)
 
int svc_set_num_threads (struct svc_serv *serv, struct svc_pool *pool, int nrservs)
 
 EXPORT_SYMBOL_GPL (svc_set_num_threads)
 
void svc_exit_thread (struct svc_rqst *rqstp)
 
 EXPORT_SYMBOL_GPL (svc_exit_thread)
 
int svc_register (const struct svc_serv *serv, struct net *net, const int family, const unsigned short proto, const unsigned short port)
 
 EXPORT_SYMBOL_GPL (svc_process)
 
int svc_process (struct svc_rqst *rqstp)
 
u32 svc_max_payload (const struct svc_rqst *rqstp)
 
 EXPORT_SYMBOL_GPL (svc_max_payload)
 

Macro Definition Documentation

#define RPCDBG_FACILITY   RPCDBG_SVCDSP

Definition at line 32 of file svc.c.

#define SVC_POOL_DEFAULT   SVC_POOL_GLOBAL

Definition at line 48 of file svc.c.

#define svc_serv_is_pooled (   serv)    ((serv)->sv_function)

Definition at line 36 of file svc.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
SVC_POOL_AUTO 
SVC_POOL_GLOBAL 
SVC_POOL_PERCPU 
SVC_POOL_PERNODE 

Definition at line 41 of file svc.c.

Function Documentation

EXPORT_SYMBOL_GPL ( svc_rpcb_setup  )
EXPORT_SYMBOL_GPL ( svc_rpcb_cleanup  )
EXPORT_SYMBOL_GPL ( svc_bind  )
EXPORT_SYMBOL_GPL ( svc_create  )
EXPORT_SYMBOL_GPL ( svc_create_pooled  )
EXPORT_SYMBOL_GPL ( svc_shutdown_net  )
EXPORT_SYMBOL_GPL ( svc_destroy  )
EXPORT_SYMBOL_GPL ( svc_prepare_thread  )
EXPORT_SYMBOL_GPL ( svc_set_num_threads  )
EXPORT_SYMBOL_GPL ( svc_exit_thread  )
EXPORT_SYMBOL_GPL ( svc_process  )
EXPORT_SYMBOL_GPL ( svc_max_payload  )
module_param_call ( pool_mode  ,
param_set_pool_mode  ,
param_get_pool_mode  ,
&svc_pool_map.  mode,
0644   
)
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 prog,
unsigned int  bufsize,
void(*)(struct svc_serv *serv, struct net *net shutdown 
)
read

Definition at line 489 of file svc.c.

struct svc_serv* svc_create_pooled ( struct svc_program prog,
unsigned int  bufsize,
void(*)(struct svc_serv *serv, struct net *net shutdown,
svc_thread_fn  func,
struct module mod 
)
read

Definition at line 497 of file svc.c.

void svc_destroy ( struct svc_serv serv)

Definition at line 538 of file svc.c.

void svc_exit_thread ( struct svc_rqst rqstp)

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.

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.

int svc_process ( struct svc_rqst rqstp)

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_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 serv,
struct svc_pool pool,
int  nrservs 
)

Definition at line 717 of file svc.c.

void svc_shutdown_net ( struct svc_serv serv,
struct net net 
)

Definition at line 515 of file svc.c.