From patchwork Mon Feb 12 18:42:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adit Ranadive X-Patchwork-Id: 10214147 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 3933860236 for ; Mon, 12 Feb 2018 18:48:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 311A42883F for ; Mon, 12 Feb 2018 18:48:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25CD028C3A; Mon, 12 Feb 2018 18:48:32 +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 7E5A82883F for ; Mon, 12 Feb 2018 18:48:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932141AbeBLSs3 (ORCPT ); Mon, 12 Feb 2018 13:48:29 -0500 Received: from mail-bl2nam02on0069.outbound.protection.outlook.com ([104.47.38.69]:47904 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754169AbeBLSs0 (ORCPT ); Mon, 12 Feb 2018 13:48:26 -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=2Jl+zjCQvACROrAIKcdppoJrRde59vM9cTOwrS+uI8A=; b=ItytzsQH0YhfmdYOuaMTONktJfPK1xj8ClehcbfQmux4tgMLrDz+d/hzeT5BZuSLs5W2SKxLt7xVRZKNdPmEBHlTk6QmvWjArAiyjidE106l189gzI29CVol+b/27Zfbey/ALgPn8jyhyOcpTCPwPa7eik0EoV9JS5g38I0Ut24= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aditr@vmware.com; Received: from gandalf.eng.vmware.com (208.91.1.34) by BN1PR05MB485.namprd05.prod.outlook.com (2a01:111:e400:31::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.3; Mon, 12 Feb 2018 18:48:23 +0000 From: Adit Ranadive To: dledford@redhat.com, jgg@mellanox.com, leon@kernel.org Cc: linux-rdma@vger.kernel.org, Aditya Sarwade , stable@linux-rdma.org Subject: [PATCH rdma-core] vmw_pvrdma: Fix SRQN returned to library Date: Mon, 12 Feb 2018 10:42:36 -0800 Message-Id: <1518460956-4629-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: CY4PR08CA0045.namprd08.prod.outlook.com (2603:10b6:903:151::31) To BN1PR05MB485.namprd05.prod.outlook.com (2a01:111:e400:31::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 94c76109-b12c-4b1b-ea91-08d57249321f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:BN1PR05MB485; X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB485; 3:pWyUBkCCQF+nbWy68yckhCNag+h/WRovlSliMUTzoYxqwpqNvsjb5KTOrnQiUAWt9LRQyAJABp5gK4+LOhim91mINTdfvjzwv1sELS0L5zyit/mg6Nmng1zomNQNLojaJVjIr9OqSiPNvSRAilNdk40K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/eVBRi2YHKABlasIU0ZICI/5bYLP5QvP8pB7PnSKJRog4Zv7KFmJRkHCC5+Mu0RrmnH0VAVOWmzP2KkY8hAS1XVC9an+hWXD5fj1rw7KX37SZkutqD+0OrtchTiruxxua4nW/EWb2S+vb7MKmgB8QalBbdNcjqAXzCDOzoVv9vFJrtnxU6F/ih76oRLKAm0ogwX; 4:W+d7c9/8yZEle9tVrKiwq7anjS+w3jMM4tvw/cVD2b/l2VdGyOf8eG//aFOqlNYaOiPy69bCkKMOj0vESqvOthj3GjyF1j8HoHyGhEodHw5sNK61MwyBUa2aJsQw2ffoEUz7d0lHWa6lcgcxtWuN7NwB7BPfSqAkaEuR5qEC+kTMwkhVLC77VxMz3Ar/HgS36N6hRsR7Gy9JwcxHQzHsUcC1AuG0L7nGk1EOG+XJWm3x+zTt8brbDV7ejam5XQ6uem9CLozpGBOqwTBRSV4/uUgQZ1mfWWxHK7HbWHrIuK6PInfhrNtmGoCvI+UULuTBL7S4OAX0KzwQEYhXrqpbHfrfAaQ/glNwMpjJiDsvfDg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150)(166708455590820); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231101)(2400082)(944501161)(3002001)(6041288)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:BN1PR05MB485; BCL:0; PCL:0; RULEID:; SRVR:BN1PR05MB485; X-Forefront-PRVS: 0581B5AB35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39380400002)(376002)(396003)(366004)(39860400002)(199004)(189003)(50226002)(86362001)(5660300001)(50466002)(8936002)(2906002)(48376002)(51416003)(52116002)(81156014)(81166006)(47776003)(97736004)(36756003)(68736007)(8676002)(66066001)(7696005)(6486002)(106356001)(478600001)(6666003)(16526019)(186003)(7736002)(966005)(4326008)(305945005)(6306002)(386003)(25786009)(105586002)(3846002)(316002)(6116002)(16586007)(26005)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR05MB485; 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; BN1PR05MB485; 23:eBHuhEH+ZzI1IqsFSx87QnpI5bFOVN33vrUqNCkWME?= =?us-ascii?Q?xywabGkGwFjGjS9YT14QTzbkOPw0DYIETTbJB3X7nlhzj8WVH9O3JyOaER70?= =?us-ascii?Q?RHngy4mzk702iEN3IIemed9+hgADUIC77Gy1u4qU0jZi7HNxHGugYp5z6exu?= =?us-ascii?Q?A0ra89h2jK04/Fc15z52G1Lbh7RASVQ74k9xbsKhCugRxbSeZzoVdrp7yOTK?= =?us-ascii?Q?QEPGJLk2/IK7jxNqL+LbE3SThwZmw60gg/E5JP/IMXm+iwHRhN5gcxubeVeO?= =?us-ascii?Q?UOj+1ulnI7DEDwunHRbEUfpADm8lAX+kP5/BCCgGtDuyDeuxMxvI/YMCAei7?= =?us-ascii?Q?ErkeJcfNCPjVldjRmWikWLuD+hfTGatmgolOq8zeD8B0CacXXCsigavmrHqk?= =?us-ascii?Q?nZFcieb5hFKhDRrB8qtoMW4lHwWZGb0LrFlRt192vOUY1Nv3glz6Z4j2atpP?= =?us-ascii?Q?aZ5mwOweBDmSuKZPtxfHGPHTU1An0n4CpG2T8TZVMUj5c0FJYV7a9iZCwt7y?= =?us-ascii?Q?/EHfPUbs+qpjJExfnaqLEYZwE4llRn783ThvGF2BLlfsmi4C49TMucJK/0ys?= =?us-ascii?Q?MMOrBfVqgGNkBsD2m85jCPXGEvbi8ejjuKkQdBXSdlx8Ye5Q+kpWZuOPdB4I?= =?us-ascii?Q?8aXbjngbARTmcEb+D8y7aTYIaB5OcM505KBt3+I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Y+CZ6aAsbmS1Kl7hYeuHaS8yBXsVSE606bVJ4PSVB8Vq7ZekAHy6zymX7241lg+WBHfTsM+WdtVhhY635z818KvYRP6I/2raojDlDftk=; 7:FP1i6pGVE6awJHR6tO7TOGdJA/bARZfK/3Yi9VwqOHDYy356XDGAW2FLqR67/PFLtRosqWlmwxUdSjuYxEWUjbQd5SnWABFe+I5IuZHuvXycXgQOJLNOqMVVi+H/qTGfMJG4RP02la0n4xp+QyW7g67AGZFPmbWZobfFrYd5Q5qjNhgQbHVl+jIpZFYatMLR0wKWKza03Y/iKtCGV3ca0ba/ontNzTCVuuTTDbofM5D8DvJcF/Cj20JmMx9L8aLt SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB485; 20:6LsotMpd8pPXABli+LYDB5pa7pgnxWrNwpeHKOtjrsAmzwLgN4xK+hRs/eHf5mSxFFuUPt5xwsbT1BR31zA+eqbiPdMfO/Bo0Ivl1qYw0Jh9zNs4uKfFIo7X81jV0/MVde7hIIrn690lyLAeBQvgjC2dbdFWhq5qgK8KFuPegzk= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2018 18:48:23.1299 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 94c76109-b12c-4b1b-ea91-08d57249321f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR05MB485 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 From: Aditya Sarwade Here's a fix for the vmw_pvrdma library. It needs to go into the stable branch for 16.0 as well since we can then add it to OFED-4.8-2. The PR is here: https://github.com/linux-rdma/rdma-core/pull/291 Thanks, Adit --- Use the correct SQN reported by the driver. Fixes: 4c8ed14eb6b7 ("vmw_pvrdma: Add SRQ support") Reviewed-by: Adit Ranadive Reviewed-by: Bryan Tan Signed-off-by: Aditya Sarwade Cc: stable@linux-rdma.org --- providers/vmw_pvrdma/qp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/providers/vmw_pvrdma/qp.c b/providers/vmw_pvrdma/qp.c index 34c8020..efcc99b 100644 --- a/providers/vmw_pvrdma/qp.c +++ b/providers/vmw_pvrdma/qp.c @@ -108,7 +108,7 @@ struct ibv_srq *pvrdma_create_srq(struct ibv_pd *pd, { struct pvrdma_device *dev = to_vdev(pd->context->device); struct user_pvrdma_create_srq cmd; - struct ib_uverbs_create_srq_resp resp; + struct user_pvrdma_create_srq_resp resp; struct pvrdma_srq *srq; int ret; @@ -142,12 +142,12 @@ struct ibv_srq *pvrdma_create_srq(struct ibv_pd *pd, ret = ibv_cmd_create_srq(pd, &srq->ibv_srq, attr, &cmd.ibv_cmd, sizeof(cmd), - &resp, sizeof(resp)); + &resp.ibv_resp, sizeof(resp)); if (ret) goto err_free; - srq->srqn = resp.srqn; + srq->srqn = resp.udata.srqn; return &srq->ibv_srq;