[openib-general] [PATCH] Opensm - wrong assertions in error callbacks

Yael Kalka yael at mellanox.co.il
Tue Nov 22 04:19:05 PST 2005


Hi Hal,

I saw that in the send_err_callback functions both in osm_sa_mad_ctrl
and in osm_sm_mad_ctrl are wrong. I assume we haven't encountered
these problems since we haven't encountered send errors on debug
mode...
In osm_sa_mad_ctrl - all mads should be with resp_expected == FALSE
(and not TRUE), as these are all responses.
In osm_sm_mad_ctrl - we can send both requests and responses (for
SMInfo, for example), so no use in checking the resp_expected flag.
This patch fixes these issues.

Thanks,
Yael

Signed-off-by:  Yael Kalka <yael at mellanox.co.il>

Index: opensm/osm_sa_mad_ctrl.c
===================================================================
--- opensm/osm_sa_mad_ctrl.c	(revision 4109)
+++ opensm/osm_sa_mad_ctrl.c	(working copy)
@@ -423,7 +423,7 @@ __osm_sa_mad_ctrl_send_err_callback(
     Unless we generated a Report(Notice)
   */
   CL_ASSERT( p_madw );
-  CL_ASSERT( p_madw->resp_expected == TRUE);
+  CL_ASSERT( p_madw->resp_expected == FALSE);
 
   /*
     An error occurred.  No response was received to a request MAD.
Index: opensm/osm_sm_mad_ctrl.c
===================================================================
--- opensm/osm_sm_mad_ctrl.c	(revision 4109)
+++ opensm/osm_sm_mad_ctrl.c	(working copy)
@@ -815,7 +815,6 @@ __osm_sm_mad_ctrl_send_err_cb(
            ib_get_err_str( p_madw->status ) );
 
   CL_ASSERT( p_madw );
-  CL_ASSERT( p_madw->resp_expected == TRUE );
 
   /* 
      If this was a SubnSet MAD, then this error might indicate a problem




More information about the general mailing list