public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH infiniband-diags] saquery.c: Fix handling of cpi and ClassPortInfo options
@ 2014-11-05 20:21 Hal Rosenstock
       [not found] ` <545A86E3.4050000-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2014-11-05 20:21 UTC (permalink / raw)
  To: Ira Weiny
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	Doug Ledford, Dan Ben-Yosef


Need to check if query_type is CLASS_PORT_INFO
in order to handle saquery [cpi | ClassPortInfo].
Otherwise, it just dumps ClassPortInfo attribute
as all 0s.

Note that saquery -c works fine because it
set command to SAQUERY_CMD_CLASS_PORT_INFO.

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/src/saquery.c b/src/saquery.c
index 0f39064..1af3401 100644
--- a/src/saquery.c
+++ b/src/saquery.c
@@ -1869,6 +1869,7 @@ int main(int argc, char **argv)
 		params.dlid = get_lid(h, dst_lid);
 
 	if (command == SAQUERY_CMD_CLASS_PORT_INFO ||
+	    query_type == CLASS_PORT_INFO ||
 	    query_type == IB_SA_ATTR_SWITCHINFORECORD)
 		sa_cpi_required = 1;
 
--
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

end of thread, other threads:[~2014-11-08 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-05 20:21 [PATCH infiniband-diags] saquery.c: Fix handling of cpi and ClassPortInfo options Hal Rosenstock
     [not found] ` <545A86E3.4050000-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2014-11-08 14:51   ` Weiny, Ira

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox