projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2446304
)
IB/mlx4: Check if SRQ is full when posting receive
author
Roland Dreier
<rolandd@cisco.com>
Mon, 21 May 2007 03:19:24 +0000
(20:19 -0700)
committer
Roland Dreier
<rolandd@cisco.com>
Mon, 21 May 2007 03:19:24 +0000
(20:19 -0700)
Make mlx4_post_srq_recv() fail if the SRQ is full (head == tail).
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mlx4/srq.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mlx4/srq.c
b/drivers/infiniband/hw/mlx4/srq.c
index
42ab4a8
..
12fac1c
100644
(file)
--- a/
drivers/infiniband/hw/mlx4/srq.c
+++ b/
drivers/infiniband/hw/mlx4/srq.c
@@
-297,6
+297,12
@@
int mlx4_ib_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
break;
}
+ if (unlikely(srq->head == srq->tail)) {
+ err = -ENOMEM;
+ *bad_wr = wr;
+ break;
+ }
+
srq->wrid[srq->head] = wr->wr_id;
next = get_wqe(srq, srq->head);