Thread (1 message) 1 message, 1 author, 2016-08-08

Re: [PATCH libmlx5] fix err return values to match ibv_post_send expectations

From: Jason Gunthorpe <hidden>
Date: 2016-08-08 16:30:18

On Sat, Aug 06, 2016 at 02:48:23PM -0400, Jarod Wilson wrote:
On Fri, Aug 05, 2016 at 12:01:07PM -0600, Jason Gunthorpe wrote:
quoted
On Fri, Aug 05, 2016 at 01:33:59PM -0400, Jarod Wilson wrote:
quoted
-	return _mlx5_post_send(ibqp, wr, bad_wr);
+	errno = _mlx5_post_send(ibqp, wr, bad_wr);
+	return errno;
Why still set errno? It was wrong in the first place..

Likely every use of errno in this provider should be reviewed.
Wasn't sure if something else might actually consume errno elsewhere,
since it's a global, and the other code path in that function set errno.
Could certainly just stick with returning the _mlx5_post_send() result
directly.
If the man page doesn't document the function destroying errno, then
it should preserve it. Do not just randomly set errno.

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help