Subject: Re: unaligned mbufs and dma
To: Johan Danielsson <email@example.com>
From: Jason Thorpe <firstname.lastname@example.org>
Date: 11/08/1999 17:29:55
On 08 Nov 1999 22:00:28 +0100
email@example.com (Johan Danielsson) wrote:
> I guess there isn't any better way to solve hardware alignment
> requirements than the one used by the roadrunner driver (basically
> traverse the mbuf chain, and fix unaligned mbufs)? Should perhaps this
> functionality be provided in some driver independent way?
For transmitting? Not really. What e.g. the `vr' driver does is simply:
- if mbuf is unaligned or if it is comprised of more than
one DMA segment, copy the entire packet into an mbuf with
Yes, it's a real pain in the arse.
For receiving, it depends. There are a few ways one can solve this:
- Pass unaligned data to the upper layers and let it align
- Do the copy song-and-dance like we do now.
- Be a little more clever with how you set up receive descriptors
so you have to copy less (looking into doing this with the new
-- Jason R. Thorpe <firstname.lastname@example.org>