diff mbox

[rdma-core,3/4] libqedr: fix EDPM configuration

Message ID 1481465891-14789-4-git-send-email-Ram.Amrani@Cavium.com (mailing list archive)
State Accepted
Headers show

Commit Message

Amrani, Ram Dec. 11, 2016, 2:18 p.m. UTC
The DMA length should be configured to the Enhanced Direct Packet Mode
extension header only in write and write with immediate commands.

Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
---
 providers/qedr/qelr_verbs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c
index 80e4263..bdcf132 100644
--- a/providers/qedr/qelr_verbs.c
+++ b/providers/qedr/qelr_verbs.c
@@ -989,7 +989,10 @@  static uint32_t qelr_prepare_sq_inline_data(struct qelr_qp *qp,
 
 	if (qp->edpm.is_edpm) {
 		qp->edpm.dpm_payload_size += data_size;
-		qp->edpm.rdma_ext->dma_length = htonl(data_size);
+
+		if (wr->opcode == IBV_WR_RDMA_WRITE ||
+		    wr->opcode == IBV_WR_RDMA_WRITE_WITH_IMM)
+			qp->edpm.rdma_ext->dma_length = htonl(data_size);
 	}
 
 	return data_size;