cvs commit: src/sys/netinet raw_ip.c

Robert Watson rwatson at freebsd.org
Tue Jul 20 15:42:48 PDT 2004


On Tue, 20 Jul 2004, Alfred Perlstein wrote:

> * Robert Watson <rwatson at FreeBSD.org> [040720 13:52] wrote:
> > rwatson     2004-07-20 20:52:30 UTC
> > 
> >   FreeBSD src repository
> > 
> >   Modified files:
> >     sys/netinet          raw_ip.c 
> >   Log:
> >   M_PREPEND() the IP header on to the front of an outgoing raw IP packet
> >   using M_DONTWAIT rather than M_WAITOK to avoid sleeping on memory
> >   while holding a mutex.
> 
> Isn't there a call we can add to mget/malloc/zalloc to do this:
> 
> if (flags & _WAIT)
>    ask_witness_if_we_can_sleep
> 
> deferring to the actual tsleep call will never catch as many.
> 
> If you don't have the time, I may be able to get to this tonight.

In my previous e-mail, I think I misunderstood your question.  The answer
to your question is Yes, but I think that you can also look at adding one
to M_PREPEND() since it won't always call into m_prepend().  Sorry for the
confusion!

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org      Principal Research Scientist, McAfee Research



More information about the cvs-src mailing list