[Openib-windows] [IBAL][Patch] reference counter for IOC obj in IOC PnP manager
Yossi Leybovich
sleybo at mellanox.co.il
Sun Oct 29 05:07:13 PST 2006
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 ?
> }
> }
>
>
More information about the ofw
mailing list