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

Yossi Leybovich sleybo at mellanox.co.il
Wed Nov 1 23:48:43 PST 2006


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 .
Yossi  

> -----Original Message-----
> From: openib-windows-bounces at openib.org 
> [mailto:openib-windows-bounces at openib.org] On Behalf Of Yossi 
> Leybovich
> Sent: Sunday, October 29, 2006 3:07 PM
> To: Estrin, Alex; Yossi Leybovich
> Cc: openib-windows at openib.org
> Subject: Re: [Openib-windows] [IBAL][Patch] reference counter 
> for IOC obj in IOC PnP manager
> 
> Hi
> 
> Thanks for the patch I am reviewing it to check if the 
> query_cnt field can be use to track the outstanding queries.
> Any way see below my comment 
> 
> > -----Original Message-----
> > From: openib-windows-bounces at openib.org 
> > [mailto:openib-windows-bounces at openib.org] On Behalf Of Estrin, Alex
> > Sent: Friday, October 27, 2006 1:43 AM
> > To: Yossi Leybovich
> > Cc: openib-windows at openib.org
> > Subject: [Openib-windows] [IBAL][Patch] reference counter 
> for IOC obj 
> > in IOC PnP manager
> > 
> > Hi Yossi,
> > 
> > This patch introduces a reference counter to protect ioc obj from 
> > double memory free.
> > 
> > Possible scenario - IOC Manager handles PORT_DOWN event, 
> frees ioc obj 
> > and put it back to the pool, while there are outstanding 
> send MAD svc 
> > that has reference to that ioc obj.
> > On timeout send callback will try to free ioc obj again.
> > 
> > By using this counter we also protect ioc obj from return 
> to the pool 
> > and possible reusage while outstanding send mad keeps it's 
> reference.
> > Please review.
> > 
> > Thanks,
> > Alex
> > 
> ...
> >  
> >  				cl_atomic_inc(
> > &p_results->p_svc->query_cnt );
> >  			}
> > +			if( status == IB_SUCCESS )
> > +				cl_atomic_inc( &p_ioc->ref_cnt );
> 
> The AL create mad for each chunk of 4 service entries it 
> create list from the mad and post it.
> I think that we need to take reference for each mad we send 
> and not for each mad list we post ( same as the query_cnt) 
> What do you think ?
> 
> >  		}
> >  	}
> >  
> > 
> 
> _______________________________________________
> openib-windows mailing list
> openib-windows at openib.org
> http://openib.org/mailman/listinfo/openib-windows
> 




More information about the ofw mailing list