[ofa-general] ibcheckerrrors/perfquery failure
Hal Rosenstock
hrosenstock at xsigo.com
Mon Oct 15 12:17:39 PDT 2007
Hi Greg,
On Mon, 2007-10-15 at 11:06 -0700, Greg Kurtzer wrote:
> Yes, the patch fixes perfquery so now it supports the "-a" option
> properly but I had to make some minor tweaks as I am running the
> released 1.3.2 version.
>
> I also disabled the IBWARN
Does this somehow "get in the way" ?
> and also tweaked ibcheckerrs just enough
> so that ibcheckerrors is reporting properly now.
Ah, I didn't try that. Good catch. BTW, that same change is applicable
to some other scripts.
> Attached is the patch that includes both of the above modifications
> and integrates properly against the 1.3.2 released tree.
>
> Again, thank you. :)
Thanks for testing this out :-)
-- Hal
> Greg
>
>
>
>
>
>
> On Oct 15, 2007, at 4:31 AM, Hal Rosenstock wrote:
>
> > On Fri, 2007-10-12 at 15:14 -0700, Hal Rosenstock wrote:
> >> On Fri, 2007-10-12 at 14:59 -0700, Hal Rosenstock wrote:
> >>> On Fri, 2007-10-12 at 14:47 -0700, Greg Kurtzer wrote:
> >>>> ibwarn: [25274] pma_query: lid 1 port 1
> >>>> ibwarn: [25274] mad_rpc: data offs 64 sz 192
> >>>> mad data
> >>>> 0101 0000 0000 0014 0000 0000 0000 0000
> >>>
> >>> Thanks; AllPortSelect is off in CapabilityMask which is
> >>> consistent with
> >>> the behavior. (It would be trivial for those HCA PMAs to indicate
> >>> AllPortSelect is supported (since it's the same as supporting one
> >>> port)
> >>> and then all would be fine but that's not a requirement).
> >>>
> >>> A check should be added in perfquery for this.I will generate a
> >>> patch
> >>> for that but that won't fix the problem.
> >>
> >> Actually, perfquery gets the number of ports and could do multiple
> >> PerfGets, one per port, and accumulate the "all" ports.
> >>
> >> This approach may be better than dealing with the scripts.
> >
> > Can you try this and let me know if this resolves your issue ? The
> > patch
> > is against the master (OFED 1.3):
> >
> > diff --git a/infiniband-diags/src/perfquery.c b/infiniband-diags/
> > src/perfquery.c
> > index 148e452..c976fc5 100644
> > --- a/infiniband-diags/src/perfquery.c
> > +++ b/infiniband-diags/src/perfquery.c
> > @@ -1,5 +1,6 @@
> > /*
> > * Copyright (c) 2004-2007 Voltaire Inc. All rights reserved.
> > + * Copyright (c) 2007 Xsigo Systems Inc. All rights reserved.
> > *
> > * This software is available to you under a choice of one of two
> > * licenses. You may choose to be licensed under the terms of the
> > GNU
> > @@ -42,7 +43,7 @@
> > #include <getopt.h>
> > #include <netinet/in.h>
> >
> > -#define __BUILD_VERSION_TAG__ 1.2.2
> > +#define __BUILD_VERSION_TAG__ 1.2.3
> > #include <infiniband/common.h>
> > #include <infiniband/umad.h>
> > #include <infiniband/mad.h>
> > @@ -99,6 +100,9 @@ main(int argc, char **argv)
> > int ca_port = 0;
> > int extended = 0;
> > uint16_t cap_mask;
> > + int allports = 0;
> > + int node_type, num_ports;
> > + uint8_t data[IB_SMP_DATA_SIZE];
> >
> > static char const str_opts[] = "C:P:s:t:dGearRVhu";
> > static const struct option long_opts[] = {
> > @@ -191,6 +195,35 @@ main(int argc, char **argv)
> > /* PerfMgt ClassPortInfo is a required attribute */
> > if (!perf_classportinfo_query(pc, &portid, port, timeout))
> > IBERROR("classportinfo query");
> > + /* ClassPortInfo should be supported as part of libibmad */
> > + memcpy(&cap_mask, pc+2, sizeof(cap_mask)); /* CapabilityMask */
> > + cap_mask = ntohs(cap_mask);
> > + if (!(cap_mask & 0x100)) /* bit 8 is AllPortSelect */
> > + if (port == 255) {
> > + allports = 1;
> > + IBWARN("AllPortSelect not supported");
> > + }
> > +
> > + if (allports == 1) {
> > +
> > + /*
> > + * Simulate all ports support in PMA
> > + * Determine node type, number of (physical) ports,
> > + * and, if switch, whether SP0 is enhanced
> > + * to determine first and last port to query
> > + */
> > +
> > + /* For now, support single port CAs */
> > + if (smp_query(data, &portid, IB_ATTR_NODE_INFO, 0, 0) < 0)
> > + IBERROR("smp query nodeinfo failed");
> > + node_type = mad_get_field(data, 0, IB_NODE_TYPE_F);
> > + if (node_type != IB_NODE_CA) /* NodeType other than CA ? */
> > + IBERROR("smp query nodeinfo: Node type not CA");
> > + mad_decode_field(data, IB_NODE_NPORTS_F, &num_ports);
> > + if (num_ports != 1)
> > + IBERROR("smp query nodeinfo: %d ports; only 1 supported
> > currently", num_ports);
> > + port = num_ports;
> > + }
> >
> > if (reset_only)
> > goto do_reset;
> > @@ -201,9 +234,6 @@ main(int argc, char **argv)
> >
> > mad_dump_perfcounters(buf, sizeof buf, pc, sizeof pc);
> > } else {
> > - /* Should ClassPortInfo be implemented in libibmad ? */
> > - memcpy(&cap_mask, pc+2, sizeof(cap_mask)); /* CapabilityMask */
> > - cap_mask = ntohs(cap_mask);
> > if (!(cap_mask & 0x200)) /* 1.2 errata: bit 9 is extended
> > counter support */
> > IBWARN("PerfMgt ClassPortInfo 0x%x extended counters not
> > indicated\n", cap_mask);
> >
> >
> >
> >>
> >> -- Hal
> >>
> >>> I will try to find time to look at the scripts and see what it
> >>> will take
> >>> to fix this. Where AllPortSelect is not supported, they need to drop
> >>> back to individual ports.
> >>>
> >>> -- Hal
> >>> _______________________________________________
> >>> 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
> >> _______________________________________________
> >> 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
>
> --
> Greg Kurtzer
> gmk at lbl.gov
>
>
>
More information about the general
mailing list