Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 May 2014 00:54:17 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Michael Tuexen <tuexen@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r265691 - head/sys/netinet
Message-ID:  <20140508205417.GA50679@FreeBSD.org>
In-Reply-To: <B5B2D8C4-2C8E-468D-8F61-61505E9CA0C0@freebsd.org>
References:  <201405081727.s48HRkiT056077@svn.freebsd.org> <20140508202310.GC50446@FreeBSD.org> <B5B2D8C4-2C8E-468D-8F61-61505E9CA0C0@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140508205417.GA50679>