@@ -90,7 +90,11 @@ static inline ssize_t efa_rma_post_read(struct efa_base_ep *base_ep,
90
90
ibv_wr_start (qp -> ibv_qp_ex );
91
91
base_ep -> is_wr_started = true;
92
92
}
93
- qp -> ibv_qp_ex -> wr_id = (uintptr_t ) ((flags & FI_COMPLETION ) ? msg -> context : NULL );
93
+
94
+ struct efa_context * efa_context = (struct efa_context * ) msg -> context ;
95
+ efa_context -> completion_flags = FI_RMA | FI_READ ;
96
+ efa_context -> addr = msg -> addr ;
97
+ qp -> ibv_qp_ex -> wr_id = (uintptr_t ) ((flags & FI_COMPLETION ) ? efa_context : NULL );
94
98
95
99
/* ep->domain->info->tx_attr->rma_iov_limit is set to 1 */
96
100
ibv_wr_rdma_read (qp -> ibv_qp_ex , msg -> rma_iov [0 ].key , msg -> rma_iov [0 ].addr );
@@ -225,7 +229,14 @@ static inline ssize_t efa_rma_post_write(struct efa_base_ep *base_ep,
225
229
ibv_wr_start (qp -> ibv_qp_ex );
226
230
base_ep -> is_wr_started = true;
227
231
}
228
- qp -> ibv_qp_ex -> wr_id = (uintptr_t ) ((flags & FI_COMPLETION ) ? msg -> context : NULL );
232
+
233
+ struct efa_context * efa_context = (struct efa_context * ) msg -> context ;
234
+ efa_context -> completion_flags =
235
+ flags & FI_REMOTE_CQ_DATA ?
236
+ FI_REMOTE_CQ_DATA | FI_RMA | FI_REMOTE_WRITE :
237
+ FI_RMA | FI_WRITE ;
238
+ efa_context -> addr = msg -> addr ;
239
+ qp -> ibv_qp_ex -> wr_id = (uintptr_t ) ((flags & FI_COMPLETION ) ? efa_context : NULL );
229
240
230
241
if (flags & FI_REMOTE_CQ_DATA ) {
231
242
ibv_wr_rdma_write_imm (qp -> ibv_qp_ex , msg -> rma_iov [0 ].key ,
0 commit comments