From patchwork Sun Dec 11 14:18:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Amrani, Ram" X-Patchwork-Id: 9469803 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B039960761 for ; Sun, 11 Dec 2016 14:19:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0B3128159 for ; Sun, 11 Dec 2016 14:19:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9570B283F4; Sun, 11 Dec 2016 14:19:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BFA028159 for ; Sun, 11 Dec 2016 14:19:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753199AbcLKOTG (ORCPT ); Sun, 11 Dec 2016 09:19:06 -0500 Received: from mx0a-0016ce01.pphosted.com ([67.231.148.157]:36031 "EHLO mx0b-0016ce01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752898AbcLKOTG (ORCPT ); Sun, 11 Dec 2016 09:19:06 -0500 Received: from pps.filterd (m0095336.ppops.net [127.0.0.1]) by mx0a-0016ce01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id uBBEHhTV009342; Sun, 11 Dec 2016 06:18:54 -0800 Received: from avcashub1.qlogic.com ([198.186.0.115]) by mx0a-0016ce01.pphosted.com with ESMTP id 2798eh002n-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 11 Dec 2016 06:18:54 -0800 Received: from lb-tlvb-ramrani.il.qlogic.org (10.185.6.119) by avcashub1.qlogic.org (10.1.4.190) with Microsoft SMTP Server id 14.3.235.1; Sun, 11 Dec 2016 06:18:53 -0800 From: Ram Amrani To: , CC: , , Ram Amrani , Ram Amrani Subject: [PATCH rdma-core 3/4] libqedr: fix EDPM configuration Date: Sun, 11 Dec 2016 16:18:10 +0200 Message-ID: <1481465891-14789-4-git-send-email-Ram.Amrani@Cavium.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1481465891-14789-1-git-send-email-Ram.Amrani@Cavium.com> References: <1481465891-14789-1-git-send-email-Ram.Amrani@Cavium.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5800 definitions=8376 signatures=670775 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1612110220 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- providers/qedr/qelr_verbs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;