diff mbox

[rdma-core,6/6] libhns: Fix the bug with rq sge

Message ID 1526009610-72089-7-git-send-email-oulijun@huawei.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show

Commit Message

Lijun Ou May 11, 2018, 3:33 a.m. UTC
When received multiply rq sge, it should tag the
invalid lkey for the last non-zero length sge
when have some sges' length are zero. This patch
fixes it.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 providers/hns/hns_roce_u_hw_v2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
index 7323eaa..d63c401 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -817,8 +817,8 @@  static int hns_roce_u_v2_post_recv(struct ibv_qp *ibvqp, struct ibv_recv_wr *wr,
 		}
 
 		if (i < qp->rq.max_gs) {
-			dseg[i].lkey = htole32(0x100);
-			dseg[i].addr = 0;
+			dseg->lkey = htole32(0x100);
+			dseg->addr = 0;
 		}
 
 		/* QP support receive inline wqe */