Subject: Re: Patch to make upper-layer network protocols align as needed
To: None <thorpej@wasabisystems.com>
From: Darren Reed <darrenr@reed.wattle.id.au>
List: tech-net
Date: 05/12/2002 11:08:31
In some email I received from Jason R Thorpe, sie wrote:
[...]
> 	* New mbuf utility function, m_slurp().  This is like m_pullup()
> 	  except that it always performs the operation, and allows an
> 	  offset into the new buffer to be specified (this allows you to
> 	  leave space for link headers, in case you end up forwarding the
> 	  packet).

Looking at the code, it doesn't always perform the operation - it calls
m_get with M_DONTWAIT, which is what I was expecting to see.

[...]
> Yes, I know there are other ways to do this ... in particular, another
> way would be to copy the headers into a buffer on the stack, and eliminate
> all the places that assume the IP/TCP/UDP headers can be modified in-place.
> That, however, is a pretty major undertaking, and I'd prefer to make
> incremental progress.

I imagine a new set of structures to describe these protocols that were
alignment agnostic would also be in order ?

Hmmm, maybe there should be a single structure which holds all of the mbuf
statistic counters rather than having MPFail, MSFail, etc.  Then we could
make that available via sysctl too...maybe I should come back with a patch
for that ?

Darren