Merge tag 'kvm-arm-for-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[deliverable/linux.git] / include / linux / sunrpc / stats.h
CommitLineData
1da177e4
LT
1/*
2 * linux/include/linux/sunrpc/stats.h
3 *
4 * Client statistics collection for SUN RPC
5 *
6 * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de>
7 */
8
9#ifndef _LINUX_SUNRPC_STATS_H
10#define _LINUX_SUNRPC_STATS_H
11
1da177e4
LT
12#include <linux/proc_fs.h>
13
14struct rpc_stat {
a613fa16 15 const struct rpc_program *program;
1da177e4
LT
16
17 unsigned int netcnt,
18 netudpcnt,
19 nettcpcnt,
20 nettcpconn,
21 netreconn;
22 unsigned int rpccnt,
23 rpcretrans,
24 rpcauthrefresh,
25 rpcgarbage;
26};
27
28struct svc_stat {
29 struct svc_program * program;
30
31 unsigned int netcnt,
32 netudpcnt,
33 nettcpcnt,
34 nettcpconn;
35 unsigned int rpccnt,
36 rpcbadfmt,
37 rpcbadauth,
38 rpcbadclnt;
39};
40
4f42d0d5
PE
41struct net;
42#ifdef CONFIG_PROC_FS
43int rpc_proc_init(struct net *);
44void rpc_proc_exit(struct net *);
45#else
46static inline int rpc_proc_init(struct net *net)
47{
48 return 0;
49}
50
51static inline void rpc_proc_exit(struct net *net)
52{
53}
54#endif
55
1da177e4
LT
56#ifdef MODULE
57void rpc_modcount(struct inode *, int);
58#endif
59
60#ifdef CONFIG_PROC_FS
ec7652aa
SK
61struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
62void rpc_proc_unregister(struct net *,const char *);
a613fa16 63void rpc_proc_zero(const struct rpc_program *);
246590f5 64struct proc_dir_entry * svc_proc_register(struct net *, struct svc_stat *,
99ac48f5 65 const struct file_operations *);
246590f5 66void svc_proc_unregister(struct net *, const char *);
1da177e4
LT
67
68void svc_seq_show(struct seq_file *,
69 const struct svc_stat *);
1da177e4
LT
70#else
71
cc9f4be5
RD
72static inline struct proc_dir_entry *rpc_proc_register(struct net *net, struct rpc_stat *s) { return NULL; }
73static inline void rpc_proc_unregister(struct net *net, const char *p) {}
a613fa16 74static inline void rpc_proc_zero(const struct rpc_program *p) {}
1da177e4 75
246590f5 76static inline struct proc_dir_entry *svc_proc_register(struct net *net, struct svc_stat *s,
99ac48f5 77 const struct file_operations *f) { return NULL; }
246590f5 78static inline void svc_proc_unregister(struct net *net, const char *p) {}
1da177e4
LT
79
80static inline void svc_seq_show(struct seq_file *seq,
81 const struct svc_stat *st) {}
1da177e4
LT
82#endif
83
84#endif /* _LINUX_SUNRPC_STATS_H */
This page took 1.577382 seconds and 5 git commands to generate.