diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-01-22 09:07:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:10:36 -0500 |
commit | 6ddc082223ef0f73717b4133fa7e648842bbfd02 (patch) | |
tree | 62315ac04e396bc6e68543502fb6aeec50be6662 /include | |
parent | e5a2bb842cd9681d00d4ca963e63e4d3647e66f8 (diff) |
[NETNS][FRAGS]: Make the mem counter per-namespace.
This is also simple, but introduces more changes, since
then mem counter is altered in more places.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/inet_frag.h | 4 | ||||
-rw-r--r-- | include/net/ip.h | 2 | ||||
-rw-r--r-- | include/net/ipv6.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index d36f3a6e6d4e..6edce7b2ff13 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | struct netns_frags { | 4 | struct netns_frags { |
5 | int nqueues; | 5 | int nqueues; |
6 | atomic_t mem; | ||
6 | }; | 7 | }; |
7 | 8 | ||
8 | struct inet_frag_queue { | 9 | struct inet_frag_queue { |
@@ -38,7 +39,6 @@ struct inet_frags { | |||
38 | rwlock_t lock; | 39 | rwlock_t lock; |
39 | u32 rnd; | 40 | u32 rnd; |
40 | int qsize; | 41 | int qsize; |
41 | atomic_t mem; | ||
42 | struct timer_list secret_timer; | 42 | struct timer_list secret_timer; |
43 | struct inet_frags_ctl *ctl; | 43 | struct inet_frags_ctl *ctl; |
44 | 44 | ||
@@ -60,7 +60,7 @@ void inet_frags_init_net(struct netns_frags *nf); | |||
60 | void inet_frag_kill(struct inet_frag_queue *q, struct inet_frags *f); | 60 | void inet_frag_kill(struct inet_frag_queue *q, struct inet_frags *f); |
61 | void inet_frag_destroy(struct inet_frag_queue *q, | 61 | void inet_frag_destroy(struct inet_frag_queue *q, |
62 | struct inet_frags *f, int *work); | 62 | struct inet_frags *f, int *work); |
63 | int inet_frag_evictor(struct inet_frags *f); | 63 | int inet_frag_evictor(struct netns_frags *nf, struct inet_frags *f); |
64 | struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, | 64 | struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, |
65 | struct inet_frags *f, void *key, unsigned int hash); | 65 | struct inet_frags *f, void *key, unsigned int hash); |
66 | 66 | ||
diff --git a/include/net/ip.h b/include/net/ip.h index fbe28308bf73..9f50d4f1f157 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -331,7 +331,7 @@ enum ip_defrag_users | |||
331 | }; | 331 | }; |
332 | 332 | ||
333 | int ip_defrag(struct sk_buff *skb, u32 user); | 333 | int ip_defrag(struct sk_buff *skb, u32 user); |
334 | int ip_frag_mem(void); | 334 | int ip_frag_mem(struct net *net); |
335 | int ip_frag_nqueues(struct net *net); | 335 | int ip_frag_nqueues(struct net *net); |
336 | 336 | ||
337 | /* | 337 | /* |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index da1c089680d8..fa80ea48639d 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -246,7 +246,7 @@ struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, | |||
246 | extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb); | 246 | extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb); |
247 | 247 | ||
248 | int ip6_frag_nqueues(struct net *net); | 248 | int ip6_frag_nqueues(struct net *net); |
249 | int ip6_frag_mem(void); | 249 | int ip6_frag_mem(struct net *net); |
250 | 250 | ||
251 | #define IPV6_FRAG_TIMEOUT (60*HZ) /* 60 seconds */ | 251 | #define IPV6_FRAG_TIMEOUT (60*HZ) /* 60 seconds */ |
252 | 252 | ||