From owner-svn-src-all@freebsd.org Fri May 27 00:15:02 2016 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 7E298B4B696; Fri, 27 May 2016 00:15:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4346319A1; Fri, 27 May 2016 00:15:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 2C62425D3860; Fri, 27 May 2016 00:14:51 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 59FD2D1F839; Fri, 27 May 2016 00:14:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id mk7FF2xesWwT; Fri, 27 May 2016 00:14:49 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f1d5:9a80:7147:4985] (unknown [IPv6:fde9:577b:c1a9:4410:f1d5:9a80:7147:4985]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id AF8F1D1F83C; Fri, 27 May 2016 00:14:48 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r300764 - head/sys/netinet From: "Bjoern A. Zeeb" In-Reply-To: <201605261835.u4QIZblp066704@repo.freebsd.org> Date: Fri, 27 May 2016 00:14:28 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201605261835.u4QIZblp066704@repo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Fri, 27 May 2016 00:15:02 -0000 > On 26 May 2016, at 18:35 , John Baldwin wrote: >=20 > Author: jhb > Date: Thu May 26 18:35:37 2016 > New Revision: 300764 > URL: https://svnweb.freebsd.org/changeset/base/300764 >=20 > Log: > Don't reuse the source mbuf in tcp_respond() if it is not writable. >=20 > Not all mbufs passed up from device drivers are M_WRITABLE(). In > particular, the Chelsio T4/T5 driver uses a feature called "buffer = packing" > to receive multiple frames in a single receive buffer. The mbufs for > these frames all share the same external storage so are treated as > read-only by the rest of the stack when multiple frames are in = flight. > Previously tcp_respond() would blindly overwrite read-only mbufs when > INVARIANTS was disabled or panic with an assertion failure if = INVARIANTS > was enabled. Note that the new case is a bit of a mix of the two = other > cases in tcp_respond(). The TCP and IP headers must be copied = explicitly > into the new mbuf instead of being inherited (similar to the m =3D=3D = NULL > case), but the addresses and ports must be swapped in the reply = (similar > to the m !=3D NULL case). Is the same true for ICMP(v6) replies? /bz