projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a96ffb1
)
RDMA/ocrdma: Allow only SEND opcode in case of UD QPs
author
Mitesh Ahuja
<
[email protected]
>
Tue, 10 Jun 2014 14:02:20 +0000
(19:32 +0530)
committer
Roland Dreier
<
[email protected]
>
Fri, 1 Aug 2014 22:07:36 +0000
(15:07 -0700)
Prevent posting opcodes other than send and send immediate on the UD QPs.
Signed-off-by: Mitesh Ahuja <
[email protected]
>
Signed-off-by: Devesh Sharma <
[email protected]
>
Signed-off-by: Selvin Xavier <
[email protected]
>
Signed-off-by: Roland Dreier <
[email protected]
>
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 2b68235973d7786869565fdf3f22c7794e13e091..7f54d2478738a5ec0b6566b7e5980b339c829588 100644
(file)
--- a/
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@
-2055,6
+2055,13
@@
int ocrdma_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
}
while (wr) {
+ if (qp->qp_type == IB_QPT_UD &&
+ (wr->opcode != IB_WR_SEND &&
+ wr->opcode != IB_WR_SEND_WITH_IMM)) {
+ *bad_wr = wr;
+ status = -EINVAL;
+ break;
+ }
if (ocrdma_hwq_free_cnt(&qp->sq) == 0 ||
wr->num_sge > qp->sq.max_sges) {
*bad_wr = wr;