Subject: Re: m_defrag() addition
To: Martin Husemann <martin@duskware.de>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-kern
Date: 02/20/2005 18:33:06
On Sun, Feb 20, 2005 at 06:25:25PM +0100, Martin Husemann wrote:
> This is one potential use of the suggested function. It may make sense
> to just call it ("try to optimize this, let me deal with it if you can't")
> before trying to waste dma resouces.

Nope - you don't want to copy mbuf contents (and/or allocate additional
memory) unless there is no other way to get the packet into the wire.
 
> > It does happen that a mbuf chain contains too many non-continuous
> > segments.
> 
> That is a reason the bus_dmamap_load_mbuf() fails - I was asking about
> failure reasons for the new function.

The new function would fail if the packet is bigger than MCLBYTES
(for now), or when it's impossible to allocate memory for new mbuf
or the mbuf cluster.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We can walk our road together if our goals are all the same;     -=-
-=- We can run alone and free if we pursue a different aim.          -=-