aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorHans Schillstrom <hans.schillstrom@ericsson.com>2011-01-03 08:44:53 -0500
committerSimon Horman <horms@verge.net.au>2011-01-12 20:30:28 -0500
commitab8a5e8408c3df2d654611bffc3aaf04f418b266 (patch)
tree665454a0426b9209a53018ee71103914b29d95a7 /include/net
parent9bbac6a904d0816dae58b454692c54d6773cc20d (diff)
IPVS: netns awareness to ip_vs_app
All variables moved to struct ipvs, most external changes fixed (i.e. init_net removed) in ip_vs_protocol param struct net *net added to: - register_app() - unregister_app() This affected almost all proto_xxx.c files Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip_vs.h12
-rw-r--r--include/net/netns/ip_vs.h5
2 files changed, 11 insertions, 6 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index cc6ae621a9b5..0cdd8ce454c2 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -402,9 +402,9 @@ struct ip_vs_protocol {
402 const struct sk_buff *skb, 402 const struct sk_buff *skb,
403 struct ip_vs_proto_data *pd); 403 struct ip_vs_proto_data *pd);
404 404
405 int (*register_app)(struct ip_vs_app *inc); 405 int (*register_app)(struct net *net, struct ip_vs_app *inc);
406 406
407 void (*unregister_app)(struct ip_vs_app *inc); 407 void (*unregister_app)(struct net *net, struct ip_vs_app *inc);
408 408
409 int (*app_conn_bind)(struct ip_vs_conn *cp); 409 int (*app_conn_bind)(struct ip_vs_conn *cp);
410 410
@@ -871,12 +871,12 @@ ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp)
871 * (from ip_vs_app.c) 871 * (from ip_vs_app.c)
872 */ 872 */
873#define IP_VS_APP_MAX_PORTS 8 873#define IP_VS_APP_MAX_PORTS 8
874extern int register_ip_vs_app(struct ip_vs_app *app); 874extern int register_ip_vs_app(struct net *net, struct ip_vs_app *app);
875extern void unregister_ip_vs_app(struct ip_vs_app *app); 875extern void unregister_ip_vs_app(struct net *net, struct ip_vs_app *app);
876extern int ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp); 876extern int ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp);
877extern void ip_vs_unbind_app(struct ip_vs_conn *cp); 877extern void ip_vs_unbind_app(struct ip_vs_conn *cp);
878extern int 878extern int register_ip_vs_app_inc(struct net *net, struct ip_vs_app *app,
879register_ip_vs_app_inc(struct ip_vs_app *app, __u16 proto, __u16 port); 879 __u16 proto, __u16 port);
880extern int ip_vs_app_inc_get(struct ip_vs_app *inc); 880extern int ip_vs_app_inc_get(struct ip_vs_app *inc);
881extern void ip_vs_app_inc_put(struct ip_vs_app *inc); 881extern void ip_vs_app_inc_put(struct ip_vs_app *inc);
882 882
diff --git a/include/net/netns/ip_vs.h b/include/net/netns/ip_vs.h
index 58bd3fd85a97..03f7fe1bede6 100644
--- a/include/net/netns/ip_vs.h
+++ b/include/net/netns/ip_vs.h
@@ -28,6 +28,11 @@ struct netns_ipvs {
28 #define IP_VS_RTAB_MASK (IP_VS_RTAB_SIZE - 1) 28 #define IP_VS_RTAB_MASK (IP_VS_RTAB_SIZE - 1)
29 29
30 struct list_head rs_table[IP_VS_RTAB_SIZE]; 30 struct list_head rs_table[IP_VS_RTAB_SIZE];
31 /* ip_vs_app */
32 struct list_head app_list;
33 struct mutex app_mutex;
34 struct lock_class_key app_key; /* mutex debuging */
35
31 /* ip_vs_proto */ 36 /* ip_vs_proto */
32 #define IP_VS_PROTO_TAB_SIZE 32 /* must be power of 2 */ 37 #define IP_VS_PROTO_TAB_SIZE 32 /* must be power of 2 */
33 struct ip_vs_proto_data *proto_data_table[IP_VS_PROTO_TAB_SIZE]; 38 struct ip_vs_proto_data *proto_data_table[IP_VS_PROTO_TAB_SIZE];