aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorHans Schillstrom <hans.schillstrom@ericsson.com>2011-01-03 08:44:55 -0500
committerSimon Horman <horms@verge.net.au>2011-01-12 20:30:28 -0500
commitf131315fa272d337dfca7dad2f033ff5296dad65 (patch)
tree4abe0b8cd421229e27be614e23e3bbc800dff98b /include/net
parent29c2026fd4980c144d9c746dc1565060f08e5796 (diff)
IPVS: netns awareness to ip_vs_sync
All global variables moved to struct ipvs, most external changes fixed (i.e. init_net removed) in sync_buf create + 4 replaced by sizeof(struct..) 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.h14
-rw-r--r--include/net/netns/ip_vs.h16
2 files changed, 21 insertions, 9 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index c08927bb1728..4265b5e00c94 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -958,7 +958,7 @@ extern struct ip_vs_stats ip_vs_stats;
958extern const struct ctl_path net_vs_ctl_path[]; 958extern const struct ctl_path net_vs_ctl_path[];
959extern int sysctl_ip_vs_sync_ver; 959extern int sysctl_ip_vs_sync_ver;
960 960
961extern void ip_vs_sync_switch_mode(int mode); 961extern void ip_vs_sync_switch_mode(struct net *net, int mode);
962extern struct ip_vs_service * 962extern struct ip_vs_service *
963ip_vs_service_get(struct net *net, int af, __u32 fwmark, __u16 protocol, 963ip_vs_service_get(struct net *net, int af, __u32 fwmark, __u16 protocol,
964 const union nf_inet_addr *vaddr, __be16 vport); 964 const union nf_inet_addr *vaddr, __be16 vport);
@@ -987,14 +987,10 @@ extern struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp);
987 * IPVS sync daemon data and function prototypes 987 * IPVS sync daemon data and function prototypes
988 * (from ip_vs_sync.c) 988 * (from ip_vs_sync.c)
989 */ 989 */
990extern volatile int ip_vs_sync_state; 990extern int start_sync_thread(struct net *net, int state, char *mcast_ifn,
991extern volatile int ip_vs_master_syncid; 991 __u8 syncid);
992extern volatile int ip_vs_backup_syncid; 992extern int stop_sync_thread(struct net *net, int state);
993extern char ip_vs_master_mcast_ifn[IP_VS_IFNAME_MAXLEN]; 993extern void ip_vs_sync_conn(struct net *net, struct ip_vs_conn *cp);
994extern char ip_vs_backup_mcast_ifn[IP_VS_IFNAME_MAXLEN];
995extern int start_sync_thread(int state, char *mcast_ifn, __u8 syncid);
996extern int stop_sync_thread(int state);
997extern void ip_vs_sync_conn(struct ip_vs_conn *cp);
998extern int ip_vs_sync_init(void); 994extern int ip_vs_sync_init(void);
999extern void ip_vs_sync_cleanup(void); 995extern void ip_vs_sync_cleanup(void);
1000 996
diff --git a/include/net/netns/ip_vs.h b/include/net/netns/ip_vs.h
index db0240198339..aba78f3c8341 100644
--- a/include/net/netns/ip_vs.h
+++ b/include/net/netns/ip_vs.h
@@ -74,6 +74,22 @@ struct netns_ipvs {
74 struct list_head est_list; /* estimator list */ 74 struct list_head est_list; /* estimator list */
75 spinlock_t est_lock; 75 spinlock_t est_lock;
76 struct timer_list est_timer; /* Estimation timer */ 76 struct timer_list est_timer; /* Estimation timer */
77 /* ip_vs_sync */
78 struct list_head sync_queue;
79 spinlock_t sync_lock;
80 struct ip_vs_sync_buff *sync_buff;
81 spinlock_t sync_buff_lock;
82 struct sockaddr_in sync_mcast_addr;
83 struct task_struct *master_thread;
84 struct task_struct *backup_thread;
85 int send_mesg_maxlen;
86 int recv_mesg_maxlen;
87 volatile int sync_state;
88 volatile int master_syncid;
89 volatile int backup_syncid;
90 /* multicast interface name */
91 char master_mcast_ifn[IP_VS_IFNAME_MAXLEN];
92 char backup_mcast_ifn[IP_VS_IFNAME_MAXLEN];
77}; 93};
78 94
79#endif /* IP_VS_H_ */ 95#endif /* IP_VS_H_ */