From owner-freebsd-net@FreeBSD.ORG Thu Mar 14 13:05:12 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DFA36931 for ; Thu, 14 Mar 2013 13:05:12 +0000 (UTC) (envelope-from bejoygthomas@yahoo.com) Received: from nm9-vm8.bullet.mail.sg3.yahoo.com (nm9-vm8.bullet.mail.sg3.yahoo.com [106.10.148.215]) by mx1.freebsd.org (Postfix) with SMTP id 344BCABC for ; Thu, 14 Mar 2013 13:05:11 +0000 (UTC) Received: from [106.10.166.114] by nm9.bullet.mail.sg3.yahoo.com with NNFMP; 14 Mar 2013 13:02:23 -0000 Received: from [106.10.167.144] by tm3.bullet.mail.sg3.yahoo.com with NNFMP; 14 Mar 2013 13:02:23 -0000 Received: from [127.0.0.1] by smtp117.mail.sg3.yahoo.com with NNFMP; 14 Mar 2013 13:02:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1363266143; bh=mi7zMZftvGEt7vIyDXDfj07LLDZ5RSkvTHspjyAslW0=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:From:Content-Type:Content-Transfer-Encoding:Subject:Date:Message-Id:To:Mime-Version:X-Mailer; b=OQTeeG+culLlhN3K5oIxzkcw4DkQwyecpdKDe3MBdF64QJgYzBrLi7YF0tQC+s3uIpik5ff4GWvVL4fhFofLXSyprV5xNzs9AGM8ZC0TErc74gd0TKjxy4+/k95cZEgqDJOtARFlaNhoA71bgw8xr5NRoYT5HVl9JopmMBS9ygE= X-Yahoo-Newman-Id: 597433.28861.bm@smtp117.mail.sg3.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 83JyW_8VM1lW6VbwPiocPcAlQcRdnw.tbZHcqvozWZn5GY. 6YsukBXYN0s3ZT.D6s6LfLScTBEECsiQvGcBCOHpuAYFL_Ky5C8lMUtyVWWt L3cpL0jaQwZbWLUxpIwLS9dtcRfRB4ZiM_.k8ZNiK7TBNOt2_NvEj0nK.r6f RlDCMl1sCHy2dxcXVKlcE1Yc_dYwuIzU8PwOYBViwd.3Hcs0x8043VYiNpF4 CBMpDmlaXw_8SI29Of9DZzciuJ.CtpuC_o_yvz007P85Sj5F1Fy4JR8VqBVE uIq9bdkQRNIqe5LnGOL7pw3O2Bgl0KUuyVYyONCV6YXM.bdA9SUPzQ069i6N eGmZBbQ6ZhqknQ2rMmm37kL9Vj0r_00JeDitEnTdgGV2VbASTX5J_ZjW2zBa 4QTSV25861m.y8JQ- X-Yahoo-SMTP: wUFYtX6swBBtUSvlG_G5EWi_ycgIVslBiQ-- X-Rocket-Received: from [192.168.0.3] (bejoygthomas@117.192.235.205 with plain) by smtp117.mail.sg3.yahoo.com with SMTP; 14 Mar 2013 06:02:23 -0700 PDT From: Bejoy Thomas Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Question regarding FreeBSD Congestion control Date: Thu, 14 Mar 2013 18:32:17 +0530 Message-Id: To: freebsd-net@freebsd.org Mime-Version: 1.0 (Apple Message framework v1283) X-Mailer: Apple Mail (2.1283) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2013 13:05:12 -0000 I have been looking at the FreeBSD congestion control code and had some = questions on the SACK enabled code flow . =20 With SACK the congestion window is retained as 1 MSS when the Fast = Retransmit is exited and Fast Recovery is entered,so cwnd growth seems = to be much slower than slow start, as we we are re transmitting drops = from the sack hole or new data. But in non-SACK case the congestion = window is restored to cwnd/2 +(dupacks-snd_limited)*MSS when Fast = retransmit is exited as per RFC3782. Could some one familiar with the = code please throw some light on why we fall back to a cwnd of 1MSS as we = enter fast recovery with SACK enabled. /*Congestion signal before ack. = */ cc_cong_signal(tp, th, = CC_NDUPACK); cc_ack_received(tp, th, = CC_DUPACK); tcp_timer_activate(tp, TT_REXMT, = 0); tp->t_rtttime =3D 0; if (tp->t_flags & = TF_SACK_PERMIT) { TCPSTAT_INC( = tcps_sack_recovery_episode); tp->sack_newdata =3D = tp->snd_nxt; tp->snd_cwnd =3D = tp->t_maxseg; <<<<<<<<< (void) tcp_output(tp); goto drop; = <<<<<<<<<< } tp->snd_nxt =3D th->th_ack; tp->snd_cwnd =3D tp->t_maxseg; (void) tcp_output(tp); KASSERT(tp->snd_limited <=3D 2, ("%s: tp->snd_limited too = big", __func__)); tp->snd_cwnd =3D = tp->snd_ssthresh + tp->t_maxseg * (tp->t_dupacks - = tp->snd_limited); <<<<<<<<< Bejoy Thomas=