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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 providers/hns/hns_roce_u_hw_v2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux