Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Aug 2013 14:13:58 -0700
From:      Navdeep Parhar <np@FreeBSD.org>
To:        Andre Oppermann <andre@freebsd.org>
Cc:        svn-src-head@freebsd.org, freebsd-net@freebsd.org, Peter Grehan <grehan@freebsd.org>
Subject:   Re: M_NOFREE removal (was Re: svn commit: r254520 - in head/sys: kern sys)
Message-ID:  <52152D96.5000308@FreeBSD.org>
In-Reply-To: <52152A24.8030109@freebsd.org>
References:  <201308191116.r7JBGsc6065793@svn.freebsd.org> <521256CE.6070706@FreeBSD.org> <5212587A.2080202@freebsd.org> <52128937.1010407@freebsd.org> <52129E55.30803@freebsd.org> <5214D7E8.1080106@freebsd.org> <5214ED19.40907@FreeBSD.org> <5215047C.8080107@freebsd.org> <521505A3.4020103@FreeBSD.org> <52151368.40803@freebsd.org> <52151799.3020809@FreeBSD.org> <52152697.9070500@freebsd.org> <5215288E.6070708@FreeBSD.org> <52152A24.8030109@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 08/21/13 13:59, Andre Oppermann wrote:
> On 21.08.2013 22:52, Navdeep Parhar wrote:
<snip>
>> It is most flexible to let M_NOFREE work without any assumptions
>> attached (must be M_EXT, etc.)  So I still prefer my patch to this.  If
>> you don't have any strong preferences may I commit that one instead?
> 
> I don't mind having your patch.  Though I don't see how it possibly
> can't leak
> mbufs if they are not M_EXT.
> 

Interfaces that are guaranteed to consume and free an mbuf (instead of
potentially queueing it somewhere) can be handed M_NOFREE mbufs with
inline data, and the caller knows that it is always safe to free the
underlying storage after the call.  Clearly, caution is required.  But
let's not completely prohibit use cases like these.

Regards,
Navdeep



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52152D96.5000308>