linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Un aligned addresses
@ 2005-12-22  6:36 Conio sandiago
  2005-12-22  7:31 ` David S. Miller
  2005-12-22 23:28 ` Willy Tarreau
  0 siblings, 2 replies; 3+ messages in thread
From: Conio sandiago @ 2005-12-22  6:36 UTC (permalink / raw)
  To: linux-kernel

Hi all
i have a embedded monta vista linux running.
i have developed a ethernet driver.
Its working Ok,
But i am facing some problem with the throughput.

After a lot of observation ,
i observed that i am getting un-aligned addresses of the data payload
from the TCP/IP stack.because of this problem i always have to do
memcpy to a word aligned buffer,because of which throughput is reduced
significantly.

Does anybody has some solution for this.
Regards
conio

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Un aligned addresses
  2005-12-22  6:36 Un aligned addresses Conio sandiago
@ 2005-12-22  7:31 ` David S. Miller
  2005-12-22 23:28 ` Willy Tarreau
  1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2005-12-22  7:31 UTC (permalink / raw)
  To: coniodiago; +Cc: linux-kernel

From: Conio sandiago <coniodiago@gmail.com>
Date: Thu, 22 Dec 2005 12:06:46 +0530

> After a lot of observation ,
> i observed that i am getting un-aligned addresses of the data payload
> from the TCP/IP stack.because of this problem i always have to do
> memcpy to a word aligned buffer,because of which throughput is reduced
> significantly.

Do skb_reserve(skb, 2), before you give the buffer at
skb->data to the chip, this will align all the headers
correctly.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Un aligned addresses
  2005-12-22  6:36 Un aligned addresses Conio sandiago
  2005-12-22  7:31 ` David S. Miller
@ 2005-12-22 23:28 ` Willy Tarreau
  1 sibling, 0 replies; 3+ messages in thread
From: Willy Tarreau @ 2005-12-22 23:28 UTC (permalink / raw)
  To: Conio sandiago; +Cc: linux-kernel

On Thu, Dec 22, 2005 at 12:06:46PM +0530, Conio sandiago wrote:
> Hi all
> i have a embedded monta vista linux running.
> i have developed a ethernet driver.
> Its working Ok,
> But i am facing some problem with the throughput.
> 
> After a lot of observation ,
> i observed that i am getting un-aligned addresses of the data payload
> from the TCP/IP stack.because of this problem i always have to do
> memcpy to a word aligned buffer,because of which throughput is reduced
> significantly.
>
> Does anybody has some solution for this.

I guess your driver is not working that much OK yet. Many (most)
ethernet boards today will align the IP header on a 4 or 16 bytes boundary.
By default, the ethernet header being 14 bytes, it unaligns the IP header.
But some boards will leave a hole between those. Probably that your driver
needs to tell the hardware to do this. Or maybe you can program the DMA
to get on 4x+2 so that IP gets aligned ?

Anyway, I don't know whether I'm loosing my time because last time
you sent such a report about your driver, I asked for a little more
precisions, which I never received.

> Regards
> conio

Willy


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-22 23:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-22  6:36 Un aligned addresses Conio sandiago
2005-12-22  7:31 ` David S. Miller
2005-12-22 23:28 ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).