public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libibumad: document the setting of errno for umad_send and umad_recv
@ 2013-03-29 18:21 Ira Weiny
       [not found] ` <20130329112119.1bb9ee1f7e687fc40c7a841d-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Ira Weiny @ 2013-03-29 18:21 UTC (permalink / raw)
  To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA



Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 man/umad_recv.3 |    3 ++-
 man/umad_send.3 |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/man/umad_recv.3 b/man/umad_recv.3
index e233411..56e4ca7 100644
--- a/man/umad_recv.3
+++ b/man/umad_recv.3
@@ -55,7 +55,8 @@ be returned.
 
 .SH "RETURN VALUE"
 .B umad_recv()
-returns non negative receiving agentid on success, and a negative value on error as follows:
+on success return the agentid; on error, errno is set and a negative value is
+returned as follows:
  -EINVAL      invalid port handle or agentid or *length is less than the minimum supported
  -EIO         receive operation failed
  -EWOULDBLOCK non blocking read can't be fulfilled
diff --git a/man/umad_send.3 b/man/umad_send.3
index feb33af..b85bc56 100644
--- a/man/umad_send.3
+++ b/man/umad_send.3
@@ -39,7 +39,8 @@ makes kernel wait forever for the reply.
 indicates the number of times the MAD will be retried before giving up.
 .SH "RETURN VALUE"
 .B umad_send()
-returns 0 on success, and a negative value on error as follows:
+returns 0 on success; on error, errno is set and a negative value is returned
+as follows:
  -EINVAL invalid port handle or agentid
  -EIO    send operation failed
 .SH "AUTHOR"
-- 
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] 6+ messages in thread

* Re: [PATCH] libibumad: document the setting of errno for umad_send and umad_recv
       [not found] ` <20130329112119.1bb9ee1f7e687fc40c7a841d-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2013-04-02  9:19   ` Or Gerlitz
       [not found]     ` <515AA29B.6000800-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  2013-04-04 11:21   ` Hal Rosenstock
  1 sibling, 1 reply; 6+ messages in thread
From: Or Gerlitz @ 2013-04-02  9:19 UTC (permalink / raw)
  To: Ira Weiny, Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Hi Hal, Ira,

Just wondered why are you setting errno in the mad libraries? so far we 
managed to avoid doing so in libibverbs, librdmacm, libmlx4 ones.

Or.
--
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] 6+ messages in thread

* RE: [PATCH] libibumad: document the setting of errno for umad_send and umad_recv
       [not found]     ` <515AA29B.6000800-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2013-04-02 14:41       ` Hefty, Sean
       [not found]         ` <1828884A29C6694DAF28B7E6B8A823736F369EC5-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  2013-04-02 15:10       ` Weiny, Ira
  1 sibling, 1 reply; 6+ messages in thread
From: Hefty, Sean @ 2013-04-02 14:41 UTC (permalink / raw)
  To: Or Gerlitz, Weiny, Ira, Hal Rosenstock
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

> Just wondered why are you setting errno in the mad libraries? so far we
> managed to avoid doing so in libibverbs, librdmacm, libmlx4 ones.

The librdmacm does set errno
--
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] 6+ messages in thread

* RE: [PATCH] libibumad: document the setting of errno for umad_send and umad_recv
       [not found]     ` <515AA29B.6000800-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  2013-04-02 14:41       ` Hefty, Sean
@ 2013-04-02 15:10       ` Weiny, Ira
  1 sibling, 0 replies; 6+ messages in thread
From: Weiny, Ira @ 2013-04-02 15:10 UTC (permalink / raw)
  To: Or Gerlitz, Hal Rosenstock
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> 
> Hi Hal, Ira,
> 
> Just wondered why are you setting errno in the mad libraries? so far we
> managed to avoid doing so in libibverbs, librdmacm, libmlx4 ones.

Turns out umad has been doing so since ~2007.  I don't know if any users are depending on it but that is the current interface so I think it should be documented.

For libibmad there is just no other way to get errors to the users without doing so.  I don't like it but after a long discussion between Jason, Brandon, and myself this was the only path to take.  With libibmad I don't think the impact is quite as bad as I don't think there are as many users.

Ira

> 
> Or.
> --
> 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
--
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] 6+ messages in thread

* Re: [PATCH] libibumad: document the setting of errno for umad_send and umad_recv
       [not found]         ` <1828884A29C6694DAF28B7E6B8A823736F369EC5-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2013-04-02 19:17           ` Or Gerlitz
  0 siblings, 0 replies; 6+ messages in thread
From: Or Gerlitz @ 2013-04-02 19:17 UTC (permalink / raw)
  To: Hefty, Sean
  Cc: Or Gerlitz, Weiny, Ira, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Tue, Apr 2, 2013 at 5:41 PM, Hefty, Sean <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
>> Just wondered why are you setting errno in the mad libraries? so far we
>> managed to avoid doing so in libibverbs, librdmacm, libmlx4 ones.
>
> The librdmacm does set errno

except for one place, libibverbs doesn't
--
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] 6+ messages in thread

* Re: [PATCH] libibumad: document the setting of errno for umad_send and umad_recv
       [not found] ` <20130329112119.1bb9ee1f7e687fc40c7a841d-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  2013-04-02  9:19   ` Or Gerlitz
@ 2013-04-04 11:21   ` Hal Rosenstock
  1 sibling, 0 replies; 6+ messages in thread
From: Hal Rosenstock @ 2013-04-04 11:21 UTC (permalink / raw)
  To: Ira Weiny; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On 3/29/2013 2:21 PM, Ira Weiny wrote:
> 
> 
> Signed-off-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Thanks. Applied.

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

end of thread, other threads:[~2013-04-04 11:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-29 18:21 [PATCH] libibumad: document the setting of errno for umad_send and umad_recv Ira Weiny
     [not found] ` <20130329112119.1bb9ee1f7e687fc40c7a841d-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-04-02  9:19   ` Or Gerlitz
     [not found]     ` <515AA29B.6000800-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-04-02 14:41       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A823736F369EC5-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-04-02 19:17           ` Or Gerlitz
2013-04-02 15:10       ` Weiny, Ira
2013-04-04 11:21   ` Hal Rosenstock

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