From owner-svn-src-all@freebsd.org Mon May 11 19:17:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 76FCA2E8CF8; Mon, 11 May 2020 19:17:34 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49LW0Z2WsRz3xsc; Mon, 11 May 2020 19:17:34 +0000 (UTC) (envelope-from gallatin@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51F3C233E7; Mon, 11 May 2020 19:17:34 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04BJHYKu057927; Mon, 11 May 2020 19:17:34 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04BJHYJj057926; Mon, 11 May 2020 19:17:34 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <202005111917.04BJHYJj057926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Mon, 11 May 2020 19:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360914 - in head/sys: netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: in head/sys: netinet netinet6 X-SVN-Commit-Revision: 360914 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.33 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: Mon, 11 May 2020 19:17:34 -0000 Author: gallatin Date: Mon May 11 19:17:33 2020 New Revision: 360914 URL: https://svnweb.freebsd.org/changeset/base/360914 Log: Ktls: never skip stamping tags for NIC TLS The newer RACK and BBR TCP stacks have added a mechanism to disable hardware packet pacing for TCP retransmits. This mechanism works by skipping the send-tag stamp on rate-limited connections when the TCP stack calls ip_output() with the IP_NO_SND_TAG_RL flag set. When doing NIC TLS, we must ignore this flag, as NIC TLS packets must always be stamped. Failure to stamp a NIC TLS packet will result in crypto issues. Reviewed by: hselasky, rrs Sponsored by: Netflix, Mellanox Modified: head/sys/netinet/ip_output.c head/sys/netinet6/ip6_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Mon May 11 19:16:49 2020 (r360913) +++ head/sys/netinet/ip_output.c Mon May 11 19:17:33 2020 (r360914) @@ -242,6 +242,10 @@ ip_output_send(struct inpcb *inp, struct ifnet *ifp, s error = EAGAIN; goto done; } + /* + * Always stamp tags that include NIC ktls. + */ + stamp_tag = true; } #endif #ifdef RATELIMIT Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Mon May 11 19:16:49 2020 (r360913) +++ head/sys/netinet6/ip6_output.c Mon May 11 19:17:33 2020 (r360914) @@ -353,6 +353,10 @@ ip6_output_send(struct inpcb *inp, struct ifnet *ifp, error = EAGAIN; goto done; } + /* + * Always stamp tags that include NIC ktls. + */ + stamp_tag = true; } #endif #ifdef RATELIMIT