Skip to content

Commit 70aad90

Browse files
zhijianli88jgunthorpe
authored andcommitted
RDMA/rxe: Implement flush completion
Per IBA SPEC, FLUSH will ack in rdma read response with 0 length. Use IB_WC_FLUSH (aka IB_UVERBS_WC_FLUSH) code to tell userspace a FLUSH completion. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Zhu Yanjun <[email protected]> Signed-off-by: Li Zhijian <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent ea1bb00 commit 70aad90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/infiniband/sw/rxe/rxe_comp.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ static enum ib_wc_opcode wr_to_wc_opcode(enum ib_wr_opcode opcode)
105105
case IB_WR_REG_MR: return IB_WC_REG_MR;
106106
case IB_WR_BIND_MW: return IB_WC_BIND_MW;
107107
case IB_WR_ATOMIC_WRITE: return IB_WC_ATOMIC_WRITE;
108+
case IB_WR_FLUSH: return IB_WC_FLUSH;
108109

109110
default:
110111
return 0xff;
@@ -278,7 +279,8 @@ static inline enum comp_state check_ack(struct rxe_qp *qp,
278279
*/
279280
case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE:
280281
if (wqe->wr.opcode != IB_WR_RDMA_READ &&
281-
wqe->wr.opcode != IB_WR_RDMA_READ_WITH_INV) {
282+
wqe->wr.opcode != IB_WR_RDMA_READ_WITH_INV &&
283+
wqe->wr.opcode != IB_WR_FLUSH) {
282284
wqe->status = IB_WC_FATAL_ERR;
283285
return COMPST_ERROR;
284286
}

0 commit comments

Comments
 (0)