public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH infiniband-diags 2/2] smpdump.c: Print number of bytes returned by umad_recv
@ 2017-12-11 14:57 Hal Rosenstock
       [not found] ` <499f1d77-7da6-2c00-e826-bf4d0809f48a-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Hal Rosenstock @ 2017-12-11 14:57 UTC (permalink / raw)
  To: Weiny, Ira; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org


Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 src/smpdump.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/smpdump.c b/src/smpdump.c
index bc8559a..bb304d4 100644
--- a/src/smpdump.c
+++ b/src/smpdump.c
@@ -281,6 +281,8 @@ int main(int argc, char *argv[])
 	if (umad_recv(portid, umad, &length, -1) != mad_agent)
 		IBPANIC("recv error: %s", strerror(errno));
 
+	printf("%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] 4+ messages in thread

* Re: [PATCH infiniband-diags 2/2] smpdump.c: Print number of bytes returned by umad_recv
       [not found] ` <499f1d77-7da6-2c00-e826-bf4d0809f48a-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2018-02-07  5:35   ` ira.weiny
       [not found]     ` <20180207053515.GC25132-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: ira.weiny @ 2018-02-07  5:35 UTC (permalink / raw)
  To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Mon, Dec 11, 2017 at 09:57:23AM -0500, Hal Rosenstock wrote:
> 
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  src/smpdump.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/smpdump.c b/src/smpdump.c
> index bc8559a..bb304d4 100644
> --- a/src/smpdump.c
> +++ b/src/smpdump.c
> @@ -281,6 +281,8 @@ int main(int argc, char *argv[])
>  	if (umad_recv(portid, umad, &length, -1) != mad_agent)
>  		IBPANIC("recv error: %s", strerror(errno));
>  
> +	printf("%d bytes received\n", length);

This seems like it is more for debugging.

How will this affect any scripts which include this command?  Should we make
this debug output?

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] 4+ messages in thread

* Re: [PATCH infiniband-diags 2/2] smpdump.c: Print number of bytes returned by umad_recv
       [not found]     ` <20180207053515.GC25132-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
@ 2018-02-07 11:46       ` Hal Rosenstock
       [not found]         ` <1e5e2f67-1492-cf1d-b9e7-1867b142c4ed-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Hal Rosenstock @ 2018-02-07 11:46 UTC (permalink / raw)
  To: ira.weiny; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 2/7/2018 12:35 AM, ira.weiny wrote:
> On Mon, Dec 11, 2017 at 09:57:23AM -0500, Hal Rosenstock wrote:
>>
>> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>> ---
>>  src/smpdump.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/src/smpdump.c b/src/smpdump.c
>> index bc8559a..bb304d4 100644
>> --- a/src/smpdump.c
>> +++ b/src/smpdump.c
>> @@ -281,6 +281,8 @@ int main(int argc, char *argv[])
>>  	if (umad_recv(portid, umad, &length, -1) != mad_agent)
>>  		IBPANIC("recv error: %s", strerror(errno));
>>  
>> +	printf("%d bytes received\n", length);
> 
> This seems like it is more for debugging.

I don't recall now what the case was exactly where umad_recv succeeded
but it was unclear whether the data was valid or not. In that sense,
it's a missing part of the current information returned.

I think this command geared at manual debug of attribute IDs not
supported in smpquery.

> How will this affect any scripts which include this command?  

AFAIK there are no such scripts.

> Should we make this debug output?

That's probably better/safer and at least provides a way to obtain the
proposed added information.

Do you want an updated patch for this ?

-- 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] 4+ messages in thread

* RE: [PATCH infiniband-diags 2/2] smpdump.c: Print number of bytes returned by umad_recv
       [not found]         ` <1e5e2f67-1492-cf1d-b9e7-1867b142c4ed-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2018-02-07 16:12           ` Weiny, Ira
  0 siblings, 0 replies; 4+ messages in thread
From: Weiny, Ira @ 2018-02-07 16:12 UTC (permalink / raw)
  To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1450 bytes --]

> 
> On 2/7/2018 12:35 AM, ira.weiny wrote:
> > On Mon, Dec 11, 2017 at 09:57:23AM -0500, Hal Rosenstock wrote:
> >>
> >> Signed-off-by: Hal Rosenstock <hal@mellanox.com>
> >> ---
> >>  src/smpdump.c | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/src/smpdump.c b/src/smpdump.c index bc8559a..bb304d4
> >> 100644
> >> --- a/src/smpdump.c
> >> +++ b/src/smpdump.c
> >> @@ -281,6 +281,8 @@ int main(int argc, char *argv[])
> >>  	if (umad_recv(portid, umad, &length, -1) != mad_agent)
> >>  		IBPANIC("recv error: %s", strerror(errno));
> >>
> >> +	printf("%d bytes received\n", length);
> >
> > This seems like it is more for debugging.
> 
> I don't recall now what the case was exactly where umad_recv succeeded but it
> was unclear whether the data was valid or not. In that sense, it's a missing part of
> the current information returned.
> 
> I think this command geared at manual debug of attribute IDs not supported in
> smpquery.
> 
> > How will this affect any scripts which include this command?
> 
> AFAIK there are no such scripts.
> 
> > Should we make this debug output?
> 
> That's probably better/safer and at least provides a way to obtain the proposed
> added information.
> 
> Do you want an updated patch for this ?

Yes please,
Ira


N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±­ÙšŠ{ayº\x1dʇڙë,j\a­¢f£¢·hš‹»öì\x17/oSc¾™Ú³9˜uÀ¦æå‰È&jw¨®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿïêäz¹Þ–Šàþf£¢·hšˆ§~ˆmš

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-07 16:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-11 14:57 [PATCH infiniband-diags 2/2] smpdump.c: Print number of bytes returned by umad_recv Hal Rosenstock
     [not found] ` <499f1d77-7da6-2c00-e826-bf4d0809f48a-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2018-02-07  5:35   ` ira.weiny
     [not found]     ` <20180207053515.GC25132-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2018-02-07 11:46       ` Hal Rosenstock
     [not found]         ` <1e5e2f67-1492-cf1d-b9e7-1867b142c4ed-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2018-02-07 16:12           ` Weiny, Ira

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