Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2006 14:01:33 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        gurney_j@resnet.uoregon.edu
Cc:        luigi@FreeBSD.org, src-committers@FreeBSD.org, rizzo@icir.org, cvs-all@FreeBSD.org, cvs-src@FreeBSD.org, ticso@cicely.de
Subject:   Re: cvs commit: src/sys/net if_ethersubr.c
Message-ID:  <20061212.140133.1649770385.imp@bsdimp.com>
In-Reply-To: <20061212183825.GF781@funkthat.com>
References:  <20061212141759.GZ54209@cicely12.cicely.de> <20061212062445.A61903@xorpc.icir.org> <20061212183825.GF781@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20061212183825.GF781@funkthat.com>
            John-Mark Gurney <gurney_j@resnet.uoregon.edu> writes:
: Luigi Rizzo wrote this message on Tue, Dec 12, 2006 at 06:24 -0800:
: > On Tue, Dec 12, 2006 at 03:17:59PM +0100, Bernd Walter wrote:
: > > On Tue, Dec 12, 2006 at 05:57:56AM -0800, Luigi Rizzo wrote:
: > ...
: > > > then i suppose the proper fix is to revert to m_copy() and
: > > > work on if_simloop() so that 1. it handles a readonly chain, and
: > > > 2. when doing so, it passes up a properly aligned packet...
: > > 
: > > Can't comment on this, as I don't have enough knowledge about network
: > > code.
: > > According to the xscale report it was likely never properly aligned,
: > > the alignment obviously just moved with your change.
: > > 
: > > > however note that there is already some code in net/if_loop.c::if_simloop(),
: > > > just that it uses this:
: > > > 
: > > > 	#if defined(__ia64__) || defined(__sparc64__)
: > ...
: > > > to detect whether the architecture is alignment-sensitive.
: > > > Is there any other identifier that we can use to check ?
: > > 
: > > I wonder how many of these are missing __arm__?
: > 
: > and this is why i wonder if there is a generic identifier
: > that we can use to provide alignment.
: 
: How about?
: #define __NO_STRICT_ALIGNMENT
: 
: It's already defined for amd64 and i386, so all you have to do it test
: that it isn't defined...

__NO_STRICT_ALIGNMENT is relatively new.  Its definition in _types.h,
while established practice in NetBSD, met with considerable
controversy when I tried to expand it in FreeBSD land.  However,
putting things in param.h met with no resistance whatsoever and was
actively suggested.  Maybe we should move this straggler from _types.h
to param.h and start using it more often.

Warner



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