From owner-freebsd-current Fri Nov 16 16: 4:39 2001 Delivered-To: freebsd-current@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id C77A837B418 for ; Fri, 16 Nov 2001 16:04:36 -0800 (PST) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id fAH03Ia60157; Fri, 16 Nov 2001 18:03:18 -0600 (CST) (envelope-from jlemon) Date: Fri, 16 Nov 2001 18:03:18 -0600 (CST) From: Jonathan Lemon Message-Id: <200111170003.fAH03Ia60157@prism.flugsvamp.com> To: julian@vicor-nb.com, current@freebsd.org Subject: Re: re-entrancy and the IP stack. X-Newsgroups: local.mail.freebsd-current In-Reply-To: Organization: Cc: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article you write: >As another example, the ipfw code uses a couple of static >variables too, in the 'fwd' code amongst other places.. > >What is needed is obviously a 'per packet' storage location >for those things, defined in a "per protocol family" manner. > >Luigi has already tried this scheme by defining a >dummynet specific mbuf type that can be prepended to the >front of packets. What I suggest is to extend this >to defining a MT_PROTOSTORAGE. (or similar) mbuf type >that generic networking code is educated to ignore, >and that protocols can use to pass packet-specific state >information from one place to another. Um, no please. MT_DUMMYNET is a bad hack that should be removed (and which I've partly done in one of my trees). I would rather not perpetuate this, it causes more problems than it is worth. I believe that Garrett went in a while back and removed all the abuses of mbuf (used to store sockaddrs and the like), and this would appear to be a step backward. I don't disagree that there are many static variables that need to be cleaned up, but I don't believe that this is the right approach. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message