From: root Date: Tue, 22 Jan 2013 20:44:44 +0000 (-0500) Subject: simpler filter logic check in vx_web100stats_lookup X-Git-Url: http://git.onelab.eu/?p=linux-2.6.git;a=commitdiff_plain;h=3a7960f05ea0cab37e6370cafa6cef9a32637095 simpler filter logic check in vx_web100stats_lookup --- diff --git a/linux-2.6-710-xidmask.patch b/linux-2.6-710-xidmask.patch index 219f071ea..918a05c30 100644 --- a/linux-2.6-710-xidmask.patch +++ b/linux-2.6-710-xidmask.patch @@ -169,7 +169,7 @@ diff -Ndur linux-2.6.32-700/net/ipv4/tcp_ipv4.c linux-2.6.32-700-xidmask/net/ipv diff -Ndur linux-2.6.32-700/net/ipv4/web100_stats.c linux-2.6.32-700-xidmask/net/ipv4/web100_stats.c --- linux-2.6.32-700/net/ipv4/web100_stats.c 2013-01-10 14:18:50.231318735 -0500 -+++ linux-2.6.32-700-xidmask/net/ipv4/web100_stats.c 2013-01-19 23:53:31.434591210 -0500 ++++ linux-2.6.32-700-xidmask/net/ipv4/web100_stats.c 2013-01-22 15:38:41.159794778 -0500 @@ -72,7 +72,123 @@ return cid % web100stats_htsize; } @@ -295,21 +295,19 @@ diff -Ndur linux-2.6.32-700/net/ipv4/web100_stats.c linux-2.6.32-700-xidmask/net { struct web100stats *stats; -@@ -83,6 +199,13 @@ +@@ -83,7 +199,10 @@ stats = web100stats_ht[web100stats_hash(cid)]; while (stats && stats->wc_cid != cid) stats = stats->wc_hash_next; -+ if ( 1 == vx_filter ) { -+ if ( 1 == vx_can_read_stats(stats) ) { -+ return stats; -+ } else { -+ return NULL; -+ } -+ } - return stats; +- return stats; ++ if ( 0 == vx_filter || 1 == vx_can_read_stats(stats) ) { ++ return stats; ++ } ++ return NULL; } -@@ -99,7 +222,8 @@ + /* This will get really slow as the cid space fills. This can be done +@@ -99,7 +218,8 @@ i = web100stats_next_cid; do { @@ -319,11 +317,10 @@ diff -Ndur linux-2.6.32-700/net/ipv4/web100_stats.c linux-2.6.32-700-xidmask/net break; i = (i + 1) % WEB100_MAX_CONNS; } while (i != web100stats_next_cid); -@@ -252,6 +376,13 @@ +@@ -252,6 +372,12 @@ struct web100directs *vars; struct tcp_sock *tp = tcp_sk(sk); struct timeval tv; -+ struct vx_info *vxi; + + if ( 0 == vx_can_create_stats(sk) ) { + /* do not create web100 stats for this socket */ @@ -333,7 +330,7 @@ diff -Ndur linux-2.6.32-700/net/ipv4/web100_stats.c linux-2.6.32-700-xidmask/net if ((stats = kmalloc(sizeof (struct web100stats), gfp_any())) == NULL) return -ENOMEM; -@@ -294,6 +425,9 @@ +@@ -294,6 +420,9 @@ void web100_stats_destroy(struct web100stats *stats) { @@ -343,7 +340,6 @@ diff -Ndur linux-2.6.32-700/net/ipv4/web100_stats.c linux-2.6.32-700-xidmask/net /* Attribute final sndlim time. */ web100_update_sndlim(tcp_sk(stats->wc_sk), stats->wc_limstate); -Binary files linux-2.6.32-700/net/ipv4/.web100_stats.c.swp and linux-2.6.32-700-xidmask/net/ipv4/.web100_stats.c.swp differ diff -Ndur linux-2.6.32-700/net/ipv6/tcp_ipv6.c linux-2.6.32-700-xidmask/net/ipv6/tcp_ipv6.c --- linux-2.6.32-700/net/ipv6/tcp_ipv6.c 2013-01-10 14:18:50.219284269 -0500 +++ linux-2.6.32-700-xidmask/net/ipv6/tcp_ipv6.c 2013-01-10 14:21:16.373337472 -0500