From owner-freebsd-net Wed Aug 30 11:53: 5 2000 Delivered-To: freebsd-net@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 84B0837B43E for ; Wed, 30 Aug 2000 11:53:02 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 30 Aug 2000 19:53:01 +0100 (BST) To: Bosko Milekic Cc: David Malone , freebsd-net@FreeBSD.ORG Subject: Re: Proposal to clarify mbuf handling rules In-reply-to: Your message of "Tue, 29 Aug 2000 20:39:35 EDT." X-Request-Do: Date: Wed, 30 Aug 2000 19:53:00 +0100 From: David Malone Message-ID: <200008301953.aa98962@salmon.maths.tcd.ie> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > If we decide to go with the above proposal, there can be one macro to > set perms, and it can be of course used to remove a bit as well. There > can also be two "wrapper" macros that will essentially either call the > reference count increment macro and set RDONLY if it becomes > 1 or call > the reference count decrement macro and unset RDONLY if it becomes > exactly 1. The wrapper macros are only to be called for those wishing > this specific behavior. We can have a number of such macros, if we judge > them to be useful, based on the different possibilities that you listed > at the beginning of this Email. 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message