<div>Ira,<br></div>
<div>See one minor comment below:</div>
<div><br> </div>
<div class="gmail_quote">On Fri, Sep 25, 2009 at 2:50 AM, Ira Weiny <span dir="ltr"><<a href="mailto:weiny2@llnl.gov">weiny2@llnl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Sasha,<br><br>This applies after<br><br> "infiniband-diags/src/ibqueryerrors: move --all option and replace it with<br>
--switch, --ca, --router"<br><br><br>From: Ira Weiny <<a href="mailto:weiny2@llnl.gov">weiny2@llnl.gov</a>><br>Date: Thu, 24 Sep 2009 20:39:29 -0700<br>Subject: [PATCH] infiniband-diags/src/ibqueryerrors: Add clear errors and counters options<br>
<br> Add -k and -K options to clear errors and counters. If both are<br> specified they will both be cleared.<br></blockquote>
<div> </div>
<div>Nice efficiency improvement over running a subsequent ibclearerrors/counters :-)</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br> Update man page<br><br> In addition fix 2 bugs<br> fix the printing of Xmt Wait errors<br>
properly skip the counter select field.<br><br>Signed-off-by: Ira Weiny <<a href="mailto:weiny2@llnl.gov">weiny2@llnl.gov</a>><br>---<br> infiniband-diags/man/ibqueryerrors.8 | 20 +++++--<br> infiniband-diags/src/ibqueryerrors.c | 91 +++++++++++++++++++++++++++++----<br>
2 files changed, 94 insertions(+), 17 deletions(-)<br><br></blockquote>
<div><snip...></div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">diff --git a/infiniband-diags/src/ibqueryerrors.c b/infiniband-diags/src/ibqueryerrors.c<br>index ecfd662..e379a42 100644<br>
--- a/infiniband-diags/src/ibqueryerrors.c<br>+++ b/infiniband-diags/src/ibqueryerrors.c<br></blockquote>
<div><snip...></div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">+static void clear_port(ib_portid_t * portid, uint16_t cap_mask,<br>+ ibnd_node_t * node, int port)<br>
+{<br>+ uint8_t pc[1024];<br>+ /* bits defined in Table 228 PortCounters CounterSelect and<br>+ * CounterSelect2<br>+ */<br>+ uint32_t mask = 0;<br>+<br>+ if (!clear_errors && !clear_counts)<br>
+ return;<br>+<br>+ if (clear_errors)<br>+ mask |= 0x10FFF;<br></blockquote>
<div>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.</div>
<div> </div>
<div>-- Hal</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">+ if (clear_counts)<br>+ mask |= 0xF000;<br>+<br>+ if (!performance_reset_via(pc, portid, port, mask, ibd_timeout,<br>
+ IB_GSI_PORT_COUNTERS, ibmad_port))<br>+ IBERROR("Failed to reset errors %s port %d",<br>+ node->nodedesc, port);<br>+}<br>+<br></blockquote>
<div><snip...></div></div>