On Mon, 22 Oct 2007 01:31:05 -0700 (PDT)
David Miller <[EMAIL PROTECTED]> wrote:

> 
> On fast paths we aren't going to add things like get_unaligned()
> calls.
> 
> Every architecture should handle unaligned accesses properly, and for
> the fast paths the network driver should provide the packet fully
> aligned or take steps to make it so if it can't DMA directly into
> 2-byte offset buffers (such as copying the packet).
> 

This seems like a rather evil layering violation. The hardware driver needs to 
be aware of every layer between itself and the IP stack for this to work. And 
what does "aligned" mean in this context? 32-bit aligned? 64-bit aligned? The 
entire thing is severely underdocumented (which is why I got hit by the problem 
in the first place).

Also, since I developed the code on a forgiving platform (x86), I didn't notice 
this requirement. Perhaps a WARN_ON(NET_IP_ALIGN && (skb->data & 0x3));?

> What is the specific reason why you see packet headers unaligned?
> It's probably just some AVR networking driver that needs tweaks.

It's my own driver (if_sdio for libertas), which did not reserve two bytes as 
that voodoo was unknown to me.

Rgds
Pierre

Attachment: signature.asc
Description: PGP signature

Reply via email to