[ofw] [PATCH] Cleanup CEPs after all child objects have beendestroyed
Leonid Keller
leonid at mellanox.co.il
Wed Jul 2 10:58:00 PDT 2008
Applied in 1328. Thank you.
> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Fab Tillier
> Sent: Wednesday, July 02, 2008 8:17 PM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] Cleanup CEPs after all child objects
> have beendestroyed
>
> IBAL currently blows away all CEPs from its 'destroying'
> callback. This patch moves this so that any left over CEPs
> are cleaned up in the 'cleanup' callback, so that objects
> that 'own' a CEP have a chance to clean themselves up first.
>
> Signed-off-by: Fab Tillier <ftillier at microsoft.com>
>
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id:
> old\core\al\al.c trunk\core\al\al.c
> --- old\core\al\al.c Tue Jul 01 10:36:06 2008
> +++ trunk\core\al\al.c Wed Jul 02 10:14:04 2008
> @@ -116,11 +116,16 @@ destroying_al(
> }
>
> cl_spinlock_release( &p_obj->lock );
> +}
> +
>
> +void
> +cleanup_al(
> + IN al_obj_t
> *p_obj )
> +{
> /* Cleanup any left-over connections. */
> - al_cep_cleanup_al( h_al );
> + al_cep_cleanup_al( PARENT_STRUCT( p_obj, ib_al_t, obj ) );
> }
> -
>
>
> static void
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id:
> old\core\al\al.h trunk\core\al\al.h
> --- old\core\al\al.h Tue Jul 01 10:36:06 2008
> +++ trunk\core\al\al.h Wed Jul 02 10:14:04 2008
> @@ -109,6 +109,11 @@ destroying_al(
>
>
> void
> +cleanup_al(
> + IN al_obj_t
> *p_obj );
> +
> +
> +void
> free_al(
> IN al_obj_t
> *p_obj );
>
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id:
> old\core\al\kernel\al_mgr.c trunk\core\al\kernel\al_mgr.c
> --- old\core\al\kernel\al_mgr.c Tue Jul 01 10:36:03 2008
> +++ trunk\core\al\kernel\al_mgr.c Wed Jul 02 10:14:04 2008
> @@ -414,7 +414,7 @@ ib_open_al(
>
> /* Initialize the base object. */
> status = init_al_obj( &h_al->obj, NULL, FALSE,
> - destroying_al, NULL, free_al );
> + destroying_al, cleanup_al, free_al );
> if( status != IB_SUCCESS )
> {
> free_al( &h_al->obj );
>
More information about the ofw
mailing list