From owner-freebsd-net@freebsd.org Sat Apr 16 02:44:55 2016 Return-Path: Delivered-To: freebsd-net@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 A4CCFB0E278 for ; Sat, 16 Apr 2016 02:44:55 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 8044F17D1 for ; Sat, 16 Apr 2016 02:44:55 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id DA3D8C417; Sat, 16 Apr 2016 02:44:54 +0000 (UTC) Date: Sat, 16 Apr 2016 02:44:54 +0000 To: freebsd-net@freebsd.org From: "mike-karels.net (Mike Karels)" Reply-to: D5872+325+9dea0574509cdbb3@reviews.freebsd.org Subject: [Differential] [Commented On] D5872: tcp: Don't prematurely drop receiving-only connections Message-ID: <1e469155ddd9499ac7ff51b86a92a80e@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: Thread-Topic: D5872: tcp: Don't prematurely drop receiving-only connections X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MmVmNzYzNzljOGQxMmM4MWI4MmNjYzcxMzczIFcRpyY= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 02:44:55 -0000 mike-karels.net added a comment. I believe that the original code is wrong, and the change is not sufficient to fix it. The retransmit timer should be running if and only if we have sent data into the receive window and are awaiting an ACK. The persist timer should be running if and only if the retransmit timer is not running, and we have data to send that do not reasonably fit in the window. If we get an ENOBUFS when sending data, we will already be running the retransmit timer. If we drop an ACK on ENOBUFS, either we will receive more data and attempt another ACK, or the sender will time out and resend data. Either will get the connection started again. I believe lines 1552-1554 should simply be deleted. REVISION DETAIL https://reviews.freebsd.org/D5872 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, glebius, lstewart, adrian, delphij, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, freebsd-net-list, transport, jtl, hiren Cc: mike-karels.net, jtl