From patchwork Fri Feb 16 18:51:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adit Ranadive X-Patchwork-Id: 10225463 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 62058602CB for ; Fri, 16 Feb 2018 18:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5184E28E0C for ; Fri, 16 Feb 2018 18:58:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4643628EB4; Fri, 16 Feb 2018 18:58:03 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 9B5B528FFE for ; Fri, 16 Feb 2018 18:58:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751133AbeBPS6B (ORCPT ); Fri, 16 Feb 2018 13:58:01 -0500 Received: from mail-sn1nam02on0040.outbound.protection.outlook.com ([104.47.36.40]:58614 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750907AbeBPS57 (ORCPT ); Fri, 16 Feb 2018 13:57:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onevmw.onmicrosoft.com; s=selector1-vmware-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=WAy+O8uxlDR1pIQIGj29VkYeo1Y1QIiwF98Kmi4uUFs=; b=eH2rkcD804AHinS+aNFnnsVHVIgGI/pMhpho4BM8PtIewCK4p4s8k6GR8iB6QxfBhDQfILvIw5A4Jirl6iXz1+iIzQONBj7h5HRDE7Oo+Bu59u6E11Z65LmlCEW+gFymJzgaIkI+6VayDnPJpwsz3RLyHTa17v2JxK8czl8kOqg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aditr@vmware.com; Received: from gandalf.eng.vmware.com (208.91.1.34) by BN1PR05MB486.namprd05.prod.outlook.com (2a01:111:e400:31::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.6; Fri, 16 Feb 2018 18:57:54 +0000 From: Adit Ranadive To: dledford@redhat.com, jgg@mellanox.com, leon@kernel.org, linux-rdma@vger.kernel.org Cc: Adit Ranadive , stable@linux-rdma.org Subject: [PATCH v1 rdma-core] vmw_pvrdma: Drop the extraneous align_next_power2 for sges Date: Fri, 16 Feb 2018 10:51:06 -0800 Message-Id: <1518807066-14845-1-git-send-email-aditr@vmware.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [208.91.1.34] X-ClientProxiedBy: HE1PR05CA0140.eurprd05.prod.outlook.com (2603:10a6:7:28::27) To BN1PR05MB486.namprd05.prod.outlook.com (2a01:111:e400:31::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 52373f5b-2a24-420a-ceda-08d5756f3109 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:BN1PR05MB486; X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB486; 3:G/DVvSVFjHnEiYm4qtexcJLuMLILom5kES8O+LLQ0LfjSF6SeWttdwwHkQDknlbWiq7vdq2NvvsBKHiCXPTKLAmgbHvtfMae7fSaQ+ppD5O+R8JosuIdklofMQgVi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AhsSLzPq+m4Vi+tVfcw8nVYqbNUPjYBz0TGe/PC0eyzCR5D1qtFwbFdBut+Lm61ylLX/GBL0+d7fSrjSkqOMaT0vmzOvIFrJ9eC5x3y2Cb0JCx3zDN3/17765YiHUieesw87Ya4i8n4PO1v9C4ai2iRSx2F+ZJ74ud71MDZnMWyK5jIFfN0tGzr6P9cm1R64sMDfREdOJ+0DcoG47Ph; 4:lGPeiuZGrVeFTrrSc9QxvUfr5mgWS5m6A5Ar/RMeHvye6BMYe+m6EE34uBabsa0RMBM4kgwbvNrPupHLzU2nzMOIYRrJej+ulBtQimzTcvzASTNFpPse9hJDSxmfKjr4L3NfEGF/LUcIGx6yBMSSBDjUYJz3fi/2SpVc9SqHaI+tZXCbrU33HKuOrv2VFcnbpfwNWf0EpJ9QUSkWsn0IgL/HqPTTwSM/+AqY/CO51QeODnzYGWri97ykZ7QJ+Yz84r9hZBZmcy4TAAFJLjtmnjOZkenePGMozOmBcS5xfVTL2AoEr/mhASdJqixZRqDq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231101)(944501161)(3002001)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:BN1PR05MB486; BCL:0; PCL:0; RULEID:; SRVR:BN1PR05MB486; X-Forefront-PRVS: 0585417D7B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(396003)(39860400002)(346002)(39380400002)(366004)(199004)(189003)(16586007)(186003)(52116002)(51416003)(7696005)(7736002)(305945005)(26005)(386003)(16526019)(66066001)(86362001)(36756003)(47776003)(50466002)(6116002)(3846002)(106356001)(68736007)(8936002)(6666003)(6486002)(81156014)(81166006)(53936002)(478600001)(97736004)(48376002)(50226002)(8676002)(4326008)(25786009)(5660300001)(105586002)(316002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR05MB486; H:gandalf.eng.vmware.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR05MB486; 23:ZErSSVFYNk8dWNOtRKxJWfh+FGRzK7Pjh+5EAvglrY?= =?us-ascii?Q?ibqLosrAICa5wxNs3ceYduHQu73fkR39R1tx7LzQg35UAjMbgq1kRtdbUrXH?= =?us-ascii?Q?VZFsw5e3jKM6LlGzGDdczrKYfPzchXfxgyuuiCpLAFQ+EP3M2FX6syOJcGUm?= =?us-ascii?Q?0+aMr4s0v9vc1FcmMmlgE4CDTE/vyso6n2+RWDf5L/aKpuhL1GXM/mxPEItp?= =?us-ascii?Q?DptH8FwqBHuw66LZOiM41GdY5wgqtsmAvVX6srUzNRU601u85oM+AyQs3grF?= =?us-ascii?Q?jZluCS5iL00kyBWjp4gZdezjpM0vn8a84NZye7GwwXvbNEIX2+YOBXuLl5ma?= =?us-ascii?Q?MXSXN/YRm0qcqfi+eoJmUkquP57azE/Sj9xZE3JBF3uFMg0u3/C0PtdsepPr?= =?us-ascii?Q?SNXG/8VLnXULvqdQVWamG8MBYwRf6Hbvnt8DbD6lRjhbYvjzgASNZYUy1D/V?= =?us-ascii?Q?ooFG1ERF2/lmVapTC96kUCpZltQ5AGsAjzYtafhvNFuyt6dxZqaZoniOdt0u?= =?us-ascii?Q?+qLukdhsFmPTG7+xNgt3OBMKAa6GqEN13xzmf7ARyQBs8UNRB1zezcgLqyLz?= =?us-ascii?Q?k0h+FGjufu0p9aN/b9aSr3DPcYDgBlLFTh6SguR76IrMlpfopdlviUePwHy/?= =?us-ascii?Q?vo35BQ3ECzCMmaydTy0DyQk9DxwIlF+Pss0xtbKFhNESKlVWJTrXHVG2a9BX?= =?us-ascii?Q?5IJ0tLV/055/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dUxl4wI=; 7:otmLon4PZYY6P9D80N+1D0u9Bps9goX7TP1CPWFtWp1eLyThqhb+d7XZ+EwU2HgWREAg9/m2bi5KpYM6bDqc90y8S9898BZxXMRZFzwn/gZ15KYkY1qNRkJ10tWVSnYwotAT4RT3yfkh23sQRCJ1C1kSFkNPTXIOvP9TwFgLs2T58/oMwyfJDqHo5qZmS92K+T+zZqQuKeQCp9yfiHnBnVDp9rybrUcb4AP4EI8N129ugTHlzL6Ja4obM/yCtPcG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB486; 20:P87fCX+4R8NxNNIEXXms0kbuCd2H6qZgZXq8du0SOaj5zGf8YlngmdGzBx7hFX5hP0tL4GQtnoBZ1L4AjVAdwM3O/jXmhDOQvjqPyLhYsOjOGTnjdLc2qis4jKg86DMAcsgK/0XvAJnQmtfLHugVlksOaPk730hBpptIIRSv/f0= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2018 18:57:54.3120 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 52373f5b-2a24-420a-ceda-08d5756f3109 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR05MB486 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 Fixes: 4c8ed14eb6b7 ("vmw_pvrdma: Add SRQ support") Reviewed-by: Aditya Sarwade Reviewed-by: Bryan Tan Reviewed-by: Nitish Bhat Signed-off-by: Adit Ranadive Cc: stable@linux-rdma.org --- v0->v1: Updated commit message providers/vmw_pvrdma/qp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/providers/vmw_pvrdma/qp.c b/providers/vmw_pvrdma/qp.c index efcc99b..4b9f897 100644 --- a/providers/vmw_pvrdma/qp.c +++ b/providers/vmw_pvrdma/qp.c @@ -113,7 +113,7 @@ struct ibv_srq *pvrdma_create_srq(struct ibv_pd *pd, int ret; attr->attr.max_wr = align_next_power2(max_t(uint32_t, 1U, attr->attr.max_wr)); - attr->attr.max_sge = align_next_power2(max_t(uint32_t, 1U, attr->attr.max_sge)); + attr->attr.max_sge = max_t(uint32_t, 1U, attr->attr.max_sge); srq = malloc(sizeof(*srq)); if (!srq) @@ -216,14 +216,12 @@ struct ibv_qp *pvrdma_create_qp(struct ibv_pd *pd, int ret; int is_srq = !!(attr->srq); - attr->cap.max_send_sge = - align_next_power2(max_t(uint32_t, 1U, attr->cap.max_send_sge)); + attr->cap.max_send_sge = max_t(uint32_t, 1U, attr->cap.max_send_sge); attr->cap.max_send_wr = align_next_power2(max_t(uint32_t, 1U, attr->cap.max_send_wr)); if (!is_srq) { - attr->cap.max_recv_sge = - align_next_power2(max_t(uint32_t, 1U, attr->cap.max_recv_sge)); + attr->cap.max_recv_sge = max_t(uint32_t, 1U, attr->cap.max_recv_sge); attr->cap.max_recv_wr = align_next_power2(max_t(uint32_t, 1U, attr->cap.max_recv_wr)); } else {