Subject: Re: if_delete * if_alloc
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 07/09/1997 13:55:30
At 10:28 AM 7/9/97 -0700, Jason Thorpe wrote:
> > leave the ifnet in the ethercom, and add all the refcount stuff. When
> > the count gets to zero, an (*if_iffree) routine'd get called which'd
> > delete the ifnet, probably by deleting the softc it's within. The softc
> > could already have been unhooked from the config tree.
>
>Anyhow, I don't like that idea so much... It seems much less correct to
>me... But, I don't have the time or energy to get into an argument about
>it, so...

I don't like the idea of a separately malloc'ed ifnet structure because
of efficiency reasons.  Drivers refer to that structure quite a bit and
adding indirect references adds much code (especially on register-poor
architecures list x86).  It also forces me to opaque the ifnet which 
just makes the code even harder to read.

I rather be called back so I can free the softc myself.  Please add an
IFF_DEAD bit.  Also increase if_flags to an int (this will help the
alpha significantly since it can just use longword reference instead
of masking and shifting).
-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt.html
Nashua, NH                Disclaimer: I disavow all knowledge of this message