IB/qib: Process RDMA WRITE ONLY with IMMEDIATE properly
See table 35 in IBA - the header order for RDMA_WRITE_ONLY_WITH_IMMEDIATE and SEND_LAST_WITH_IMMEDIATE is different: the RDMA_WRITE_ONLY has a RETH header before the immediate data, so we need a different code path to extract the immediate data. I tested this with a userspace app that does RDMA_WRITE with immediate on a QLE7140. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
committed by
Roland Dreier
parent
0f2f930a67
commit
5715f5d44b
@@ -2068,7 +2068,10 @@ send_last:
|
|||||||
goto nack_op_err;
|
goto nack_op_err;
|
||||||
if (!ret)
|
if (!ret)
|
||||||
goto rnr_nak;
|
goto rnr_nak;
|
||||||
goto send_last_imm;
|
wc.ex.imm_data = ohdr->u.rc.imm_data;
|
||||||
|
hdrsize += 4;
|
||||||
|
wc.wc_flags = IB_WC_WITH_IMM;
|
||||||
|
goto send_last;
|
||||||
|
|
||||||
case OP(RDMA_READ_REQUEST): {
|
case OP(RDMA_READ_REQUEST): {
|
||||||
struct qib_ack_entry *e;
|
struct qib_ack_entry *e;
|
||||||
|
@@ -457,8 +457,10 @@ rdma_first:
|
|||||||
}
|
}
|
||||||
if (opcode == OP(RDMA_WRITE_ONLY))
|
if (opcode == OP(RDMA_WRITE_ONLY))
|
||||||
goto rdma_last;
|
goto rdma_last;
|
||||||
else if (opcode == OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE))
|
else if (opcode == OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE)) {
|
||||||
|
wc.ex.imm_data = ohdr->u.rc.imm_data;
|
||||||
goto rdma_last_imm;
|
goto rdma_last_imm;
|
||||||
|
}
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
case OP(RDMA_WRITE_MIDDLE):
|
case OP(RDMA_WRITE_MIDDLE):
|
||||||
/* Check for invalid length PMTU or posted rwqe len. */
|
/* Check for invalid length PMTU or posted rwqe len. */
|
||||||
@@ -471,8 +473,8 @@ rdma_first:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OP(RDMA_WRITE_LAST_WITH_IMMEDIATE):
|
case OP(RDMA_WRITE_LAST_WITH_IMMEDIATE):
|
||||||
rdma_last_imm:
|
|
||||||
wc.ex.imm_data = ohdr->u.imm_data;
|
wc.ex.imm_data = ohdr->u.imm_data;
|
||||||
|
rdma_last_imm:
|
||||||
hdrsize += 4;
|
hdrsize += 4;
|
||||||
wc.wc_flags = IB_WC_WITH_IMM;
|
wc.wc_flags = IB_WC_WITH_IMM;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user