On Thu, Aug 18, 2011 at 9:11 AM, Uri Habusha <[email protected]> wrote:
> Thanks Hal,
>
> I'm looking in ib_types and don't find any status related to IB_SM. Did you 
> add it in the last period. Do you suggest to add only IB_SM_STATUS_SUCCESS 
> for ib_types.h
>
> For now I will make the checking with checking that the status is

Rather than IB_SA_MAD_STATUS, should this use 0
or alternatively define IB_MAD_STATUS_OK as 0 in ib_types.h and then
use that define (so adding Alex N) ?

Maybe just for now:

CL_ASSERT(!ib_smp_get_status(p_mad));

or

CL_ASSERT(ib_smp_get_status(p_mad) == 0);

Defining IB_MAD_STATUS_OK as 0 in ib_types.h (that's up to Alex) and
then use it here:

CL_ASSERT(ib_smp_get_status(p_mad) == IB_MAD_STATUS_OK);

-- Hal

> Uri
>
> -----Original Message-----
> From: Hal Rosenstock [mailto:[email protected]]
> Sent: Monday, August 15, 2011 8:58 PM
> To: Uri Habusha
> Cc: [email protected]; Firas Mahameed; Alex Netes
> Subject: Re: [ofw] wrong assert - patch
>
> On Mon, Aug 15, 2011 at 1:22 AM, Uri Habusha <[email protected]> wrote:
>> 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);
>
> This may work but looks a little like apples and oranges to me. SMPs are SM 
> not SA class. Rather than IB_SA_MAD_STATUS, should this use 0 or 
> alternatively define IB_MAD_STATUS_OK as 0 in ib_types.h and then use that 
> define (so adding Alex N) ?
>
> -- Hal
>
>>
>>                 cl_spinlock_acquire(&p_spl_qp_svc->cache_lock);
>>
>>
>>
>>
>>
>> Uri Habusha
>>
>> Windows SW Development Lead
>>
>>
>>
>> Mellanox Technologies
>> P.OBox 586, Yokneam 20692
>>
>> Israel
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> ofw mailing list
>> [email protected]
>> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
>>
>
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to