[ofa-general] libibmad question forward
Akshay Mathur
akshay.mathur at qlogic.com
Fri Sep 21 16:19:50 PDT 2007
I was wondering if the patch to Device Mgmt class in mgmt_class_vers()
was applied.
Hal, Roland, Sean,
The value return by mgmt_class_vers() is used for agent registration
with umad and is not used for creating mad requests by mad_encode().
So, What is the implication of registering with mgmt_class_version of 2?
Does the driver implements backwards compatibility? In my experiments, I
was able to register when mgmt_class_vers() returned a version value of
2 and send / receive DM queries with class_version set to 1.
Thanks
Akshay Mathur
QLogic Corporation
780 Fifth Avenue, Suite 140
King of Prussia, PA 19406
Office: 610.233.4836
Fax: 610.233.4777
-----Original Message-----
From: general-bounces at lists.openfabrics.org
[mailto:general-bounces at lists.openfabrics.org] On Behalf Of Hal
Rosenstock
Sent: Thursday, September 20, 2007 2:02 PM
To: Sasha Khapyorsky
Cc: Jeff Becker; general
Subject: Re: [ofa-general] libibmad question forward
On Thu, 2007-09-20 at 18:16 +0200, Sasha Khapyorsky wrote:
> On 16:27 Wed 19 Sep , Hal Rosenstock wrote:
> > 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;
Actually, there is an annex which makes this class version 2 which is
supposed to support backward compatibility for version 1. I'm not sure
whether both are in use (as to how important the backward compatibility
is with this). Maybe someone else can comment on this aspect.
-- Hal
> > > // 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.
>
> So, I'm going to apply this.
>
> Sasha
>
> From 46ad958b33c456672e2af711f36b494d398316bb Mon Sep 17 00:00:00 2001
> From: Jeff Becker <jeff.c.becker at gmail.com>
> Date: Thu, 20 Sep 2007 17:48:55 +0200
> Subject: [PATCH] libibmad: add support for IB_DEVICE_MGMT_CLASS
>
> From: Jeff Becker <jeff.c.becker at gmail.com>
>
> This adds IB_DEVICE_MGMT_CLASS to list of classes for which version is
> returned.
>
> Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
> ---
> libibmad/src/register.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/libibmad/src/register.c b/libibmad/src/register.c
> index 3d1285a..d80fa14 100644
> --- a/libibmad/src/register.c
> +++ b/libibmad/src/register.c
> @@ -95,6 +95,8 @@ mgmt_class_vers(int mgmt_class)
> return 2;
> case IB_PERFORMANCE_CLASS:
> return 1;
> + case IB_DEVICE_MGMT_CLASS:
> + return 1;
> }
>
> return 0;
_______________________________________________
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