netdev
[Top] [All Lists]

Re: alignment issues on netif_rx

To: jes@xxxxxxxxxxxxx (Jes Sorensen)
Subject: Re: alignment issues on netif_rx
From: kuznet@xxxxxxxxxxxxx
Date: Wed, 20 Dec 2000 22:48:27 +0300 (MSK)
Cc: netdev@xxxxxxxxxxx, davem@xxxxxxxxxx
In-reply-to: <d3wvcuq3z8.fsf@lxplus015.cern.ch> from "Jes Sorensen" at Dec 20, 0 08:36:59 pm
Sender: owner-netdev@xxxxxxxxxxx
Hello!

> Yes I did - you said we should only split off the Ethernet header but
> as Don stated in his email some cards wont allow non-word length DMA
> transactions either. Hence you cannot split off a 14 byte header and
> get your IP+TCP headers aligned.

DMA has nothing to do with this. At all. This happens each time
when encapsulation is badly designed like ethernetII,
ISDN is another example.

If alignment is wrong, it can restored without copying data.
This happens automatically, as soon as alignment is guessed.
Particularly, if driver copies EthernetII MAC header to finish
aligned at 4 byte boundary, no more unaligned accesses will happen.
Headers are fetched with memcpy to correclty aligned area,
when they are required.

Alexey

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