Subject: Re: if_delete * if_alloc
To: Bill Studenmund <>
From: Jason Thorpe <>
List: tech-kern
Date: 07/09/1997 10:24:00
On Wed, 9 Jul 1997 10:13:23 -0700 (PDT) (Bill Studenmund) wrote:

 > Would it be ok to postpone deleting the softc a bit? The idea would be to
 > 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.

The softc is malloc'd data... you either free it or you don't.  The way
you free "only parts of it" is to allocate them separately, which is
what if_alloc()/if_free() is supposed to do.

Jason R. Thorpe                             
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939