[Openib-windows] [PATCH] FRM ref count
Yossi Leybovich
sleybo at mellanox.co.il
Tue Aug 29 02:13:16 PDT 2006
Fab
There was error in the reference counting of FMR.
In the destroy flow no need to deref the al obj because we are resetting
the al obj ( set ref to 1) before inserting it to the fmr pool.
(the same behavior as MR)
I added few cosmetics changes (comment and print fix)
pls apply
Thanks
Yossi
Singed-off-by: Yossi Leybovich (sleybo at mellanox.co.il)
Index: al/kernel/al_mr.c
===================================================================
--- al/kernel/al_mr.c (revision 1631)
+++ al/kernel/al_mr.c (working copy)
@@ -206,6 +206,7 @@
}
*ph_fmr = h_fmr;
+ /* Release the reference taken in alloc_mlnx_fmr for initialization.
*/
deref_al_obj( &(*ph_fmr )->obj );
AL_EXIT( AL_DBG_MR );
@@ -245,7 +246,7 @@
if( status != IB_SUCCESS )
{
//TODO: do we need to do something more about the error ?
- AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
+ AL_PRINT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
("unable to map FMR: %s\n", ib_get_err_str(status)) );
}
@@ -307,11 +308,14 @@
if( status == IB_SUCCESS )
{
h_fmr->h_ci_fmr = NULL;
- /* We're good to destroy the object. */
+ /* We're good to destroy the object.
+ NOTE: No need to deref the al object ,
+ we are reseting the fmr objb before inserting it back to the pool */
+
h_fmr->obj.pfn_destroy( &h_fmr->obj, NULL );
+ }else{
+ deref_al_obj( &h_fmr->obj );
}
- deref_al_obj( &h_fmr->obj );
-
AL_EXIT( AL_DBG_MR );
return status;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fmr_deref.patch
Type: application/octet-stream
Size: 1119 bytes
Desc: fmr_deref.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20060829/3daf12b1/attachment.obj>
More information about the ofw
mailing list