From patchwork Tue Oct 27 13:51:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 312501 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 4A1B9C63697 for ; Tue, 27 Oct 2020 15:47:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E50F922202 for ; Tue, 27 Oct 2020 15:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813647; bh=VTa9YoU+X8GpLPs8AMYwC+f7N1Mnv2nRE6zERsHPy4U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Ndkt/g6BUjmMLZPi5SYNTvcsPiO6Dt4UnY/3vS2TGouViiKzlMkB7Xpw6vRvpH6tk r6NuYOcp8bCgDHG5bpn2gvANjkQ8HN3fhlnKct5yHmLidYwXK2c2A7PP9ZQCk7R5Wx bB8iKs47ACQsoeb2ounyHbuFGsQwWqihBA5mS2bg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1802103AbgJ0Pph (ORCPT ); Tue, 27 Oct 2020 11:45:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:57754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1801066AbgJ0Pi1 (ORCPT ); Tue, 27 Oct 2020 11:38:27 -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 E9247207C4; Tue, 27 Oct 2020 15:38:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813106; bh=VTa9YoU+X8GpLPs8AMYwC+f7N1Mnv2nRE6zERsHPy4U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bFcLUL2PrOgzZJO5xvDl3p/6/eK8j7gE9aHXjHJkBc8FSYR//krAvgHQ9BoW/Qamh xrVE+sVVYIowAN5c1wjW50/nOSAy4fNbNLYc9bCLaDIEWBZbO34jcnT+GhEFz941u7 m9GrW1a62ae8R/TizFPxjYvHd1kc8PSKFVtIFGWM= 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.9 438/757] RDMA/qedr: Fix inline size returned for iWARP Date: Tue, 27 Oct 2020 14:51:28 +0100 Message-Id: <20201027135511.084916951@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@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 c61bdf97231f8..db6be39834128 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;