From patchwork Tue Oct 27 13:51:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 289852 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=ham 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 0E0B4C55179 for ; Tue, 27 Oct 2020 15:06:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C27D222275 for ; Tue, 27 Oct 2020 15:06:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811196; bh=ipp8Q2SO3LsluUuS9Pv4/C64DlSzodBh+MFDyHqTaY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ZiY9s2NsGJRMnY/rQAz1jW8amPnipOhHI2e+55VbCMjmt66rZ+FvDkFT+KKzA05VR 7atzcvtu346NJcrpG8Vyna903r2CPgKwXRRgmf+2oBt7sbftQmYP/oP2WnScPmATpx fZtqQXJCnfs+IXD3zR3GcsNVN3cAoolgxc95vaV0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1790272AbgJ0PEQ (ORCPT ); Tue, 27 Oct 2020 11:04:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:38836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1790267AbgJ0PEP (ORCPT ); Tue, 27 Oct 2020 11:04:15 -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 AEAB920747; Tue, 27 Oct 2020 15:04:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811055; bh=ipp8Q2SO3LsluUuS9Pv4/C64DlSzodBh+MFDyHqTaY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sqNF2qYn9S9biY/EwDlNpR3HZFUCN99XuSE6N7ih7Aoc2VaOstoIMjBqyFI0ENPJ6 fkWYnEpRxJPHzPXB4zlnEnHhh1oNBFyFWfcfJ1jKAFjQ7j6fn1t2+4yCDkGtgKroGU eC+MbSK3BTGjmB0paazTYgLRHkdBy3ThaXL1UDSM= 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.8 358/633] RDMA/qedr: Fix inline size returned for iWARP Date: Tue, 27 Oct 2020 14:51:41 +0100 Message-Id: <20201027135539.483566764@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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 7de96ac4ce543..820e351277d1b 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -2637,7 +2637,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;