1 diff -Ndur linux-2.6.32-700/include/net/tcp.h linux-2.6.32-700-xidmask/include/net/tcp.h
2 --- linux-2.6.32-700/include/net/tcp.h 2013-01-10 14:18:49.880337393 -0500
3 +++ linux-2.6.32-700-xidmask/include/net/tcp.h 2013-01-10 14:21:16.366337329 -0500
5 #ifdef CONFIG_WEB100_STATS
6 extern int sysctl_web100_fperms;
7 extern int sysctl_web100_gid;
8 +extern int sysctl_web100_sidestream_xid;
9 +extern int sysctl_web100_mask_xid;
12 extern atomic_t tcp_memory_allocated;
13 diff -Ndur linux-2.6.32-700/Makefile linux-2.6.32-700-xidmask/Makefile
14 --- linux-2.6.32-700/Makefile 2013-01-10 14:18:52.816337505 -0500
15 +++ linux-2.6.32-700-xidmask/Makefile 2013-01-10 14:38:46.659197193 -0500
20 -EXTRAVERSION = -131.tg3.220.mlab.i686
21 +EXTRAVERSION = .133-vs2.3.0.36.29.6.mlab.mask1.planetlab
22 NAME = Man-Eating Seals of Antiquity
25 diff -Ndur linux-2.6.32-700/net/ipv4/sysctl_net_ipv4.c linux-2.6.32-700-xidmask/net/ipv4/sysctl_net_ipv4.c
26 --- linux-2.6.32-700/net/ipv4/sysctl_net_ipv4.c 2013-01-10 14:18:50.233320698 -0500
27 +++ linux-2.6.32-700-xidmask/net/ipv4/sysctl_net_ipv4.c 2013-01-10 14:30:18.997403751 -0500
30 .proc_handler = &web100_proc_dointvec_update,
33 + .ctl_name = CTL_UNNUMBERED,
34 + .procname = "web100_sidestream_xid",
35 + .data = &sysctl_web100_sidestream_xid,
36 + .maxlen = sizeof(int),
38 + .proc_handler = &web100_proc_dointvec_update,
41 + .ctl_name = CTL_UNNUMBERED,
42 + .procname = "web100_mask_xid",
43 + .data = &sysctl_web100_mask_xid,
44 + .maxlen = sizeof(int),
46 + .proc_handler = &web100_proc_dointvec_update,
50 .ctl_name = CTL_UNNUMBERED,
51 diff -Ndur linux-2.6.32-700/net/ipv4/tcp.c linux-2.6.32-700-xidmask/net/ipv4/tcp.c
52 --- linux-2.6.32-700/net/ipv4/tcp.c 2013-01-10 14:18:50.234322447 -0500
53 +++ linux-2.6.32-700-xidmask/net/ipv4/tcp.c 2013-01-10 14:21:16.368337586 -0500
55 #ifdef CONFIG_WEB100_STATS
56 int sysctl_web100_fperms = CONFIG_WEB100_FPERMS;
57 int sysctl_web100_gid = CONFIG_WEB100_GID;
58 +int sysctl_web100_sidestream_xid = 0;
59 +int sysctl_web100_mask_xid = -1;
62 atomic_t tcp_memory_allocated; /* Current allocated memory. */
65 tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH);
66 #ifdef CONFIG_WEB100_STATS
67 - web100_update_writeq(sk);
68 + WEB100_UPDATE_FUNC(tcp_sk(sk), web100_update_writeq(sk));
74 tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH);
75 #ifdef CONFIG_WEB100_STATS
76 - web100_update_writeq(sk);
77 + WEB100_UPDATE_FUNC(tcp_sk(sk), web100_update_writeq(sk));
84 #ifdef CONFIG_WEB100_STATS
85 - web100_update_recvq(sk);
86 + WEB100_UPDATE_FUNC(tcp_sk(sk), web100_update_recvq(sk));
89 /* Well, if we have backlog, try to process it now yet. */
90 diff -Ndur linux-2.6.32-700/net/ipv4/tcp_input.c linux-2.6.32-700-xidmask/net/ipv4/tcp_input.c
91 --- linux-2.6.32-700/net/ipv4/tcp_input.c 2013-01-10 14:18:50.232318345 -0500
92 +++ linux-2.6.32-700-xidmask/net/ipv4/tcp_input.c 2013-01-10 14:21:16.371337187 -0500
96 #ifdef CONFIG_WEB100_NET100
97 - if (vars->WAD_NoAI) {
98 + if (stats != NULL && vars->WAD_NoAI) {
99 tp->snd_cwnd += vars->WAD_CwndAdjust;
100 vars->WAD_CwndAdjust = 0;
101 tp->snd_cwnd_stamp = tcp_time_stamp;
102 @@ -4426,7 +4426,7 @@
103 tcp_fast_path_check(sk);
105 #ifdef CONFIG_WEB100_STATS
106 - web100_update_recvq(sk);
107 + WEB100_UPDATE_FUNC(tcp_sk(sk), web100_update_recvq(sk));
111 @@ -4484,7 +4484,7 @@
112 tp->rcv_nxt, TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq);
114 #ifdef CONFIG_WEB100_STATS
115 - web100_update_recvq(sk);
116 + WEB100_UPDATE_FUNC(tcp_sk(sk), web100_update_recvq(sk));
118 skb_set_owner_r(skb, sk);
120 @@ -5372,7 +5372,7 @@
123 #ifdef CONFIG_WEB100_STATS
124 - web100_update_recvq(sk);
125 + WEB100_UPDATE_FUNC(tcp_sk(sk), web100_update_recvq(sk));
127 tcp_event_data_recv(sk, skb);
129 diff -Ndur linux-2.6.32-700/net/ipv4/tcp_ipv4.c linux-2.6.32-700-xidmask/net/ipv4/tcp_ipv4.c
130 --- linux-2.6.32-700/net/ipv4/tcp_ipv4.c 2013-01-10 14:18:50.235319018 -0500
131 +++ linux-2.6.32-700-xidmask/net/ipv4/tcp_ipv4.c 2013-01-10 14:21:16.372284450 -0500
132 @@ -1383,7 +1383,9 @@
136 - tcp_sk(newsk)->tcp_stats->wc_vars.LocalAddressType = WC_ADDRTYPE_IPV4;
137 + if ( tcp_sk(newsk)->tcp_stats != NULL ) {
138 + tcp_sk(newsk)->tcp_stats->wc_vars.LocalAddressType = WC_ADDRTYPE_IPV4;
142 newsk->sk_gso_type = SKB_GSO_TCPV4;
143 @@ -1857,7 +1859,9 @@
144 if ((err = web100_stats_create(sk))) {
147 - tcp_sk(sk)->tcp_stats->wc_vars.LocalAddressType = WC_ADDRTYPE_IPV4;
148 + if ( tcp_sk(sk)->tcp_stats != NULL ) {
149 + tcp_sk(sk)->tcp_stats->wc_vars.LocalAddressType = WC_ADDRTYPE_IPV4;
154 diff -Ndur linux-2.6.32-700/net/ipv4/web100_stats.c linux-2.6.32-700-xidmask/net/ipv4/web100_stats.c
155 --- linux-2.6.32-700/net/ipv4/web100_stats.c 2013-01-10 14:18:50.231318735 -0500
156 +++ linux-2.6.32-700-xidmask/net/ipv4/web100_stats.c 2013-01-10 14:21:16.373337472 -0500
158 struct web100directs *vars;
159 struct tcp_sock *tp = tcp_sk(sk);
162 + printk("Web100: stats_create(): checking xid(%d) mask(%d)\n",
163 + sk->sk_xid, sysctl_web100_mask_xid);
164 + if ( sk->sk_xid == sysctl_web100_mask_xid ) {
165 + /* this xid is masked, so do not allocate or update tcp_stats */
166 + printk("Web100: skipping stats_create() for xid(%d) mask(%d)\n",
167 + sk->sk_xid, sysctl_web100_mask_xid);
168 + tp->tcp_stats = NULL;
172 if ((stats = kmalloc(sizeof (struct web100stats), gfp_any())) == NULL)
176 void web100_stats_destroy(struct web100stats *stats)
178 + if ( stats == NULL ) {
181 /* Attribute final sndlim time. */
182 web100_update_sndlim(tcp_sk(stats->wc_sk), stats->wc_limstate);
184 diff -Ndur linux-2.6.32-700/net/ipv6/tcp_ipv6.c linux-2.6.32-700-xidmask/net/ipv6/tcp_ipv6.c
185 --- linux-2.6.32-700/net/ipv6/tcp_ipv6.c 2013-01-10 14:18:50.219284269 -0500
186 +++ linux-2.6.32-700-xidmask/net/ipv6/tcp_ipv6.c 2013-01-10 14:21:16.373337472 -0500
187 @@ -1380,7 +1380,9 @@
191 - tcp_sk(newsk)->tcp_stats->wc_vars.LocalAddressType = WC_ADDRTYPE_IPV6;
192 + if ( tcp_sk(newsk)->tcp_stats != NULL ) {
193 + tcp_sk(newsk)->tcp_stats->wc_vars.LocalAddressType = WC_ADDRTYPE_IPV6;
198 @@ -1901,7 +1903,9 @@
199 if ((err = web100_stats_create(sk))) {
202 - tcp_sk(sk)->tcp_stats->wc_vars.LocalAddressType = WC_ADDRTYPE_IPV6;
203 + if ( tcp_sk(sk)->tcp_stats != NULL ) {
204 + tcp_sk(sk)->tcp_stats->wc_vars.LocalAddressType = WC_ADDRTYPE_IPV6;