[ofw] [Patch] Adding instrumental code for reset flow

Smith, Stan stan.smith at intel.com
Wed Nov 24 20:03:55 PST 2010


Hello,
  Since this patch is basically long term debug support, why not put all of it under '#if DBG' ?
Incrementing g_reset, for the free build the ASSERT() is gone hence no check, makes questionable sense?
Full on or full off.
Good catch on the typo.

stan.

________________________________
From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Alex Naslednikov
Sent: Tuesday, November 23, 2010 12:16 AM
To: ofw at lists.openfabrics.org
Subject: [ofw] [Patch] Adding instrumental code for reset flow

New counters added; no functionality changes
Signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)

Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp
===================================================================
--- ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp         (revision 3000)
+++ ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp      (working copy)
@@ -51,7 +51,10 @@
 #define FOUR_X_IN_100BPS    100000000
 #define TWELVE_X_IN_100BPS                300000000

+extern ULONG g_reset;
+extern ULONG g_reset_complete;

+
 /* Declarations */
 static void
 adapter_construct(
@@ -139,6 +142,9 @@
                                ("ipoib_state remained IPOIB_PAUSED and will be changed at ipoib_restart()\n") );
                }
                KeReleaseInStackQueuedSpinLock( &hdl );
+
+             ++g_reset_complete;
+             ASSERT( g_reset == g_reset_complete );

                p_adapter->reset = FALSE;
                NdisMResetComplete(
@@ -1067,7 +1073,7 @@
                                }
                                else
                                {
-                                              // This sittuation happened in real life:
+                                             // This situation happened in real life:
                                                // NDIS called to reset and right after to pause, before the reset was completed
                                                // Thus, when ipoib will try to complete reset, state may be already changed to IPOIB_PAUSE
                                                ASSERT(  p_adapter->ipoib_state == IPOIB_PAUSED );
@@ -1075,6 +1081,8 @@
                                                ("ipoib_state remained IPOIB_PAUSED and will be changed at ipoib_restart()\n") );
                                }
                                KeReleaseInStackQueuedSpinLock( &hdl );
+                             ++g_reset_complete;
+                             ASSERT( g_reset == g_reset_complete );

                }
                IPOIB_EXIT( IPOIB_DBG_INIT );
@@ -1762,4 +1770,4 @@
                cl_spinlock_release( &p_adapter->send_stat_lock );

                IPOIB_EXIT( IPOIB_DBG_STAT );
-}
+}
\ No newline at end of file

Alexander (XaleX) Naslednikov
SW Networking Team
Mellanox Technologies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101124/9a2e0f83/attachment.html>


More information about the ofw mailing list