[ofa-general] libibmad question forward

Jeff Becker jeff.c.becker at gmail.com
Wed Sep 19 16:10:43 PDT 2007


I am trying to use libibmad library for initiating queries of Device
Management and other class types. While initializing, the
madrpc_init() call fails when I have IB_DEVICE_MGMT_CLASS included as
a part of mgmt_classes parameter. This is because mgmt_class_vers()
(which is called by mad_register_port_client()/ mad_register_client())
fails to return class version for Device Management Class.

I am able to make DM queries if mgmt_class_vers() is fixed i.e. just
add a case to return the version for IB_DEVICE_MGMT_CLASS. e.g.

static int
mgmt_class_vers(int mgmt_class)

{

       if ((mgmt_class >= IB_VENDOR_RANGE1_START_CLASS &&
            mgmt_class <= IB_VENDOR_RANGE1_END_CLASS) ||
           (mgmt_class >= IB_VENDOR_RANGE2_START_CLASS &&
            mgmt_class <= IB_VENDOR_RANGE2_END_CLASS))
              return 1;

        switch(mgmt_class) {
              case IB_SMI_CLASS:
              case IB_SMI_DIRECT_CLASS:
                     return 1;
              case IB_SA_CLASS:
                     return 2;
              case IB_PERFORMANCE_CLASS:
                     return 1;
              // Change START
              case IB_DEVICE_MGMT_CLASS:
                     return 1;
              // Change END
       }

       return 0;

I am wondering if this minor anomaly can be submitted as a bug to
broaden the usage of libibmad its usage for DM queries.

Thanks for any help in advance.

Akshay Mathur
QLogic Corporation
780 Fifth Avenue, Suite 140
King of Prussia, PA 19406
Office: 610.233.4836
Fax: 610.233.4777



More information about the general mailing list