aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-01-22 06:06:23 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:10:35 -0800
commite5a2bb842cd9681d00d4ca963e63e4d3647e66f8 (patch)
treeb47692f3312039cb944f68f6fbeb0d10442f8056 /include
parentac18e7509e7df327e30d6e073a787d922eaf211d (diff)
[NETNS][FRAGS]: Make the nqueues counter per-namespace.
This is simple - just move the variable from struct inet_frags to struct netns_frags and adjust the usage appropriately. 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.h4
-rw-r--r--include/net/ip.h2
-rw-r--r--include/net/ipv6.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 8ab6df64a12..d36f3a6e6d4 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -2,6 +2,7 @@
#define __NET_FRAG_H__
struct netns_frags {
+ int nqueues;
};
struct inet_frag_queue {
@@ -36,7 +37,6 @@ struct inet_frags {
struct hlist_head hash[INETFRAGS_HASHSZ];
rwlock_t lock;
u32 rnd;
- int nqueues;
int qsize;
atomic_t mem;
struct timer_list secret_timer;
@@ -55,6 +55,8 @@ struct inet_frags {
void inet_frags_init(struct inet_frags *);
void inet_frags_fini(struct inet_frags *);
+void inet_frags_init_net(struct netns_frags *nf);
+
void inet_frag_kill(struct inet_frag_queue *q, struct inet_frags *f);
void inet_frag_destroy(struct inet_frag_queue *q,
struct inet_frags *f, int *work);
diff --git a/include/net/ip.h b/include/net/ip.h
index 9d43ac222d1..fbe28308bf7 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -332,7 +332,7 @@ enum ip_defrag_users
int ip_defrag(struct sk_buff *skb, u32 user);
int ip_frag_mem(void);
-int ip_frag_nqueues(void);
+int ip_frag_nqueues(struct net *net);
/*
* Functions provided by ip_forward.c
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 87ca1bf17d7..da1c089680d 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -245,7 +245,7 @@ struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space,
extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb);
-int ip6_frag_nqueues(void);
+int ip6_frag_nqueues(struct net *net);
int ip6_frag_mem(void);
#define IPV6_FRAG_TIMEOUT (60*HZ) /* 60 seconds */