[ofw] Opensm 3.3.11 (Debug) + 'osmtest -f m -M1' ASSERT() fires?

Smith, Stan stan.smith at intel.com
Fri Sep 30 09:09:55 PDT 2011


From: Hal Rosenstock [mailto:hal.rosenstock at gmail.com]
Sent: Friday, September 30, 2011 4:09 AM
To: Smith, Stan
Cc: Alex Netes; Hal Rosenstock; ofw at lists.openfabrics.org
Subject: Re: [ofw] Opensm 3.3.11 (Debug) + 'osmtest -f m -M1' ASSERT() fires?

Hi Stan,
On Thu, Sep 29, 2011 at 1:17 PM, Smith, Stan <stan.smith at intel.com<mailto:stan.smith at intel.com>> wrote:
Hello again,
 I forgot about another issue that was side-stepped via '#if 0' in order to make forward progress in the porting of OpenSM 3.3.11 to Windows.

 opensm/osm_helper.c

int ib_path_compare_rates(IN const int rate1, IN const int rate2)
{
       int orate1 = 0, orate2 = 0;

       CL_ASSERT(rate1 >= IB_MIN_RATE && rate1 <= IB_MAX_RATE);
       CL_ASSERT(rate2 >= IB_MIN_RATE && rate2 <= IB_MAX_RATE);

When running a DEBUG version of opensm with 'osmtest -f m -M1', part of the test is to set invalid rates (rate1, rate2 == 1).
When the rate1 or rate2 == 1 the CL_ASSERT() fires as IB_MIN_RATE == 2.
I think the fix is to explicitly allow rate1 or rate2 == 1 for osmtest?

       /* rate1 | rate2 == 1 comes from 'osmtest -f m -M1' (expected invalid rate) */
       CL_ASSERT((rate1 >= IB_MIN_RATE || rate1 == 1) && rate1 <= IB_MAX_RATE);
       CL_ASSERT((rate2 >= IB_MIN_RATE || rate2 == 1) && rate2 <= IB_MAX_RATE);

Thoughts?

That's a workaround rather than a fix.


Agreed, which is why I did not submit this as a patch.


There are 2 problems here:

1. Those particular tests in osmtest are not testing what they intended on testing and they need to be redesigned. The tests are using reserved values for rates. See http://www.mail-archive.com/linux-rdma@vger.kernel.org/msg08391.html email thread.

2. Rather than change this assert which is correct, the rate value should be validated and rejected by the SA if invalid. I'll work on a patch for this shortly.

-- Hal


Sounds reasonable; standing by.


Thanks,

Stan.


_______________________________________________
ofw mailing list
ofw at lists.openfabrics.org<mailto:ofw at lists.openfabrics.org>
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110930/33f71fa5/attachment.html>


More information about the ofw mailing list