netdev
[Top] [All Lists]

Re: Making the NS83820 usable on IA64

To: Peter Chubb <peterc@xxxxxxxxxxxxxxxxxx>
Subject: Re: Making the NS83820 usable on IA64
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Tue, 16 Mar 2004 21:49:12 -0800
Cc: linux-ia64@xxxxxxxxxxxxxxx, linux-net@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <16471.52400.222262.824746@wombat.disy.cse.unsw.edu.au>
References: <16471.52400.222262.824746@wombat.disy.cse.unsw.edu.au>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 17 Mar 2004 14:57:36 +1100
Peter Chubb <peterc@xxxxxxxxxxxxxxxxxx> wrote:

> The idea is to tell gcc that the IP header is 2-byte aligned,
> so it can generate the right code to access it.  Otherwise, it tries
> to do a 4-byte load when trying to extract the header length bitfield,
> which traps.  As far as I read the C standard, gcc can do almost
> whatever it wants as regarding the alignment and underlying storage
> size of a bitfield, so it's free to assume 32-bit alignment if it
> wants.

This makes every piece of code only able to assume 2-byte
alignment.  I don't think this will get accepted :)

<Prev in Thread] Current Thread [Next in Thread>