[ofw] [Patch][IPoIB]
Alex Naslednikov
xalex at mellanox.co.il
Tue Jan 4 00:47:55 PST 2011
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 :)
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
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.
From: Smith, Stan [mailto:stan.smith at intel.com]
Sent: Monday, January 03, 2011 10:09 PM
To: Alex Naslednikov; ofw at lists.openfabrics.org
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: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Alex Naslednikov
Sent: Monday, January 03, 2011 7:46 AM
To: ofw at lists.openfabrics.org
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110104/c325469c/attachment.html>
More information about the ofw
mailing list