Thread (5 messages) 5 messages, 4 authors, 2011-06-20

RE: [PATCH] fs_enet: fix freescale FCC ethernet dp buffer alignment

From: David Laight <hidden>
Date: 2011-06-17 10:18:10
Also in: linuxppc-dev

 
Hello,
Motioned to the memory aligned, now there is such requirement:
When the driver send an packet to hardware, the skb's address passed
by
stack do a dma map into hardware, the skb's dma address must 
be 64-byte aligned.
Does the hardware support buffer chaining?
In which case you only need to copy the data upto the first
64 byte boundary into another buffer.

Actually, given that you are likely to have to fixup every
fragment of the frame being transmitted, if might be worth
allocating a fixed transmnit buffer area and copying the
frames into it prior to sending.
Certainly you need to allow for transmits made up of a
significant number of small buffers linked together.

Really you should beat up the hardware designers!

Copying the data to even a 4 byte boundary is almost
always a misaligned copy. Typically this only applies
to the receive dma - when writing a 2 byte pad before
the frame data would be much better.

	David

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help