[ofa-general] ***SPAM*** [PATCH] infiniband-diags/vendstat: Update man page and examples for PortXmit/RcvDataSL counter support

Hal Rosenstock hnrose at comcast.net
Wed Apr 8 08:04:45 PDT 2009


Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>

---
diff --git a/infiniband-diags/man/vendstat.8 b/infiniband-diags/man/vendstat.8
index e32650a..a73dcce 100644
--- a/infiniband-diags/man/vendstat.8
+++ b/infiniband-diags/man/vendstat.8
@@ -1,17 +1,17 @@
-.TH VENDSTAT 8 "February 15, 2007" "OpenIB" "OpenIB Diagnostics"
+.TH VENDSTAT 8 "April 6, 2009" "OpenIB" "OpenIB Diagnostics"
 
 .SH NAME
 vendstat \- query InfiniBand vendor specific functions
 
 .SH SYNOPSIS
 .B vendstat
-[\-d(ebug)] [\-G(uid)] [\-N] [\-w] [\-C ca_name] [\-P ca_port] [\-t(imeout) timeout_ms] [\-V(ersion)] [\-h(elp)] <lid|guid>
+[\-d(ebug)] [\-G(uid)] [\-N] [\-w] [\-i] [\-c <num,num>] [\-C ca_name] [\-P ca_port] [\-t(imeout) timeout_ms] [\-V(ersion)] [\-h(elp)] <lid|guid>
 
 .SH DESCRIPTION
 .PP
 vendstat uses vendor specific MADs to access beyond the IB spec
-vendor specific functionality. Currently, there is support only for
-Mellanox InfiniSwitch-III (IS3).
+vendor specific functionality. Currently, there is support for
+Mellanox InfiniSwitch-III (IS3) and InfiniSwitch-IV (IS4).
 
 .SH OPTIONS
 
@@ -22,6 +22,26 @@ show IS3 general information.
 .TP
 \fB\-w\fR
 show IS3 port xmit wait counters.
+.TP
+\fB\-i\fR
+show IS4 counter group info.
+.TP
+\fB\-c\fR <num,num>
+configure IS4 counter groups.
+
+Configure IS4 counter groups 0 and 1.
+First number is for counter group 0 and second is for
+counter group 1.
+
+Group 0 counter config values:
+ 0 - PortXmitDataSL0-7
+ 1 - PortXmitDataSL8-15
+ 2 - PortRcvDataSL0-7
+
+Group 1 counter config values:
+ 1 - PortXmitDataSL8-15
+ 2 - PortRcvDataSL0-7
+ 8 - PortRcvDataSL8-15
 
 .SH COMMON OPTIONS
 
@@ -77,6 +97,12 @@ attempted to be fulfilled, and will fail if it is not possible.
 vendstat -N 6		# read IS3 general information
 .PP
 vendstat -w 6		# read IS3 port xmit wait counters
+.PP
+vendstat -i 6 12	# read IS4 port 12 counter group info
+.PP
+vendstat -c 0,1 6,12	# configure IS4 port 12 counter groups for PortXmitDataSL
+.PP
+vendstat -c 2,8 6,12	# configure IS4 port 12 counter groups for PortRcvDataSL
 
 .SH AUTHOR
 .TP
diff --git a/infiniband-diags/src/vendstat.c b/infiniband-diags/src/vendstat.c
index 01ff0c3..240c4cb 100644
--- a/infiniband-diags/src/vendstat.c
+++ b/infiniband-diags/src/vendstat.c
@@ -177,7 +177,7 @@ void config_counter_groups(ib_portid_t *portid, int port)
 	call.attrid  = IB_MLX_IS4_CONFIG_COUNTER_GROUP;
 	call.timeout = ibd_timeout;
 	call.mod     = port;
-	/* set config counter groups for groups 0 and 1 */
+	/* configure counter groups for groups 0 and 1 */
 	call.method  = IB_MAD_METHOD_SET;
 
 	memset(&buf, 0, sizeof(buf));
@@ -239,8 +239,8 @@ int main(int argc, char **argv)
 	const struct ibdiag_opt opts[] = {
 		{ "N", 'N', 0, NULL, "show IS3 general information"},
 		{ "w", 'w', 0, NULL, "show IS3 port xmit wait counters"},
-		{ "i", 'i', 0, NULL, "show is4 counter group info"},
-		{ "c", 'c', 1, "<num,num>", "set is4 config counter group"},
+		{ "i", 'i', 0, NULL, "show IS4 counter group info"},
+		{ "c", 'c', 1, "<num,num>", "configure IS4 counter groups"},
 		{ 0 }
 	};
 
@@ -249,7 +249,8 @@ int main(int argc, char **argv)
 		"-N 6\t\t# read IS3 general information",
 		"-w 6\t\t# read IS3 port xmit wait counters",
 		"-i 6 12\t# read IS4 port 12 counter group info",
-		"-c 0,1 6 12\t# set IS4 port 12 config counter group for XmitDataSL",
+		"-c 0,1 6 12\t# configure IS4 port 12 counter groups for PortXmitDataSL",
+		"-c 2,8 6 12\t# configure IS4 port 12 counter groups for PortRcvDataSL",
 		NULL
 	};
 



More information about the general mailing list