From owner-freebsd-net Wed Aug 30 15:15: 3 2000 Delivered-To: freebsd-net@freebsd.org Received: from falla.videotron.net (falla.videotron.net [205.151.222.106]) by hub.freebsd.org (Postfix) with ESMTP id 3105337B423 for ; Wed, 30 Aug 2000 15:14:56 -0700 (PDT) Received: from modemcable136.203-201-24.mtl.mc.videotron.net ([24.201.203.136]) by falla.videotron.net (Sun Internet Mail Server sims.3.5.1999.12.14.10.29.p8) with ESMTP id <0G04006REK887N@falla.videotron.net> for freebsd-net@FreeBSD.ORG; Wed, 30 Aug 2000 17:40:57 -0400 (EDT) Date: Wed, 30 Aug 2000 17:44:15 -0400 (EDT) From: Bosko Milekic Subject: Re: Proposal to clarify mbuf handling rules In-reply-to: <200008301953.aa98962@salmon.maths.tcd.ie> X-Sender: bmilekic@jehovah.technokratis.com To: David Malone Cc: freebsd-net@FreeBSD.ORG Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, 30 Aug 2000, David Malone wrote: > Personally, I'd go for the simplest option, to just add a M_RDONLY > flag to the m_flags and use the three condition check for writability. > (That way we can even make normal mbuf read only if we want to - > not that that is necessarily an advantage ;-) > > I guess we could impliment it either way and use macros so it is easy > to change later. > > David. But how would you take care of removing a M_RDONLY flag for an mbuf referring to certain external storage where that one mbuf is not the only mbuf referring to it? i.e. you would have to remove M_RDONLY from all the mbufs referring to the same ext_buf, and this is impossible (and undesired, actually, as it would involve big overhead as a result of giant locks). Or, if that doesn't matter, because you'll be using the three condition check for safe-writability testing, then why do we need the M_RDONLY flag in the first place? Cheers, Bosko Milekic bmilekic@technokratis.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message