From patchwork Tue Oct 27 13:52:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 312003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D37AC6379D for ; Tue, 27 Oct 2020 17:31:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA4BB20657 for ; Tue, 27 Oct 2020 17:31:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603819887; bh=C1kyShctg4m/uugNKHHDmF5dIsTk9/2TrhpunOxgmag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Rh9q6yMpKwlR9WsnPJ/6wIMSzVVL1YEWqBw+ihzFl2SJhJgeW4gdCDDISyo8HRWZr EZWUpbMXmlF3Fp6nenr64/1JbJqBG1+uQz8YkIvtMJKtPP4NZsusTBTMuUJqBH+5/X uo17D9evo5rPkiTFLEnQSRug5JfVtF8SwY4aVRaI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2901151AbgJ0Okm (ORCPT ); Tue, 27 Oct 2020 10:40:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:39144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761454AbgJ0Ojw (ORCPT ); Tue, 27 Oct 2020 10:39:52 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3287121D7B; Tue, 27 Oct 2020 14:39:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809591; bh=C1kyShctg4m/uugNKHHDmF5dIsTk9/2TrhpunOxgmag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yKimP26wVTPYFU7o4jPz/XDxoZgLSL7hCYKsVLsGTKHP+sI4XWdEwk2DWGbfBL/Q2 uYe7lmjG2ZnpoimHViLkP/BQ32ORdaqdBRnx9IJb6+H/o3UAjA5pG892Ay1wQpii9Y 0fwf6oIdJxr71nNfHdkk7EtjmruYaKCW+spv/zYU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michal Kalderon , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.4 221/408] RDMA/qedr: Fix inline size returned for iWARP Date: Tue, 27 Oct 2020 14:52:39 +0100 Message-Id: <20201027135505.337900488@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Michal Kalderon [ Upstream commit fbf58026b2256e9cd5f241a4801d79d3b2b7b89d ] commit 59e8970b3798 ("RDMA/qedr: Return max inline data in QP query result") changed query_qp max_inline size to return the max roce inline size. When iwarp was introduced, this should have been modified to return the max inline size based on protocol. This size is cached in the device attributes Fixes: 69ad0e7fe845 ("RDMA/qedr: Add support for iWARP in user space") Link: https://lore.kernel.org/r/20200902165741.8355-8-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/qedr/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index 682329789d00d..4408d33646647 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -2405,7 +2405,7 @@ int qedr_query_qp(struct ib_qp *ibqp, qp_attr->cap.max_recv_wr = qp->rq.max_wr; qp_attr->cap.max_send_sge = qp->sq.max_sges; qp_attr->cap.max_recv_sge = qp->rq.max_sges; - qp_attr->cap.max_inline_data = ROCE_REQ_MAX_INLINE_DATA_SIZE; + qp_attr->cap.max_inline_data = dev->attr.max_inline; qp_init_attr->cap = qp_attr->cap; qp_attr->ah_attr.type = RDMA_AH_ATTR_TYPE_ROCE;