* [PATCHv2 infiniband-diags] smpdump.c: Print number of bytes returned by umad_recv
@ 2018-02-07 17:05 Hal Rosenstock
[not found] ` <c0e1648e-06cc-9c79-05f7-4fc06dd3617a-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Hal Rosenstock @ 2018-02-07 17:05 UTC (permalink / raw)
To: Weiny, Ira; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
when debug is set
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
Change from v1:
Only print when debug is set
src/smpdump.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/smpdump.c b/src/smpdump.c
index bc8559a..efc522f 100644
--- a/src/smpdump.c
+++ b/src/smpdump.c
@@ -281,6 +281,9 @@ int main(int argc, char *argv[])
if (umad_recv(portid, umad, &length, -1) != mad_agent)
IBPANIC("recv error: %s", strerror(errno));
+ if (ibdebug)
+ fprintf(stdout, "%d bytes received\n", length);
+
if (!dump_char) {
xdump(stdout, 0, smp->data, 64);
if (smp->status)
--
2.8.4
--
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] 3+ messages in thread[parent not found: <c0e1648e-06cc-9c79-05f7-4fc06dd3617a-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>]
* Re: [PATCHv2 infiniband-diags] smpdump.c: Print number of bytes returned by umad_recv [not found] ` <c0e1648e-06cc-9c79-05f7-4fc06dd3617a-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> @ 2018-02-08 6:20 ` ira.weiny [not found] ` <20180208062039.GA16888-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: ira.weiny @ 2018-02-08 6:20 UTC (permalink / raw) To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Wed, Feb 07, 2018 at 12:05:40PM -0500, Hal Rosenstock wrote: > > when debug is set > > Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > --- > Change from v1: > Only print when debug is set > > src/smpdump.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/smpdump.c b/src/smpdump.c > index bc8559a..efc522f 100644 > --- a/src/smpdump.c > +++ b/src/smpdump.c > @@ -281,6 +281,9 @@ int main(int argc, char *argv[]) > if (umad_recv(portid, umad, &length, -1) != mad_agent) > IBPANIC("recv error: %s", strerror(errno)); > > + if (ibdebug) > + fprintf(stdout, "%d bytes received\n", length); To match the other debug output I changed this to stderr. Applied thanks, Ira > + > if (!dump_char) { > xdump(stdout, 0, smp->data, 64); > if (smp->status) > -- > 2.8.4 > -- 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] 3+ messages in thread
[parent not found: <20180208062039.GA16888-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>]
* Re: [PATCHv2 infiniband-diags] smpdump.c: Print number of bytes returned by umad_recv [not found] ` <20180208062039.GA16888-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org> @ 2018-02-08 12:31 ` Hal Rosenstock 0 siblings, 0 replies; 3+ messages in thread From: Hal Rosenstock @ 2018-02-08 12:31 UTC (permalink / raw) To: ira.weiny; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 2/8/2018 1:20 AM, ira.weiny wrote: > On Wed, Feb 07, 2018 at 12:05:40PM -0500, Hal Rosenstock wrote: >> >> when debug is set >> >> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> >> --- >> Change from v1: >> Only print when debug is set >> >> src/smpdump.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/src/smpdump.c b/src/smpdump.c >> index bc8559a..efc522f 100644 >> --- a/src/smpdump.c >> +++ b/src/smpdump.c >> @@ -281,6 +281,9 @@ int main(int argc, char *argv[]) >> if (umad_recv(portid, umad, &length, -1) != mad_agent) >> IBPANIC("recv error: %s", strerror(errno)); >> >> + if (ibdebug) >> + fprintf(stdout, "%d bytes received\n", length); > > To match the other debug output I changed this to stderr. debug output also uses stdout (see DEBUG or IBDEBUG macros). Anyhow, stderr is fine for this. > Applied thanks, Thanks. -- Hal > Ira > >> + >> if (!dump_char) { >> xdump(stdout, 0, smp->data, 64); >> if (smp->status) >> -- >> 2.8.4 >> > -- 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] 3+ messages in thread
end of thread, other threads:[~2018-02-08 12:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-07 17:05 [PATCHv2 infiniband-diags] smpdump.c: Print number of bytes returned by umad_recv Hal Rosenstock
[not found] ` <c0e1648e-06cc-9c79-05f7-4fc06dd3617a-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2018-02-08 6:20 ` ira.weiny
[not found] ` <20180208062039.GA16888-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2018-02-08 12:31 ` Hal Rosenstock
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox