Ira, See one minor comment below:
On Fri, Sep 25, 2009 at 2:50 AM, Ira Weiny <wei...@llnl.gov> wrote: > Sasha, > > This applies after > > "infiniband-diags/src/ibqueryerrors: move --all option and replace it > with > --switch, --ca, --router" > > > From: Ira Weiny <wei...@llnl.gov> > Date: Thu, 24 Sep 2009 20:39:29 -0700 > Subject: [PATCH] infiniband-diags/src/ibqueryerrors: Add clear errors and > counters options > > Add -k and -K options to clear errors and counters. If both are > specified they will both be cleared. > Nice efficiency improvement over running a subsequent ibclearerrors/counters :-) > > Update man page > > In addition fix 2 bugs > fix the printing of Xmt Wait errors > properly skip the counter select field. > > Signed-off-by: Ira Weiny <wei...@llnl.gov> > --- > infiniband-diags/man/ibqueryerrors.8 | 20 +++++-- > infiniband-diags/src/ibqueryerrors.c | 91 > +++++++++++++++++++++++++++++---- > 2 files changed, 94 insertions(+), 17 deletions(-) > > <snip...> > diff --git a/infiniband-diags/src/ibqueryerrors.c > b/infiniband-diags/src/ibqueryerrors.c > index ecfd662..e379a42 100644 > --- a/infiniband-diags/src/ibqueryerrors.c > +++ b/infiniband-diags/src/ibqueryerrors.c > <snip...> > +static void clear_port(ib_portid_t * portid, uint16_t cap_mask, > + ibnd_node_t * node, int port) > +{ > + uint8_t pc[1024]; > + /* bits defined in Table 228 PortCounters CounterSelect and > + * CounterSelect2 > + */ > + uint32_t mask = 0; > + > + if (!clear_errors && !clear_counts) > + return; > + > + if (clear_errors) > + mask |= 0x10FFF; > Since PortXmitWait setting is new, shouldn't the setting of this bit in the mask be conditionalized on the CapabilityMask indicating that this is supported ? That seems safer to me. -- Hal > + if (clear_counts) > + mask |= 0xF000; > + > + if (!performance_reset_via(pc, portid, port, mask, ibd_timeout, > + IB_GSI_PORT_COUNTERS, ibmad_port)) > + IBERROR("Failed to reset errors %s port %d", > + node->nodedesc, port); > +} > + > <snip...>
_______________________________________________ general mailing list general@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general