From patchwork Sun Dec 11 14:18:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Amrani, Ram" X-Patchwork-Id: 9469799 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 CE24F607D3 for ; Sun, 11 Dec 2016 14:18:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF34128159 for ; Sun, 11 Dec 2016 14:18:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3478283F4; Sun, 11 Dec 2016 14:18:45 +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 13F36283EE for ; Sun, 11 Dec 2016 14:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753220AbcLKOSm (ORCPT ); Sun, 11 Dec 2016 09:18:42 -0500 Received: from mx0a-0016ce01.pphosted.com ([67.231.148.157]:36007 "EHLO mx0b-0016ce01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753199AbcLKOSm (ORCPT ); Sun, 11 Dec 2016 09:18:42 -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 uBBEIc8K009667; Sun, 11 Dec 2016 06:18:38 -0800 Received: from avcashub1.qlogic.com ([198.186.0.115]) by mx0a-0016ce01.pphosted.com with ESMTP id 2798eh001n-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 11 Dec 2016 06:18:38 -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:37 -0800 From: Ram Amrani To: , CC: , , Ram Amrani , Ram Amrani Subject: [PATCH rdma-core 1/4] libqedr: ignore inline flag in read verbs Date: Sun, 11 Dec 2016 16:18:08 +0200 Message-ID: <1481465891-14789-2-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 In the current implementation a read verb with IBV_SEND_INLINE may be illegally configured. In this fix we ignore the inline bit in the case of a read verb. Signed-off-by: Ram Amrani --- providers/qedr/qelr_verbs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c index d2b34ee..fae823c 100644 --- a/providers/qedr/qelr_verbs.c +++ b/providers/qedr/qelr_verbs.c @@ -1027,7 +1027,9 @@ static uint32_t qelr_prepare_sq_rdma_data(struct qelr_qp *qp, rwqe2->r_key = htole32(wr->wr.rdma.rkey); TYPEPTR_ADDR_SET(rwqe2, remote_va, wr->wr.rdma.remote_addr); - if (wr->send_flags & IBV_SEND_INLINE) { + if (wr->send_flags & IBV_SEND_INLINE && + (wr->opcode == IBV_WR_RDMA_WRITE_WITH_IMM || + wr->opcode == IBV_WR_RDMA_WRITE)) { uint8_t flags = 0; SET_FIELD2(flags, RDMA_SQ_RDMA_WQE_1ST_INLINE_FLG, 1);