From owner-freebsd-transport@freebsd.org Fri Oct 7 00:22:12 2016 Return-Path: Delivered-To: freebsd-transport@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 778F4BEC0F6 for ; Fri, 7 Oct 2016 00:22:12 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 6729D7D4 for ; Fri, 7 Oct 2016 00:22:12 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: by mailman.ysv.freebsd.org (Postfix) id 663F9BEC0F5; Fri, 7 Oct 2016 00:22:12 +0000 (UTC) Delivered-To: transport@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64406BEC0F4 for ; Fri, 7 Oct 2016 00:22:12 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id 58C1E7D0; Fri, 7 Oct 2016 00:22:12 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 31E711763B; Thu, 6 Oct 2016 17:22:11 -0700 (PDT) Date: Thu, 6 Oct 2016 17:22:11 -0700 From: hiren panchasara To: transport@FreeBSD.org Cc: lstewart@FreeBSD.org Subject: Exiting from loss recovery Message-ID: <20161007002211.GO50669@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="S0GG+JvAI2G0KxBG" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-transport@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions of transport level network protocols in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 00:22:12 -0000 --S0GG+JvAI2G0KxBG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In tcp_do_segment(): /* * If the congestion window was inflated to account * for the other side's cached packets, retract it. */ if (IN_FASTRECOVERY(tp->t_flags)) { if (SEQ_LT(th->th_ack, tp->snd_recover)) { if (tp->t_flags & TF_SACK_PERMIT) tcp_sack_partialack(tp, th);=20 else tcp_newreno_partial_ack(tp, th);=20 } else=20 cc_post_recovery(tp, th);=20 } Here, if we get an ack that marks recovery from loss i.e. >=3D snd_recovery, we call cc_post_recovery() which in-turn calls CC specific post_recovery routine. But we don't reset TF_FASTRECOVERY | TF_CONGRECOVERY flags by calling EXIT_RECOVERY()=20 Later in the code we do this check again in 'process_ACK:' /* XXXLAS: Can this be moved up into cc_post_recovery? */ if (IN_RECOVERY(tp->t_flags) && SEQ_GEQ(th->th_ack, tp->snd_recover)) { EXIT_RECOVERY(tp->t_flags); } And as it can be seen, Lawrence marked it as something that could possibly be done here and at the end of cc_post_recovery().=20 So, should we do it? i.e call EXIT_RECOVERY() at the end of cc_post_recovery() and remove the block from 'process_ACK' section? or there is something subtle I am not seeing? Cheers, Hiren --S0GG+JvAI2G0KxBG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJX9uqwXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/l5TYIAKiIHlBmt622sH0ZSHbMxTZS qxgoQKvTmgTmDchPNix7DFjFq8/mwsbOvj5M9NRnHm+JeSgsl/3fzfVDg4PXsMf4 Z8wBOeZzlK56DY75F122ejfY46v4Ag0G5jLQTLywyztl4jgspV/VxJp7zdbif+Qd YDu9+0AhGmyXuFcOvALsiq4Y5vrR9mDw4qsEBuxB1eLChGAs/8EnOEK5mpeCugu0 oItd0qmsjRQgcVhgSMp0oOupbfinXH65JLGm3PTcAuF6E64UrAl8Y2/odBaNJm0b Zfs4DjKSgZ+q5yLxO2XuKiYhNtFenS6I6HInFX0j/MeILPMjyyIOGrY/OWjflBc= =TUng -----END PGP SIGNATURE----- --S0GG+JvAI2G0KxBG--