linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IB-mlx5: Return EINVAL when caller specifies too many SGEs
@ 2016-07-27 19:38 Chuck Lever
       [not found] ` <20160727193718.29482.73416.stgit-FYjufvaPoItvLzlybtyyYzGyq/o6K9yX@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Chuck Lever @ 2016-07-27 19:38 UTC (permalink / raw)
  To: leonro-VPRAkNaXOzVWk0Htik3J/w, matanb-VPRAkNaXOzVWk0Htik3J/w
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Other similar functions (mlx5_ib_post_recv being the closest)
return EINVAL in this case.

Signed-off-by: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
Hi Matan, Leon-

I noticed this nit while debugging a problem in xprtrdma.

 drivers/infiniband/hw/mlx5/qp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index ce0a7ab..b0e5498 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -3436,7 +3436,7 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 		num_sge = wr->num_sge;
 		if (unlikely(num_sge > qp->sq.max_gs)) {
 			mlx5_ib_warn(dev, "\n");
-			err = -ENOMEM;
+			err = -EINVAL;
 			*bad_wr = wr;
 			goto out;
 		}

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

end of thread, other threads:[~2016-07-28 15:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-27 19:38 [PATCH] IB-mlx5: Return EINVAL when caller specifies too many SGEs Chuck Lever
     [not found] ` <20160727193718.29482.73416.stgit-FYjufvaPoItvLzlybtyyYzGyq/o6K9yX@public.gmane.org>
2016-07-28  5:22   ` Leon Romanovsky
     [not found]     ` <20160728052246.GM4628-2ukJVAZIZ/Y@public.gmane.org>
2016-07-28 13:08       ` Eli Cohen
     [not found]         ` <DB5PR05MB1848930C5B1D2D52CD2AC3AAC5000-8IvNv+8VlcDdorXcTtKhldqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-07-28 13:18           ` Chuck Lever
     [not found]             ` <80BD326A-06FD-48F3-B701-E7F9DC385EA9-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-07-28 13:24               ` Eli Cohen
     [not found]                 ` <DB5PR05MB184872B96AE45A89A55F289FC5000-8IvNv+8VlcDdorXcTtKhldqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-07-28 13:39                   ` Chuck Lever
     [not found]                     ` <5A4EA4C2-46DA-4968-9A03-555836DF515F-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-07-28 15:47                       ` Leon Romanovsky
2016-07-28 15:44               ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).