* [PATCH] infiniband-diags: saquery; reuse dump_one_mcmember_record function
@ 2011-06-16 18:10 Ira Weiny
[not found] ` <20110616111024.fde795bc.weiny2-i2BcT+NCU+M@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Ira Weiny @ 2011-06-16 18:10 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
From: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
Date: Thu, 2 Jun 2011 00:17:21 -0700
Subject: [PATCH] infiniband-diags: saquery; reuse dump_one_mcmember_record function
Signed-off-by: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
---
src/saquery.c | 16 ++--------------
1 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/src/saquery.c b/src/saquery.c
index 7933fec..e1ab7dd 100644
--- a/src/saquery.c
+++ b/src/saquery.c
@@ -486,7 +486,6 @@ static void dump_multicast_group_record(void *data)
static void dump_multicast_member_record(void *data)
{
char gid_str[INET6_ADDRSTRLEN];
- char gid_str2[INET6_ADDRSTRLEN];
ib_member_rec_t *p_mcmr = data;
uint16_t mlid = cl_ntoh16(p_mcmr->mlid);
unsigned i = 0;
@@ -512,19 +511,8 @@ static void dump_multicast_member_record(void *data)
inet_ntop(AF_INET6, p_mcmr->port_gid.raw,
gid_str, sizeof gid_str), node_name);
} else {
- printf("MCMemberRecord member dump:\n"
- "\t\tMGID....................%s\n"
- "\t\tMlid....................0x%X\n"
- "\t\tPortGid.................%s\n"
- "\t\tScopeState..............0x%X\n"
- "\t\tProxyJoin...............0x%X\n"
- "\t\tNodeDescription.........%s\n",
- inet_ntop(AF_INET6, p_mcmr->mgid.raw, gid_str,
- sizeof gid_str),
- cl_ntoh16(p_mcmr->mlid),
- inet_ntop(AF_INET6, p_mcmr->port_gid.raw,
- gid_str2, sizeof gid_str2),
- p_mcmr->scope_state, p_mcmr->proxy_join, node_name);
+ dump_one_mcmember_record(data);
+ printf("\t\tNodeDescription.........%s\n", node_name);
}
}
--
1.7.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] 5+ messages in thread[parent not found: <20110616111024.fde795bc.weiny2-i2BcT+NCU+M@public.gmane.org>]
* Re: [PATCH] infiniband-diags: saquery; reuse dump_one_mcmember_record function [not found] ` <20110616111024.fde795bc.weiny2-i2BcT+NCU+M@public.gmane.org> @ 2011-06-16 20:53 ` Hal Rosenstock [not found] ` <4DFA6D60.9070609-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Hal Rosenstock @ 2011-06-16 20:53 UTC (permalink / raw) To: Ira Weiny; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 6/16/2011 2:10 PM, Ira Weiny wrote: > - printf("MCMemberRecord member dump:\n" > - "\t\tMGID....................%s\n" > - "\t\tMlid....................0x%X\n" > - "\t\tPortGid.................%s\n" > - "\t\tScopeState..............0x%X\n" > - "\t\tProxyJoin...............0x%X\n" > - "\t\tNodeDescription.........%s\n", > - inet_ntop(AF_INET6, p_mcmr->mgid.raw, gid_str, > - sizeof gid_str), > - cl_ntoh16(p_mcmr->mlid), > - inet_ntop(AF_INET6, p_mcmr->port_gid.raw, > - gid_str2, sizeof gid_str2), > - p_mcmr->scope_state, p_mcmr->proxy_join, node_name); > + dump_one_mcmember_record(data); This will print more info per MC member with much of it (group related) repeated. Is there some need for the additional info or is this just for code reuse ? If it's the latter, I would prefer to not see it change or add an additional parameter to dump_one_mcmember_record as to the specific fields to print. -- Hal > + printf("\t\tNodeDescription.........%s\n", node_nam -- 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] 5+ messages in thread
[parent not found: <4DFA6D60.9070609-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>]
* Re: [PATCH] infiniband-diags: saquery; reuse dump_one_mcmember_record function [not found] ` <4DFA6D60.9070609-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> @ 2011-06-16 21:46 ` Ira Weiny [not found] ` <20110616144636.4d2483fb.weiny2-i2BcT+NCU+M@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Ira Weiny @ 2011-06-16 21:46 UTC (permalink / raw) To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Thu, 16 Jun 2011 13:53:52 -0700 Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> wrote: > On 6/16/2011 2:10 PM, Ira Weiny wrote: > > - printf("MCMemberRecord member dump:\n" > > - "\t\tMGID....................%s\n" > > - "\t\tMlid....................0x%X\n" > > - "\t\tPortGid.................%s\n" > > - "\t\tScopeState..............0x%X\n" > > - "\t\tProxyJoin...............0x%X\n" > > - "\t\tNodeDescription.........%s\n", > > - inet_ntop(AF_INET6, p_mcmr->mgid.raw, gid_str, > > - sizeof gid_str), > > - cl_ntoh16(p_mcmr->mlid), > > - inet_ntop(AF_INET6, p_mcmr->port_gid.raw, > > - gid_str2, sizeof gid_str2), > > - p_mcmr->scope_state, p_mcmr->proxy_join, node_name); > > + dump_one_mcmember_record(data); > > This will print more info per MC member with much of it (group related) > repeated. Is there some need for the additional info or is this just for > code reuse ? "need"; I guess not. But I thought it was odd that the information was different for the 2 query methods. There is nothing in the documentation or help output which indicates the output would be different. That said I do see what you mean regarding the amount of data returned. I figured most users were probably grepping this output anyway, as on a large fabric both methods return a sizable amount of data. > If it's the latter, I would prefer to not see it change or > add an additional parameter to dump_one_mcmember_record as to the > specific fields to print. Yea, the most useful output of "-m" is when used with the optional MLID value. Ok, For now I will reject the patch. ;-) Ira > > -- Hal > > > + printf("\t\tNodeDescription.........%s\n", node_nam > -- 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] 5+ messages in thread
[parent not found: <20110616144636.4d2483fb.weiny2-i2BcT+NCU+M@public.gmane.org>]
* Re: [PATCH] infiniband-diags: saquery; reuse dump_one_mcmember_record function [not found] ` <20110616144636.4d2483fb.weiny2-i2BcT+NCU+M@public.gmane.org> @ 2011-06-16 21:59 ` Jason Gunthorpe [not found] ` <20110616215946.GA7112-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Jason Gunthorpe @ 2011-06-16 21:59 UTC (permalink / raw) To: Ira Weiny Cc: Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Thu, Jun 16, 2011 at 02:46:36PM -0700, Ira Weiny wrote: > "need"; I guess not. But I thought it was odd that the information was different for the 2 query methods. There is nothing in the documentation or help output which indicates the output would be different. > > That said I do see what you mean regarding the amount of data > returned. I figured most users were probably grepping this output > anyway, as on a large fabric both methods return a sizable amount of > data. One is supposed to return de-duplicated information about the groups that exist, the other was supposed to show group member information. Jason -- 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] 5+ messages in thread
[parent not found: <20110616215946.GA7112-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>]
* Re: [PATCH] infiniband-diags: saquery; reuse dump_one_mcmember_record function [not found] ` <20110616215946.GA7112-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> @ 2011-06-16 22:48 ` Ira Weiny 0 siblings, 0 replies; 5+ messages in thread From: Ira Weiny @ 2011-06-16 22:48 UTC (permalink / raw) To: Jason Gunthorpe Cc: Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Thu, 16 Jun 2011 14:59:46 -0700 Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote: > On Thu, Jun 16, 2011 at 02:46:36PM -0700, Ira Weiny wrote: > > > "need"; I guess not. But I thought it was odd that the information was different for the 2 query methods. There is nothing in the documentation or help output which indicates the output would be different. > > > > That said I do see what you mean regarding the amount of data > > returned. I figured most users were probably grepping this output > > anyway, as on a large fabric both methods return a sizable amount of > > data. > > One is supposed to return de-duplicated information about the groups > that exist, the other was supposed to show group member information. [caveat] I am not trying to beat a dead horse... [/caveat] I guess it depends on what you define as "member info" and what that implies to the user. ("de-duplicated" or not.) -m get multicast member info. If a group is specified, limit the output to the group specified and print one line containing only the GUID and node description for each entry. Example: saquery -m 0xc000 To me this implied "de-duplication" only occurred with the mlid specified. But.. I'm happy. Ira > > Jason -- 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] 5+ messages in thread
end of thread, other threads:[~2011-06-16 22:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16 18:10 [PATCH] infiniband-diags: saquery; reuse dump_one_mcmember_record function Ira Weiny
[not found] ` <20110616111024.fde795bc.weiny2-i2BcT+NCU+M@public.gmane.org>
2011-06-16 20:53 ` Hal Rosenstock
[not found] ` <4DFA6D60.9070609-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-06-16 21:46 ` Ira Weiny
[not found] ` <20110616144636.4d2483fb.weiny2-i2BcT+NCU+M@public.gmane.org>
2011-06-16 21:59 ` Jason Gunthorpe
[not found] ` <20110616215946.GA7112-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-06-16 22:48 ` Ira Weiny
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox