From owner-svn-src-all@FreeBSD.ORG Thu May 8 20:54:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 201F17AB; Thu, 8 May 2014 20:54:21 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B668275; Thu, 8 May 2014 20:54:20 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.8/8.14.8) with ESMTP id s48KsHZO050845 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 9 May 2014 00:54:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s48KsHk5050844; Fri, 9 May 2014 00:54:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 9 May 2014 00:54:17 +0400 From: Gleb Smirnoff To: Michael Tuexen Subject: Re: svn commit: r265691 - head/sys/netinet Message-ID: <20140508205417.GA50679@FreeBSD.org> References: <201405081727.s48HRkiT056077@svn.freebsd.org> <20140508202310.GC50446@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Thu, 08 May 2014 20:54:21 -0000 On Thu, May 08, 2014 at 10:50:28PM +0200, Michael Tuexen wrote: M> > If "this should not happen" really means that we do not expect this issue M> > at all, assuming we are coding correctly, then all these comments and printfs M> > should be converted to KASSERTs. M> I tried to keep the style of the code... M> However, if the first one occurs, we are setting up a packet and have it too M> short to contain the checksum. This would really be bug in our code... So a KASSERT is fine. M> A KASSERT for the second case is also fine. M> The only difference between the above and the KASSERT version is that M> in case of problems the above just sends packets with wrong checksums M> and the KASSERT version will panic (when compiled with INVARIANTS) or M> panic (in case of m == NULL) or corrupt a byte. However, I also prefer M> the KASSERT version, it will help to get the code right... M> So I committed a change in M> http://svnweb.freebsd.org/changeset/base/265713 M> M> Thanks for your suggestion! Thanks a lot, Michael! -- Totus tuus, Glebius.