> I remember adding the missing ipif_refrele() to ipif_get_next_ipif() to make > this work, but then taking it out again... My recollection is that it's > generally better to walk the ipif list under ill_lock; if you use > ipif_get_next_ipif() you grab and release ill_lock 2*N times (N being the > number of ipifs checked until you find a match). It's only when the code > inside the loop can't work under ill_lock that you have no choice but using > refheld ipifs. > > http://cvs.opensolaris.org/source/xref/on/usr/src/uts/common/inet/ip/ip_if.c#23048 > is an example of walking the ipif list under ill_lock.
Thanks Blaise. This suggests (to me) that we should simply do away with the current incantation of ipif_get_next_ipif() and replace its widespread use of NULL as the first parameter with an ipif_get_first_ipif(). For the few sections of code that walk it, use a loop similar to the one below. Darren This message posted from opensolaris.org _______________________________________________ networking-discuss mailing list [email protected]
