* [PATCH] infiniband-diags/smpquery: Add support for extended link speeds
@ 2011-08-15 23:54 Hal Rosenstock
[not found] ` <4E49B1B9.5020900-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2011-08-15 23:54 UTC (permalink / raw)
To: Ira Weiny; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/man/smpquery.8 b/man/smpquery.8
index afd02db..c4cb8f2 100644
--- a/man/smpquery.8
+++ b/man/smpquery.8
@@ -6,8 +6,8 @@ smpquery \- query InfiniBand subnet management attributes
.SH SYNOPSIS
.B smpquery
[\-d(ebug)] [\-e(rr_show)] [\-v(erbose)] [\-D(irect)] [\-G(uid)]
-[\-C ca_name] [\-P ca_port] [\-t(imeout) timeout_ms]
-[--node-name-map node-name-map] [\-V(ersion)] [\-h(elp)]
+[\-x|\-\-extended] [\-C ca_name] [\-P ca_port] [\-t(imeout) timeout_ms]
+[\-\-node-name-map node-name-map] [\-V(ersion)] [\-h(elp)]
<op> <dest dr_path|lid|guid> [op params]
.SH DESCRIPTION
@@ -32,6 +32,11 @@ Current supported operations and their parameters:
mlnxextportinfo <addr> [<portnum>] # default port is zero
.TP
+\fB\-x\fR, \fB\-\-extended\fR
+Set SMSupportsExtendedSpeeds bit 31 in AttributeModifier
+(only impacts PortInfo queries).
+
+.TP
\fB\-\-node\-name\-map\fR <node-name-map>
Specify a node name map. The node name map file maps GUIDs to more
user friendly names. See
diff --git a/src/smpquery.c b/src/smpquery.c
index 6753ba9..cecfa68 100644
--- a/src/smpquery.c
+++ b/src/smpquery.c
@@ -80,6 +80,7 @@ static const match_rec_t match_tbl[] = {
static char *node_name_map_file = NULL;
static nn_map_t *node_name_map = NULL;
+static int extended_speeds = 0;
/*******************************************/
static char *node_desc(ib_portid_t * dest, char **argv, int argc)
@@ -134,17 +135,20 @@ static char *port_info(ib_portid_t * dest, char **argv, int argc)
{
char buf[2300];
char data[IB_SMP_DATA_SIZE] = { 0 };
- int portnum = 0;
+ int portnum = 0, orig_portnum;
if (argc > 0)
portnum = strtol(argv[0], 0, 0);
+ orig_portnum = portnum;
+ if (extended_speeds)
+ portnum |= 1 << 31;
if (!smp_query_via(data, dest, IB_ATTR_PORT_INFO, portnum, 0, srcport))
return "port info query failed";
mad_dump_portinfo(buf, sizeof buf, data, sizeof data);
- printf("# Port info: %s port %d\n%s", portid2str(dest), portnum, buf);
+ printf("# Port info: %s port %d\n%s", portid2str(dest), orig_portnum, buf);
return 0;
}
@@ -414,6 +418,9 @@ static int process_opt(void *context, int ch, char *optarg)
case 'c':
ibd_dest_type = IB_DEST_DRSLID;
break;
+ case 'x':
+ extended_speeds = 1;
+ break;
default:
return -1;
}
@@ -435,6 +442,7 @@ int main(int argc, char **argv)
{"combined", 'c', 0, NULL,
"use Combined route address argument"},
{"node-name-map", 1, 1, "<file>", "node name map file"},
+ {"extended", 'x', 0, NULL, "use extended speeds"},
{0}
};
const char *usage_examples[] = {
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <4E49B1B9.5020900-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>]
* Re: [PATCH] infiniband-diags/smpquery: Add support for extended link speeds [not found] ` <4E49B1B9.5020900-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> @ 2011-08-18 18:22 ` Ira Weiny 0 siblings, 0 replies; 2+ messages in thread From: Ira Weiny @ 2011-08-18 18:22 UTC (permalink / raw) To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Mon, 15 Aug 2011 16:54:33 -0700 Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> wrote: > > Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> thanks applied, Ira > --- > diff --git a/man/smpquery.8 b/man/smpquery.8 > index afd02db..c4cb8f2 100644 > --- a/man/smpquery.8 > +++ b/man/smpquery.8 > @@ -6,8 +6,8 @@ smpquery \- query InfiniBand subnet management attributes > .SH SYNOPSIS > .B smpquery > [\-d(ebug)] [\-e(rr_show)] [\-v(erbose)] [\-D(irect)] [\-G(uid)] > -[\-C ca_name] [\-P ca_port] [\-t(imeout) timeout_ms] > -[--node-name-map node-name-map] [\-V(ersion)] [\-h(elp)] > +[\-x|\-\-extended] [\-C ca_name] [\-P ca_port] [\-t(imeout) timeout_ms] > +[\-\-node-name-map node-name-map] [\-V(ersion)] [\-h(elp)] > <op> <dest dr_path|lid|guid> [op params] > > .SH DESCRIPTION > @@ -32,6 +32,11 @@ Current supported operations and their parameters: > mlnxextportinfo <addr> [<portnum>] # default port is zero > > .TP > +\fB\-x\fR, \fB\-\-extended\fR > +Set SMSupportsExtendedSpeeds bit 31 in AttributeModifier > +(only impacts PortInfo queries). > + > +.TP > \fB\-\-node\-name\-map\fR <node-name-map> > Specify a node name map. The node name map file maps GUIDs to more > user friendly names. See > diff --git a/src/smpquery.c b/src/smpquery.c > index 6753ba9..cecfa68 100644 > --- a/src/smpquery.c > +++ b/src/smpquery.c > @@ -80,6 +80,7 @@ static const match_rec_t match_tbl[] = { > > static char *node_name_map_file = NULL; > static nn_map_t *node_name_map = NULL; > +static int extended_speeds = 0; > > /*******************************************/ > static char *node_desc(ib_portid_t * dest, char **argv, int argc) > @@ -134,17 +135,20 @@ static char *port_info(ib_portid_t * dest, char **argv, int argc) > { > char buf[2300]; > char data[IB_SMP_DATA_SIZE] = { 0 }; > - int portnum = 0; > + int portnum = 0, orig_portnum; > > if (argc > 0) > portnum = strtol(argv[0], 0, 0); > + orig_portnum = portnum; > + if (extended_speeds) > + portnum |= 1 << 31; > > if (!smp_query_via(data, dest, IB_ATTR_PORT_INFO, portnum, 0, srcport)) > return "port info query failed"; > > mad_dump_portinfo(buf, sizeof buf, data, sizeof data); > > - printf("# Port info: %s port %d\n%s", portid2str(dest), portnum, buf); > + printf("# Port info: %s port %d\n%s", portid2str(dest), orig_portnum, buf); > return 0; > } > > @@ -414,6 +418,9 @@ static int process_opt(void *context, int ch, char *optarg) > case 'c': > ibd_dest_type = IB_DEST_DRSLID; > break; > + case 'x': > + extended_speeds = 1; > + break; > default: > return -1; > } > @@ -435,6 +442,7 @@ int main(int argc, char **argv) > {"combined", 'c', 0, NULL, > "use Combined route address argument"}, > {"node-name-map", 1, 1, "<file>", "node name map file"}, > + {"extended", 'x', 0, NULL, "use extended speeds"}, > {0} > }; > const char *usage_examples[] = { -- Ira Weiny Math Programmer/Computer Scientist Lawrence Livermore National Lab 925-423-8008 weiny2-i2BcT+NCU+M@public.gmane.org -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-18 18:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15 23:54 [PATCH] infiniband-diags/smpquery: Add support for extended link speeds Hal Rosenstock
[not found] ` <4E49B1B9.5020900-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-08-18 18:22 ` Ira Weiny
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox