From owner-svn-src-head@freebsd.org Fri Feb 3 17:02:58 2017 Return-Path: Delivered-To: svn-src-head@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 BF70BCCEA79; Fri, 3 Feb 2017 17:02:58 +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 8ED6FBD3; Fri, 3 Feb 2017 17:02:58 +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 v13H2vVr085601; Fri, 3 Feb 2017 17:02:57 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13H2v8m085599; Fri, 3 Feb 2017 17:02:57 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201702031702.v13H2v8m085599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Fri, 3 Feb 2017 17:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313168 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 17:02:58 -0000 Author: pkelsey Date: Fri Feb 3 17:02:57 2017 New Revision: 313168 URL: https://svnweb.freebsd.org/changeset/base/313168 Log: Fix VIMAGE-related bugs in TFO. The autokey callout vnet context was not being initialized, and the per-vnet fastopen context was only being initialized for the default vnet. PR: 216613 Reported by: Alex Deiter MFC after: 1 week Modified: head/sys/netinet/tcp_fastopen.c head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_fastopen.c ============================================================================== --- head/sys/netinet/tcp_fastopen.c Fri Feb 3 16:57:14 2017 (r313167) +++ head/sys/netinet/tcp_fastopen.c Fri Feb 3 17:02:57 2017 (r313168) @@ -209,6 +209,7 @@ tcp_fastopen_init(void) rm_init(&V_tcp_fastopen_keylock, "tfo_keylock"); callout_init_rm(&V_tcp_fastopen_autokey_ctx.c, &V_tcp_fastopen_keylock, 0); + V_tcp_fastopen_autokey_ctx.v = curvnet; V_tcp_fastopen_keys.newest = TCP_FASTOPEN_MAX_KEYS - 1; } Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Fri Feb 3 16:57:14 2017 (r313167) +++ head/sys/netinet/tcp_subr.c Fri Feb 3 17:02:57 2017 (r313168) @@ -679,6 +679,10 @@ tcp_init(void) V_sack_hole_zone = uma_zcreate("sackhole", sizeof(struct sackhole), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); +#ifdef TCP_RFC7413 + tcp_fastopen_init(); +#endif + /* Skip initialization of globals for non-default instances. */ if (!IS_DEFAULT_VNET(curvnet)) return; @@ -732,10 +736,6 @@ tcp_init(void) #ifdef TCPPCAP tcp_pcap_init(); #endif - -#ifdef TCP_RFC7413 - tcp_fastopen_init(); -#endif } #ifdef VIMAGE