From owner-cvs-src@FreeBSD.ORG  Thu Nov 16 09:04:26 2006
Return-Path: <owner-cvs-src@FreeBSD.ORG>
X-Original-To: cvs-src@FreeBSD.org
Delivered-To: cvs-src@FreeBSD.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1B3C116A403;
	Thu, 16 Nov 2006 09:04:26 +0000 (UTC)
	(envelope-from yar@comp.chem.msu.su)
Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BE75943D95;
	Thu, 16 Nov 2006 09:04:24 +0000 (GMT)
	(envelope-from yar@comp.chem.msu.su)
Received: from comp.chem.msu.su (localhost [127.0.0.1])
	by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id kAG94KOl038416;
	Thu, 16 Nov 2006 12:04:20 +0300 (MSK)
	(envelope-from yar@comp.chem.msu.su)
Received: (from yar@localhost)
	by comp.chem.msu.su (8.13.4/8.13.3/Submit) id kAG94CoH038412;
	Thu, 16 Nov 2006 12:04:12 +0300 (MSK) (envelope-from yar)
Date: Thu, 16 Nov 2006 12:04:12 +0300
From: Yar Tikhiy <yar@comp.chem.msu.su>
To: "M. Warner Losh" <imp@bsdimp.com>
Message-ID: <20061116090412.GB37133@comp.chem.msu.su>
References: <3801.1163410519@critter.freebsd.dk>
	<20061113214928.P76443@delplex.bde.org>
	<20061113.101958.-861030824.imp@bsdimp.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20061113.101958.-861030824.imp@bsdimp.com>
User-Agent: Mutt/1.5.9i
Cc: src-committers@FreeBSD.org, bde@zeta.org.au, jkoshy@FreeBSD.org,
	cvs-all@FreeBSD.org, phk@phk.freebsd.dk, cvs-src@FreeBSD.org
Subject: Re: cvs commit: src/include ar.h
X-BeenThere: cvs-src@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: CVS commit messages for the src tree <cvs-src.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src>,
	<mailto:cvs-src-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/cvs-src>
List-Post: <mailto:cvs-src@freebsd.org>
List-Help: <mailto:cvs-src-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src>,
	<mailto:cvs-src-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Nov 2006 09:04:26 -0000

On Mon, Nov 13, 2006 at 10:19:58AM -0700, M. Warner Losh wrote:
> : 
> : BTW, you are responsible for the __packed in <netinet/ip.h>.  Please remove
> : it.  The __CTASSERT() is enough to detect if heroic packing is ever needed.
> : The only danger is if something has grown to depend on __packed reducing
> : alignment as a side effect.  E.g., suppose we had a byte string containing
> : a bytewise copy of a struct ip.  If the copy might be misaligned, then it
> : should be copied to an actual struct ip before accessing it as a struct,
> : but code that accesses it directly using ((struct ip *)&bs[N]) would work
> : now due to the reduced alignment.  Places that really need __packed should
> : probably use __aligned() to restore the natural alignment.
> 
> DO NOT REMOVE IT.  IT IS ABSOLUTELY REQUIRED FOR ARM TO WORK RIGHT.
> If you want to remove it, then you must make sure arm works right
> after it because I'll add it back.

Many years ago I was taught that comments in code could help to
avoid such clashes in software development.  Is this true no more? ;-)

-- 
Yar