From owner-p4-projects@FreeBSD.ORG Sat Mar 22 16:47:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 755891065676; Sat, 22 Mar 2008 16:47:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3456C1065672 for ; Sat, 22 Mar 2008 16:47:19 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2C83C8FC16 for ; Sat, 22 Mar 2008 16:47:19 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2MGlJ1j053140 for ; Sat, 22 Mar 2008 16:47:19 GMT (envelope-from andre@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2MGlJRA053136 for perforce@freebsd.org; Sat, 22 Mar 2008 16:47:19 GMT (envelope-from andre@freebsd.org) Date: Sat, 22 Mar 2008 16:47:19 GMT Message-Id: <200803221647.m2MGlJRA053136@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andre@freebsd.org using -f From: Andre Oppermann To: Perforce Change Reviews Cc: Subject: PERFORCE change 138292 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2008 16:47:20 -0000 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);