This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / net / ipv4 / tcp_minisocks.c
index 79c1884..a8da77f 100644 (file)
@@ -25,6 +25,9 @@
 #include <linux/module.h>
 #include <linux/sysctl.h>
 #include <linux/workqueue.h>
+#include <linux/vs_socket.h>
+#include <linux/vs_context.h>
+#include <linux/vs_network.h>
 #include <net/tcp.h>
 #include <net/inet_common.h>
 #include <net/xfrm.h>
@@ -266,7 +269,7 @@ kill:
        }
 
        if (paws_reject)
-               NET_INC_STATS_BH(LINUX_MIB_PAWSESTABREJECTED);
+               NET_INC_STATS_BH(PAWSEstabRejected);
 
        if(!th->rst) {
                /* In this case we must reset the TIMEWAIT timer.
@@ -362,6 +365,11 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
                tw->tw_ts_recent_stamp  = tp->ts_recent_stamp;
                tw_dead_node_init(tw);
 
+               tw->tw_xid              = sk->sk_xid;
+               tw->tw_vx_info          = NULL;
+               tw->tw_nid              = sk->sk_nid;
+               tw->tw_nx_info          = NULL;
+               
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
                if (tw->tw_family == PF_INET6) {
                        struct ipv6_pinfo *np = inet6_sk(sk);
@@ -462,7 +470,7 @@ rescan:
        }
 
        tcp_tw_count -= killed;
-       NET_ADD_STATS_BH(LINUX_MIB_TIMEWAITED, killed);
+       NET_ADD_STATS_BH(TimeWaited, killed);
 
        return ret;
 }
@@ -672,7 +680,7 @@ void tcp_twcal_tick(unsigned long dummy)
 out:
        if ((tcp_tw_count -= killed) == 0)
                del_timer(&tcp_tw_timer);
-       NET_ADD_STATS_BH(LINUX_MIB_TIMEWAITKILLED, killed);
+       NET_ADD_STATS_BH(TimeWaitKilled, killed);
        spin_unlock(&tw_death_lock);
 }
 
@@ -697,6 +705,8 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct open_request *req,
                newsk->sk_state = TCP_SYN_RECV;
 
                /* SANITY */
+               sock_vx_init(newsk);
+               sock_nx_init(newsk);
                sk_node_init(&newsk->sk_node);
                tcp_sk(newsk)->bind_hash = NULL;
 
@@ -767,6 +777,9 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct open_request *req,
                newtp->snd_cwnd = 2;
                newtp->snd_cwnd_cnt = 0;
 
+               newtp->bictcp.cnt = 0;
+               newtp->bictcp.last_max_cwnd = newtp->bictcp.last_cwnd = 0;
+
                newtp->frto_counter = 0;
                newtp->frto_highmark = 0;
 
@@ -787,7 +800,14 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct open_request *req,
                newtp->num_sacks = 0;
                newtp->urg_data = 0;
                newtp->listen_opt = NULL;
+#ifdef CONFIG_ACCEPT_QUEUES
+               newtp->accept_queue = NULL;
+               memset(newtp->acceptq, 0,sizeof(newtp->acceptq));
+               newtp->class_index = 0;
+
+#else
                newtp->accept_queue = newtp->accept_queue_tail = NULL;
+#endif
                /* Deinitialize syn_wait_lock to trap illegal accesses. */
                memset(&newtp->syn_wait_lock, 0, sizeof(newtp->syn_wait_lock));
 
@@ -795,6 +815,11 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct open_request *req,
                newsk->sk_err = 0;
                newsk->sk_priority = 0;
                atomic_set(&newsk->sk_refcnt, 2);
+
+               set_vx_info(&newsk->sk_vx_info, sk->sk_vx_info);
+               newsk->sk_xid = sk->sk_xid;
+               set_nx_info(&newsk->sk_nx_info, sk->sk_nx_info);
+               newsk->sk_nid = sk->sk_nid;
 #ifdef INET_REFCNT_DEBUG
                atomic_inc(&inet_sock_nr);
 #endif
@@ -842,7 +867,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct open_request *req,
                        newsk->sk_no_largesend = 1;
 
                tcp_vegas_init(newtp);
-               TCP_INC_STATS_BH(TCP_MIB_PASSIVEOPENS);
+               TCP_INC_STATS_BH(TcpPassiveOpens);
        }
        return newsk;
 }
@@ -973,7 +998,7 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb,
                if (!(flg & TCP_FLAG_RST))
                        req->class->send_ack(skb, req);
                if (paws_reject)
-                       NET_INC_STATS_BH(LINUX_MIB_PAWSESTABREJECTED);
+                       NET_INC_STATS_BH(PAWSEstabRejected);
                return NULL;
        }
 
@@ -1030,7 +1055,7 @@ listen_overflow:
        }
 
 embryonic_reset:
-       NET_INC_STATS_BH(LINUX_MIB_EMBRYONICRSTS);
+       NET_INC_STATS_BH(EmbryonicRsts);
        if (!(flg & TCP_FLAG_RST))
                req->class->send_reset(skb);