diff options
| author | David S. Miller <davem@davemloft.net> | 2011-03-02 14:30:24 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2011-03-02 14:30:24 -0500 |
| commit | 3872b284087081ee5cb0e4630954c2f7a2153cf5 (patch) | |
| tree | ead36598e35730e419edcf42dc788290af9e3d5b /include | |
| parent | 07df5294a753dfac2cc9f75e6159fc25fdc22149 (diff) | |
| parent | 8a80c79a776d1b1b54895314ffaf53d0c7604c80 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ip_vs.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 5d75feadf4f4..e74da41ebd1b 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
| @@ -494,7 +494,7 @@ struct ip_vs_conn_param { | |||
| 494 | * IP_VS structure allocated for each dynamically scheduled connection | 494 | * IP_VS structure allocated for each dynamically scheduled connection |
| 495 | */ | 495 | */ |
| 496 | struct ip_vs_conn { | 496 | struct ip_vs_conn { |
| 497 | struct list_head c_list; /* hashed list heads */ | 497 | struct hlist_node c_list; /* hashed list heads */ |
| 498 | #ifdef CONFIG_NET_NS | 498 | #ifdef CONFIG_NET_NS |
| 499 | struct net *net; /* Name space */ | 499 | struct net *net; /* Name space */ |
| 500 | #endif | 500 | #endif |
| @@ -1019,6 +1019,8 @@ ip_vs_schedule(struct ip_vs_service *svc, struct sk_buff *skb, | |||
| 1019 | extern int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb, | 1019 | extern int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb, |
| 1020 | struct ip_vs_proto_data *pd); | 1020 | struct ip_vs_proto_data *pd); |
| 1021 | 1021 | ||
| 1022 | extern void ip_vs_scheduler_err(struct ip_vs_service *svc, const char *msg); | ||
| 1023 | |||
| 1022 | 1024 | ||
| 1023 | /* | 1025 | /* |
| 1024 | * IPVS control data and functions (from ip_vs_ctl.c) | 1026 | * IPVS control data and functions (from ip_vs_ctl.c) |
| @@ -1241,6 +1243,20 @@ static inline void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp) | |||
| 1241 | /* CONFIG_IP_VS_NFCT */ | 1243 | /* CONFIG_IP_VS_NFCT */ |
| 1242 | #endif | 1244 | #endif |
| 1243 | 1245 | ||
| 1246 | static inline unsigned int | ||
| 1247 | ip_vs_dest_conn_overhead(struct ip_vs_dest *dest) | ||
| 1248 | { | ||
| 1249 | /* | ||
| 1250 | * We think the overhead of processing active connections is 256 | ||
| 1251 | * times higher than that of inactive connections in average. (This | ||
| 1252 | * 256 times might not be accurate, we will change it later) We | ||
| 1253 | * use the following formula to estimate the overhead now: | ||
| 1254 | * dest->activeconns*256 + dest->inactconns | ||
| 1255 | */ | ||
| 1256 | return (atomic_read(&dest->activeconns) << 8) + | ||
| 1257 | atomic_read(&dest->inactconns); | ||
| 1258 | } | ||
| 1259 | |||
| 1244 | #endif /* __KERNEL__ */ | 1260 | #endif /* __KERNEL__ */ |
| 1245 | 1261 | ||
| 1246 | #endif /* _NET_IP_VS_H */ | 1262 | #endif /* _NET_IP_VS_H */ |
