[ofa-general] Re: Issues with combined routing in smpquery

Ira Weiny weiny2 at llnl.gov
Wed Apr 29 16:04:38 PDT 2009


On Wed, 29 Apr 2009 14:53:55 -0700
Ira Weiny <weiny2 at llnl.gov> wrote:

> I have traced this down a bit more.
> 
> The drslid and drdlid have been encoded in the MAD reversed!
> 
> This has happened somewhere between version 1.5.0 and 1.5.1.

I know what changed but there appears to be a discrepancy between ib_mad_f 
and the spec.

Commit 2dbb8b95d9dc27423a6fdb85d88ef385ecee0005
   "libibmad: remove c99 definitions within the ib_mad_f structure"
removed the designated initializers from ib_mad_f.  Appling the patch below
aligns the MAD_FIELDS with ib_mad_f.

However, if you look at the offsets specified in ib_mad_f they are wrong.
According to 14.2.1.2, DrSLID is at offset 32 bytes (256 bits).  ib_mad_f
places the offset at 272.  I have verified the bytes using a debugger and byte
32 is the DrSLID.  I hesitate to say there is a bug in mad_set_field however
there does appear to be something amiss.  :-/

Ira

15:03:15 > git diff
diff --git a/libibmad/include/infiniband/mad.h b/libibmad/include/infiniband/mad.h
index 1aaaa1b..2b89193 100644
--- a/libibmad/include/infiniband/mad.h
+++ b/libibmad/include/infiniband/mad.h
@@ -246,8 +246,8 @@ enum MAD_FIELDS {
        IB_MAD_MKEY_F,
 
        /* word 9 (32-37 bytes) */
-       IB_DRSMP_DRSLID_F,
        IB_DRSMP_DRDLID_F,
+       IB_DRSMP_DRSLID_F,
 
        /* word 10,11 (36-43 bytes) */
        IB_SA_MKEY_F,




More information about the general mailing list