[Openib-windows] [IBAL][Patch] reference counter for IOC obj in IOC PnP manager

Yossi Leybovich sleybo at mellanox.co.il
Sun Nov 26 00:53:52 PST 2006


 

> -----Original Message-----
> From: Fabian Tillier [mailto:ftillier.sst at gmail.com] 
> Sent: Thursday, November 23, 2006 6:55 AM
> To: Yossi Leybovich
> Cc: Estrin, Alex; openib-windows at openib.org
> Subject: Re: [Openib-windows] [IBAL][Patch] reference counter 
> for IOC obj in IOC PnP manager
> 
> Hi Yossi,
> 
> On 11/1/06, Yossi Leybovich <sleybo at mellanox.co.il> wrote:
> > I am also encountering case when ioc_async_cb was called when 
> > query_cnt != 0 , I am trying to solve this problem I hope it will 
> > solve also the ref_cnt problem .
> 
> I think these are two different problems.  The problem you 
> are encountering is likely due to the timer firing while 
> queries are outstanding.  The only case where this could 
> happen that I can think of is on a PORT_UP event (where the 
> timer is set again).  Otherwise, the timer doesn't get sent 
> until the sweep is complete.
> 
Yes that the problem I was addressed.
(The SM moved up/down )

> The problem Alex reported has to deal with PORT_DOWN, where 
> the IOC and IOU map is cleaned up immediately, even if there 
> are outstanding MADs.  In general, it's good practice to 
> reference count structures when they will be used as the 
> context for a callback.
> 

Wouldn't it make more sense to change the port_down process to work like
this:
- change the SWEEP status to STOPPED (NO more query will be issue)
- wait till all the svc->query_cnt will be zero .
- destroy the IOU/ IOC maps

In this state there shouldn't be any queries outstanding.
And it safe to destroy the IOC/IOU

What do you think ?


> It probably makes sense to apply Alex's changes, and then 
> whatever other changes you need to prevent concurrent sweeps.
> 
> - Fab
> 
> 
> 




More information about the ofw mailing list