________________________________ From: Alex Naslednikov [mailto:[email protected]] Sent: Tuesday, January 04, 2011 12:48 AM To: Smith, Stan; [email protected] Subject: RE: [ofw] [Patch][IPoIB]
Happy New Year, Stan ! The ipoib_adapter.cpp line numbers are greatly skewed? Line 994 in your patch equates to line 1146? The line were skewed probably because of non-updated version of WoF code. But, as I promised, I always use WoF code to create patch and not Mellanox distribution :) Thanks. Also, I would like to point your attention that this patch is for IPoIB and not IPoIB_NDIS6_CM (this is porting of the same patch from NDIS6 code). Thus, you should look on ipoib_adapter.c and not ipoib_adapter.cpp Wow - did I ever miss that one! oops. Does this patch imply the removal of the globals g_reset & g_reset_complete and their logic? These variable aren't exist at NDIS5 code. Understood. From: Smith, Stan [mailto:[email protected]] Sent: Monday, January 03, 2011 10:09 PM To: Alex Naslednikov; [email protected] Subject: RE: [ofw] [Patch][IPoIB] Hello Alex and Happy New Year! The ipoib_adapter.cpp line numbers are greatly skewed? Line 994 in your patch equates to line 1146? Does this patch imply the removal of the globals g_reset & g_reset_complete and their logic? thanks, stan. ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Alex Naslednikov Sent: Monday, January 03, 2011 7:46 AM To: [email protected] Subject: [ofw] [Patch][IPoIB] [IPoIB] This is the merge of commit from NDIS6 tree The purpose of __ipoib_complete_reset() is to send to NDIS async compete on reset process accomplishment and set "p_adapter->reset = FALSE"; But __ipoib_complete_reset() can be called independently from several async threads (i.e. running in parallel), where the main of them are: 1. __ipoib_adapter_reset() 2. Ipoib_pnp_cb() It seems like bug, but: 1. We check for adapter state within __ipoib_complete_reset() . This is to sync between NDIS and IBAL async PNP events !! 2. According to the status, we have 2 possibilities: a. State == IB_PNP_PORT_REMOVE - than complete the reset now (and ASSERT(p_adapter->reset == TRUE) should be true there)) b. Otherwise (IB_PNP_PORT_ADD), register back to pnp events i. If succeed, do not complete reset here - reset process will be completed by ipoib_pnp_cb() thread. ii. If not, reset process will be completed now (ASSERT(p_adapter->reset == TRUE) should be true there) How it can happen ? NDIS detected checked_for_hung while IPoIB get PORT_DOWN/UP pnp events Index: B:/users/xalex/WoF-trunk/ulp/ipoib/kernel/ipoib_adapter.c =================================================================== --- B:/users/xalex/WoF-trunk/ulp/ipoib/kernel/ipoib_adapter.c (revision 3053) +++ B:/users/xalex/WoF-trunk/ulp/ipoib/kernel/ipoib_adapter.c (working copy) @@ -994,12 +994,13 @@ if( p_port ) ipoib_port_destroy( p_port ); - ASSERT(p_adapter->reset == TRUE); + if( state != IB_PNP_PORT_REMOVE ) { status = __ipoib_pnp_reg( p_adapter, IB_PNP_FLAG_REG_COMPLETE ); if( status != IB_SUCCESS ) { + ASSERT( p_adapter->reset == TRUE ); p_adapter->reset = FALSE; IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR, ("__ipoib_pnp_reg returned %s\n", @@ -1010,6 +1011,7 @@ } else { + ASSERT( p_adapter->reset == TRUE ); p_adapter->reset = FALSE; NdisMResetComplete( p_adapter->h_adapter, NDIS_STATUS_SUCCESS, TRUE ); Alexander (XaleX) Naslednikov SW Networking Team Mellanox Technologies
_______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
