From owner-svn-src-all@freebsd.org Sun Oct 1 23:37:19 2017 Return-Path: Delivered-To: svn-src-all@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 0D76DE31079; Sun, 1 Oct 2017 23:37:19 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEA4C72CAE; Sun, 1 Oct 2017 23:37:18 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v91NbI8G007550; Sun, 1 Oct 2017 23:37:18 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v91NbItG007549; Sun, 1 Oct 2017 23:37:18 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201710012337.v91NbItG007549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Sun, 1 Oct 2017 23:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324181 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: pkelsey X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 324181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Oct 2017 23:37:19 -0000 Author: pkelsey Date: Sun Oct 1 23:37:17 2017 New Revision: 324181 URL: https://svnweb.freebsd.org/changeset/base/324181 Log: The soisconnected() call removed from syncache_socket() in r307966 was not extraneous in the TCP Fast Open (TFO) passive-open case. In the TFO passive-open case, syncache_socket() is being called during processing of a TFO SYN bearing a valid cookie, and a call to soisconnected() is required in order to allow the application to immediately consume any data delivered in the SYN and to have a chance to generate response data to accompany the SYN-ACK. The removal of this call to soisconnected() effectively converted all TFO passive opens to having the same RTT cost as a standard 3WHS. This commit adds a call to soisconnected() to syncache_tfo_expand() so that it is only in the TFO passive-open path, thereby restoring TFO passve-open RTT performance and preserving the non-TFO connection-rate performance gains realized by r307966. MFC after: 1 week Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Sun Oct 1 21:45:15 2017 (r324180) +++ head/sys/netinet/tcp_syncache.c Sun Oct 1 23:37:17 2017 (r324181) @@ -1195,6 +1195,7 @@ syncache_tfo_expand(struct syncache *sc, struct socket TCPSTAT_INC(tcps_sc_aborted); atomic_subtract_int(pending_counter, 1); } else { + soisconnected(*lsop); inp = sotoinpcb(*lsop); tp = intotcpcb(inp); tp->t_flags |= TF_FASTOPEN;