[ofw] wrong assert - patch

Smith, Stan stan.smith at intel.com
Mon Aug 15 09:05:28 PDT 2011


Look entirely reasonable; please commit.

Stan.

From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Uri Habusha
Sent: Sunday, August 14, 2011 10:22 PM
To: ofw at lists.openfabrics.org; Firas Mahameed
Subject: [ofw] wrong assert - patch

Description:
If one starts opensm with -P flag. (opensm -P config.conf).
He will get the following ASSERT in spl_qp_svc_update_cache function:
CL_ASSERT(!p_mad->status) , while p_mad->status == 0x80

Fix:
Use ib_smp_get_status instead to refine the assert.


Index: al_smi.c
===================================================================
--- al_smi.c          (revision 3262)
+++ al_smi.c       (working copy)
@@ -1661,7 +1661,7 @@
               CL_ASSERT( p_mad );
               CL_ASSERT( p_mad->mgmt_class == IB_MCLASS_SUBN_DIR ||
                                                                p_mad->mgmt_class == IB_MCLASS_SUBN_LID);
-              CL_ASSERT(!p_mad->status);
+             CL_ASSERT(ib_smp_get_status(p_mad) == IB_SA_MAD_STATUS_SUCCESS);

                cl_spinlock_acquire(&p_spl_qp_svc->cache_lock);


Uri Habusha
Windows SW Development Lead

Mellanox Technologies
P.OBox 586, Yokneam 20692
Israel



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110815/790d013a/attachment.html>


More information about the ofw mailing list