On Fri, 16 Nov 2001, Jonathan Lemon wrote:

> In article <local.mail.freebsd-current/[EMAIL PROTECTED]> 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.

sure, but how about some suggestions then?
personally Holding static things in mbufs is an abuse,
and even things that are dynamic but can be better
passed as an argument.

Maybe just some extra arguments can cover it..
but that's not very extensible, and you can't queue arguments.

 
> -- 
> Jonathan
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
> 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to