Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Mar 2008 16:47:19 GMT
From:      Andre Oppermann <andre@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 138292 for review
Message-ID:  <200803221647.m2MGlJRA053136@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=138292

Change 138292 by andre@andre_flirtbox on 2008/03/22 16:47:08

	Add net.inet.tcp.reass.queue_timeout sysctl to activate timeout
	based reassembly queue flushing and to specify the multiple based
	on the current retransmit timeout.

Affected files ...

.. //depot/projects/tcp_reass/netinet/tcp_reass.c#20 edit

Differences ...

==== //depot/projects/tcp_reass/netinet/tcp_reass.c#20 (text+ko) ====

@@ -129,6 +129,11 @@
     &tcp_reass_mcnt, 0,
     "Global gross memory size of all mbufs currently in Reassembly Queue");
 
+static int tcp_reass_qtimo = 0;
+SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, queue_timeout, CTLFLAG_RW,
+    &tcp_reass_qtimo, 0,
+    "Reassembly Queue Timeout in multiples of the Retransmission Timeout");
+
 static void	tcp_reass_merge(struct tcpcb *, struct trq *, struct trq *);
 
 uma_zone_t	tcp_reass_zone;
@@ -526,11 +531,13 @@
 		    ("%s: first element queue not empty", __func__));
 		TAILQ_INSERT_HEAD(&tp->t_trq, tqen, trq_q);
 		/*
-		 * Flush the reassembly queue after four times the
+		 * Flush the reassembly queue after x times the
 		 * current retransmit interval measured from the
 		 * arrival time of the first segment.
 		 */
-		tcp_timer_activate(tp, TT_REASS, tp->t_rxtcur * 4);
+		if (tcp_reass_qtimo)
+			tcp_timer_activate(tp, TT_REASS,
+			    tp->t_rxtcur * tcp_reass_qtimo);
 	}
 	LIST_INSERT_HEAD(&tp->t_trq_sack, tqen, trq_s);
 
@@ -579,8 +586,9 @@
 	 * the sequence space and if queue is not empty.  Otherwise
 	 * deactivate it.
 	 */
-	if (!TAILQ_EMPTY(&tp->t_trq))
-		tcp_timer_activate(tp, TT_REASS, tp->t_rxtcur * 4);
+	if (tcp_reass_qtimo && !TAILQ_EMPTY(&tp->t_trq))
+		tcp_timer_activate(tp, TT_REASS,
+		    tp->t_rxtcur * tcp_reass_qtimo);
 	else
 		tcp_timer_activate(tp, TT_REASS, 0);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803221647.m2MGlJRA053136>