Subject: Re: new mbuf API
To: None <>
From: Pavel Cahyna <>
List: tech-net
Date: 04/20/2007 19:50:22
On Fri, Apr 20, 2007 at 01:40:16PM -0400, Greg Troxel wrote:
>   What I've missed there was a description of "guaranteed contiguous
>   data". The problem is that one function can make part of the mbuf chanin
>   contiguous (like m_pulldown or one of the new functions), but a
>   subsequent call can fragment the chain again. To prevent this, I have
>   introduced the notion of "guaranteed contiguous data". If a function
>   makes a range of a mbuf chain contiguous, it also marks it as a
>   guaranteed contiguous region and subsequent calls to mbuf rearranging
>   functions must keep it contiguous.
> If it's not safe for a caller to assume it's still true, then the word
> guaranteed shouldn't be used.  What you're describing is more like an
> efficiency hint.  This also seems complicated, and if a caller can't
> safely omit checks, I'm not sure how much is gained.

The purpose is exactly to be able to omit checks.