Subject: Re: Patch to make upper-layer network protocols align as needed
To: None <tech-net@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-net
Date: 05/22/2002 13:38:45
In article <9957.1022051171@itojun.org>,  <itojun@iijlab.net> wrote:
>> > 	the "side-effect" will happen only if m_pullup() is called, or
>> > 	m_pulldown() is called with off == 0 (2nd arg).  i guess we need
>> > 	some check in IP6_EXTHDR_GET() macro.
>>Can you cook something up for this?
>
>	sorry for the delay, how about this?
>	not sure if ALIGN() is the correct way to detect unalignedness.
>	testers wanted, with align-picky archs (i have i386 only).

Since most of the values are re-computed, I suggest that we put them
in temporary variables before doing the tests for both clarity and
efficiency. In addition, if ALIGNED() macro can be written a lot more
efficiently in an MD way. I.e. for the i386 it can be (1).

christos