diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-01-22 09:11:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:10:39 -0500 |
commit | 3140c25c82106645a6b1fc469dab7006a1d09fd0 (patch) | |
tree | cbf97e7138610c1f1f0ad4528d59b4bbd14039c7 /net/ipv6 | |
parent | 3b4bc4a2bfe80d01ebd4f2b6dcc58986c970ed16 (diff) |
[NETNS][FRAGS]: Make the LRU list per namespace.
The inet_frags.lru_list is used for evicting only, so we have
to make it per-namespace, to evict only those fragments, who's
namespace exceeded its high threshold, but not the whole hash.
Besides, this helps to avoid long loops in evictor.
The spinlock is not per-namespace because it protects the
hash table as well, which is global.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_reasm.c | 2 | ||||
-rw-r--r-- | net/ipv6/reassembly.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 6eed991a4a3f..022da6ce4c0f 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -385,7 +385,7 @@ static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb, | |||
385 | fq->q.last_in |= FIRST_IN; | 385 | fq->q.last_in |= FIRST_IN; |
386 | } | 386 | } |
387 | write_lock(&nf_frags.lock); | 387 | write_lock(&nf_frags.lock); |
388 | list_move_tail(&fq->q.lru_list, &nf_frags.lru_list); | 388 | list_move_tail(&fq->q.lru_list, &nf_init_frags.lru_list); |
389 | write_unlock(&nf_frags.lock); | 389 | write_unlock(&nf_frags.lock); |
390 | return 0; | 390 | return 0; |
391 | 391 | ||
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 852070087307..0c4bc46dee0c 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -424,7 +424,7 @@ static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb, | |||
424 | return ip6_frag_reasm(fq, prev, dev); | 424 | return ip6_frag_reasm(fq, prev, dev); |
425 | 425 | ||
426 | write_lock(&ip6_frags.lock); | 426 | write_lock(&ip6_frags.lock); |
427 | list_move_tail(&fq->q.lru_list, &ip6_frags.lru_list); | 427 | list_move_tail(&fq->q.lru_list, &fq->q.net->lru_list); |
428 | write_unlock(&ip6_frags.lock); | 428 | write_unlock(&ip6_frags.lock); |
429 | return -1; | 429 | return -1; |
430 | 430 | ||