Subject: Re: Some observations about DMA segment count
To: None <firstname.lastname@example.org>
From: None <email@example.com>
Date: 07/27/2001 04:25:19
> > Thoughts on what to do about this? There should certainly be room in front
> > of the packet for the link header, and we should try to avoid allocating
> > the extra mbuf.
>So, FWIW, I fixed this. See M_READONLY() in sys/mbuf.h, and how it is
>used by M_LEADINGSPACE() and M_TRAILINGSPACE().
traditionally it was a requirement for the caller of the M_*SPACE to
check if the mbuf is under M_READONLY situation or not. the check
is not normally made on the input path as we are sure it is not
shared on input path (WARNING: some packet filter directives, like
"duplicate this traffic", break the assumption).
the above change can choke certain code (which uses M_LEADINGSPACE when
doing some mbuf length computation, not just for playing with m_data
for example), IMHO.