[PATCH V2 rdma-core 1/2] libhns: Add local invalidate MR support for hip08

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

 



This patch adds local invalidate memory region (MR) support
in the user space driver.

Signed-off-by: Yangyang Li <liyangyang20@xxxxxxxxxx>
Signed-off-by: Lijun Ou <oulijun@xxxxxxxxxx>
---
 providers/hns/hns_roce_u_hw_v2.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
index 4d1bd6c..1efd97f 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -687,6 +687,16 @@ static int hns_roce_u_v2_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
 					HNS_ROCE_WQE_OP_SEND_WITH_IMM);
 				break;
 
+			case IBV_WR_LOCAL_INV:
+				roce_set_field(rc_sq_wqe->byte_4,
+					       RC_SQ_WQE_BYTE_4_OPCODE_M,
+					       RC_SQ_WQE_BYTE_4_OPCODE_S,
+					       HNS_ROCE_WQE_OP_LOCAL_INV);
+				roce_set_bit(rc_sq_wqe->byte_4,
+					     RC_SQ_WQE_BYTE_4_SO_S, 1);
+				rc_sq_wqe->inv_key =
+						htole32(wr->invalidate_rkey);
+				break;
 			case IBV_WR_ATOMIC_CMP_AND_SWP:
 				roce_set_field(rc_sq_wqe->byte_4,
 					RC_SQ_WQE_BYTE_4_OPCODE_M,
-- 
1.9.1




[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