[ofa-general] libibmad question forward

Hal Rosenstock hrosenstock at xsigo.com
Wed Sep 19 16:27:54 PDT 2007


On Wed, 2007-09-19 at 16:10 -0700, Jeff Becker wrote:
> 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.

Yes, DM class (and perhaps some other missing GS classes) should be
added there.

-- Hal

> 
> 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
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



More information about the general mailing list