Re: [RFC PATCH 3/9] ipvs network name space aware

Previous thread: [PATCH NEXT 0/7]qlcnic: driver update by Amit Kumar Salecha on Friday, October 8, 2010 - 2:46 am. (6 messages)

Next thread: [RFC PATCH 9/9] ipvs network name space aware by Hans Schillstrom on Friday, October 8, 2010 - 4:17 am. (1 message)
From: Hans Schillstrom
Date: Friday, October 8, 2010 - 4:16 am

This patch just contains ip_vs_conn.c
and does the normal
 - moving to vars to struct ipvs
 - adding per netns init and exit

proc_fs required some extra work with adding/chaning private data to get the net ptr.

Signed-off-by:Hans Schillstrom <hans.schillstrom@ericsson.com>

diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index b71c69a..c47828f 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -47,7 +47,7 @@

 /*
  * Connection hash size. Default is what was selected at compile time.
-*/
+ */
 int ip_vs_conn_tab_bits = CONFIG_IP_VS_TAB_BITS;
 module_param_named(conn_tab_bits, ip_vs_conn_tab_bits, int, 0444);
 MODULE_PARM_DESC(conn_tab_bits, "Set connections' hash size");
@@ -56,23 +56,12 @@ MODULE_PARM_DESC(conn_tab_bits, "Set connections' hash size");
 int ip_vs_conn_tab_size;
 int ip_vs_conn_tab_mask;

-/*
- *  Connection hash table: for input and output packets lookups of IPVS
- */
-static struct list_head *ip_vs_conn_tab;
-
-/*  SLAB cache for IPVS connections */
-static struct kmem_cache *ip_vs_conn_cachep __read_mostly;
-
-/*  counter for current IPVS connections */
-static atomic_t ip_vs_conn_count = ATOMIC_INIT(0);
-
-/*  counter for no client port connections */
-static atomic_t ip_vs_conn_no_cport_cnt = ATOMIC_INIT(0);
-
 /* random value for IPVS connection hash */
 static unsigned int ip_vs_conn_rnd;

+/* cache name cnt */
+static atomic_t conn_cache_nr = ATOMIC_INIT(0);
+
 /*
  *  Fine locking granularity for big connection hash table
  */
@@ -153,7 +142,7 @@ static unsigned int ip_vs_conn_hashkey(int af, unsigned proto,
  *	Hashes ip_vs_conn in ip_vs_conn_tab by proto,addr,port.
  *	returns bool success.
  */
-static inline int ip_vs_conn_hash(struct ip_vs_conn *cp)
+static inline int ip_vs_conn_hash(struct net *net, struct ip_vs_conn *cp)
 {
 	unsigned hash;
 	int ret;
@@ -168,7 +157,7 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp)
 ...
From: Simon Horman
Date: Wednesday, October 20, 2010 - 7:03 am

I am currently working on rebasing this patch against the
current nf-next-2.6 tree with includes persistence engines


--

From: Hans Schillstrom
Date: Thursday, October 21, 2010 - 12:51 am

Yes, I forgot to remove it.
I had them every where to make sure that net ptr was set,

--
Regards
Hans Schillstrom <hans.schillstrom@ericsson.com>
--

From: Simon Horman
Date: Thursday, October 21, 2010 - 1:22 am

Thanks, I thought it was something like that.
I'll remove them as part of my rebase.

[ strip ]
--

Previous thread: [PATCH NEXT 0/7]qlcnic: driver update by Amit Kumar Salecha on Friday, October 8, 2010 - 2:46 am. (6 messages)

Next thread: [RFC PATCH 9/9] ipvs network name space aware by Hans Schillstrom on Friday, October 8, 2010 - 4:17 am. (1 message)