aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@intel.com>2017-03-20 20:26:01 -0400
committerDoug Ledford <dledford@redhat.com>2017-04-05 14:45:09 -0400
commit44dcfa4b182dffed0e1e6535220fcdd12620b9ec (patch)
treea1aa114b8f797893e28c4fd5d6b4f872599fc571 /include/rdma
parent5f14e4e6674002f377ba164114eb9a67ba23d864 (diff)
IB/rdmavt: Avoid reseting wqe send_flags in unreserve
The wqe should be read only and in fact the superfluous reset of the RVT_SEND_RESERVE_USED flag causes an issue where reserved operations elicit a bad completion to the ULP. The maintenance of the flag is now entirely within rvt_post_one_wr() where a reserved operation will set the flag and a non-reserved operation will insure the operation that is about to be posted has the flag reset. Fixes: Commit 856cc4c237ad ("IB/hfi1: Add the capability for reserved operations") Reviewed-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/rdmavt_qp.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h
index 3cdd9e26e96e..e3bb312a2ffa 100644
--- a/include/rdma/rdmavt_qp.h
+++ b/include/rdma/rdmavt_qp.h
@@ -2,7 +2,7 @@
2#define DEF_RDMAVT_INCQP_H 2#define DEF_RDMAVT_INCQP_H
3 3
4/* 4/*
5 * Copyright(c) 2016 Intel Corporation. 5 * Copyright(c) 2016, 2017 Intel Corporation.
6 * 6 *
7 * This file is provided under a dual BSD/GPLv2 license. When using or 7 * This file is provided under a dual BSD/GPLv2 license. When using or
8 * redistributing this file, you may do so under either license. 8 * redistributing this file, you may do so under either license.
@@ -526,7 +526,6 @@ static inline void rvt_qp_wqe_reserve(
526 struct rvt_qp *qp, 526 struct rvt_qp *qp,
527 struct rvt_swqe *wqe) 527 struct rvt_swqe *wqe)
528{ 528{
529 wqe->wr.send_flags |= RVT_SEND_RESERVE_USED;
530 atomic_inc(&qp->s_reserved_used); 529 atomic_inc(&qp->s_reserved_used);
531} 530}
532 531
@@ -550,7 +549,6 @@ static inline void rvt_qp_wqe_unreserve(
550 struct rvt_swqe *wqe) 549 struct rvt_swqe *wqe)
551{ 550{
552 if (unlikely(wqe->wr.send_flags & RVT_SEND_RESERVE_USED)) { 551 if (unlikely(wqe->wr.send_flags & RVT_SEND_RESERVE_USED)) {
553 wqe->wr.send_flags &= ~RVT_SEND_RESERVE_USED;
554 atomic_dec(&qp->s_reserved_used); 552 atomic_dec(&qp->s_reserved_used);
555 /* insure no compiler re-order up to s_last change */ 553 /* insure no compiler re-order up to s_last change */
556 smp_mb__after_atomic(); 554 smp_mb__after_atomic();