[lkml]   [2003]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: New struct sock_common breaks parisc 64 bit compiles with a misalignment
On Sun, 2003-06-15 at 09:35, David S. Miller wrote:
> Welcome to the real world, unaligned accesses are perfectly
> legal in the networking stack.

I didn't say we couldn't do unaligned accesses, I said we have to do
them by marking the structure as potentially misaligned so the compiler
generates instructions that won't trap.

It's slightly more expensive to access the structure this way (the
compiler usually does eight byte loads instead of a double word load,
but it's still far cheaper than having an unaligned access trap).

> They are in fact guarenteed to occur when certain protocols
> are encapsulated in others.
> Please add an unaligned trap handler for parisc64, thanks.

It's not necessary and would, indeed, be detrimental to operation since
we'd generate alignment traps on almost every encapsulated protocol (at
several hundred instructions per trap). If we do this, our network
performance will tank.

As of 2.5.70, the networking layer seems to comply perfectly with the
parisc requirements (at least we don't have any misaligned access trap
panics from it), so most of the structures are correctly marked, anyway.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:36    [W:0.021 / U:3.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site