Skip to contentSkip to conversation

libibumad: document the setting of errno for umad_send and umad_recv

PATCH In review Ira Weiny 5 participants 6 messages Mar 29, 2013 – Apr 4, 2013 3 messages not in the archive InfiniBand

lore
Share & tools
lore

Ira Weiny

author
#0 lore raw

PATCH 1/1 libibumad: document the setting of errno for umad_send and umad_recv

---
 man/umad_recv.3 |    3 ++-
 man/umad_send.3 |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
man/umad_recv.3 +2 -1
index e233411..56e4ca7 100644
@@ -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
man/umad_send.3 +2 -1
index feb33af..b85bc56 100644
@@ -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"
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20130329112119.1bb9ee1f7e687fc40c7a841d-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org

A message that is not in the archive (sent off-list or not yet received): 515AA29B.6000800-VPRAkNaXOzVWk0Htik3J/[email protected]

#4 lore raw
Quoted 2 lines

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1828884A29C6694DAF28B7E6B8A823736F369EC5-P5GAC/[email protected]

#6 lore raw
Quoted 4 lines · Sean
Quoted 2 lines

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#7 lore raw
In reply to a message not in the archive
Quoted 7 lines

-----Original Message-----
From: [email protected] [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

Quoted 6 lines

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html