This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / net / ipv4 / tcp_timer.c
index 3b4d821..aa19927 100644 (file)
@@ -36,9 +36,7 @@ static void tcp_write_timer(unsigned long);
 static void tcp_delack_timer(unsigned long);
 static void tcp_keepalive_timer (unsigned long data);
 
-#ifdef TCP_DEBUG
-const char tcp_timer_bug_msg[] = KERN_DEBUG "tcpbug: unknown timer value\n";
-#endif
+const char timer_bug_msg[] = KERN_DEBUG "tcpbug: unknown timer value\n";
 
 /*
  * Using different timers for retransmit, delayed acks and probes
@@ -491,7 +489,16 @@ static void tcp_synack_timer(struct sock *sk)
         * ones are about to clog our table.
         */
        if (lopt->qlen>>(lopt->max_qlen_log-1)) {
+#ifdef CONFIG_ACCEPT_QUEUES
+               int young = 0;
+              
+               for(i=0; i < NUM_ACCEPT_QUEUES; i++) 
+                       young += lopt->qlen_young[i];
+               
+               young <<= 1;
+#else
                int young = (lopt->qlen_young<<1);
+#endif
 
                while (thresh > 2) {
                        if (lopt->qlen < young)
@@ -517,9 +524,12 @@ static void tcp_synack_timer(struct sock *sk)
                                        unsigned long timeo;
 
                                        if (req->retrans++ == 0)
-                                               lopt->qlen_young--;
-                                       timeo = min((TCP_TIMEOUT_INIT << req->retrans),
-                                                   TCP_RTO_MAX);
+#ifdef CONFIG_ACCEPT_QUEUES
+                                               lopt->qlen_young[req->acceptq_class]--;
+#else
+                                               lopt->qlen_young--;
+#endif
+                                       timeo = min((TCP_TIMEOUT_INIT << req->retrans), TCP_RTO_MAX);
                                        req->expires = now + timeo;
                                        reqp = &req->dl_next;
                                        continue;
@@ -531,7 +541,11 @@ static void tcp_synack_timer(struct sock *sk)
                                write_unlock(&tp->syn_wait_lock);
                                lopt->qlen--;
                                if (req->retrans == 0)
-                                       lopt->qlen_young--;
+#ifdef CONFIG_ACCEPT_QUEUES
+                                               lopt->qlen_young[req->acceptq_class]--;
+#else
+                                               lopt->qlen_young--;
+#endif
                                tcp_openreq_free(req);
                                continue;
                        }
@@ -653,6 +667,3 @@ EXPORT_SYMBOL(tcp_clear_xmit_timers);
 EXPORT_SYMBOL(tcp_delete_keepalive_timer);
 EXPORT_SYMBOL(tcp_init_xmit_timers);
 EXPORT_SYMBOL(tcp_reset_keepalive_timer);
-#ifdef TCP_DEBUG
-EXPORT_SYMBOL(tcp_timer_bug_msg);
-#endif