From patchwork Thu Sep 21 22:56:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Tan X-Patchwork-Id: 9964887 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 582A0602D8 for ; Thu, 21 Sep 2017 22:56:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 489A2296E5 for ; Thu, 21 Sep 2017 22:56:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D72C296EA; Thu, 21 Sep 2017 22:56:43 +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 AE20D296E5 for ; Thu, 21 Sep 2017 22:56:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751728AbdIUW4j (ORCPT ); Thu, 21 Sep 2017 18:56:39 -0400 Received: from mail-cys01nam02on0073.outbound.protection.outlook.com ([104.47.37.73]:11040 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751923AbdIUW4g (ORCPT ); Thu, 21 Sep 2017 18:56:36 -0400 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=et4I58GiumYdQba7btkBD47GDTB8YtoJ6UCVc+iJdFo=; b=hKw6LuA8kYEqj83P2WoXsHiHD+Nyz1JH7UqeyeOTXmoeuIHCWx6dw+sWSN/bx5+QCSl1Buu+aG+heF4zjkatl1pEanSEHnQB8kxcZObh7bOwmR4EmlP0ATfUdYBimBhvV/DkEkOfG8osV/eu/lEmBM2ODNa+lCTCH3z6uf8VbsA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=bryantan@vmware.com; Received: from bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com (208.91.1.34) by CO2PR05MB2776.namprd05.prod.outlook.com (10.166.200.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.5; Thu, 21 Sep 2017 22:56:33 +0000 Date: Thu, 21 Sep 2017 15:56:21 -0700 From: Bryan Tan To: linux-rdma@vger.kernel.org Cc: Bryan Tan , Adit Ranadive , Aditya Sarwade , Jorgen Hansen Subject: [PATCH for-rc] RDMA/vmw_pvrdma: Fix reporting correct opcodes for completion Message-ID: <20170921225608.GA31527@bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [208.91.1.34] X-ClientProxiedBy: CY4PR03CA0098.namprd03.prod.outlook.com (10.171.242.167) To CO2PR05MB2776.namprd05.prod.outlook.com (10.166.200.134) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c438d872-534c-4d97-b628-08d5014401ba X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CO2PR05MB2776; X-Microsoft-Exchange-Diagnostics: 1; CO2PR05MB2776; 3:fOJQZv5Bf9JAVu+Z4PHfiZBDWSothdSJ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8/fQE6ZkL604ETLsZPyNoGfg2c3Ppjfrwa02iAe5q5ONHcvhytPNLvuMKdze3d6NGABekM7rU6a/CwNPZtwJc0DfLL/uuHPnv6qKgPNP95+GcWva2aQi+m8joeLJl3+P4Qq3fCWg+bl+yZ5xL5WzVNQF068+L2zfY/QJkOrSCCOr6wcqH2heqR6uXlv4ihdYHnGjeHicLyAZOmOne6KULZdhXh9Vr33+oVn1riXrG2UPIXql1iZ9DdhFIXrAnPKE7YeWh5QRe++jJBNrKVU6MQm3TaG/nqFMik0K8SOhbrGG; 4:XruUWI0MU+E/meP6UPvCsqPHKrLdba6gRI8JAE6HsWaPRubZOqCYGOgarCFwZEONiKzzIKVrXxJGyonyUjYzMjZkvuVT6GlZeYwSvoi9zTnkBC0Qdwct07r6hYnHXzu7kr1Bexq/wRgme+T0pcy0njppWfXX5ICU9wxd3LUhvOOIbCf3bIFCw/nYvX1YvozvjbMT+Y14HVtsn1USfQNQHg7sf271EVqhFhWHDxGqYbBwJBoGJJi7bpTaaMXQKDERP5tR8nhWHrNW+ZDuiKt4gBpI36OxOA6thM62SePAWUZBHHwh6uDM62e15znjgQvt0q9fzsbYj1v3GSqmmpohRw== X-Exchange-Antispam-Report-Test: UriScan:(61668805478150)(211171220733660); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR05MB2776; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR05MB2776; X-Forefront-PRVS: 04371797A5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(199003)(189002)(86362001)(1076002)(575784001)(23726003)(68736007)(6116002)(2361001)(16586007)(3846002)(2351001)(478600001)(8676002)(81156014)(54906003)(58126008)(97736004)(50466002)(8936002)(316002)(81166006)(83506001)(25786009)(16526017)(55016002)(6916009)(53936002)(305945005)(2906002)(7736002)(5660300001)(4326008)(47776003)(50986999)(66066001)(105586002)(6666003)(33656002)(106356001)(107886003)(54356999)(101416001)(189998001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR05MB2776; H:bryantan-devbox.prom.eng.vmware.com.prom.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; CO2PR05MB2776; 23:VkN9eFWg3xDl2RTO2xiUN4OB40PFaX7QWfWmd7Jhr?= =?us-ascii?Q?SAOhH3I71OqrGdOzhm7iI8kZEfUV2XcqmwBPLvAE0zWVyplIBUGQmoi3ZWet?= =?us-ascii?Q?dFoST0dm9+HhHi4OSP9YyMPYvvIiY+efp+mBUGu86Kmzl/ld6M2FN5+UAcxf?= =?us-ascii?Q?XCspeLpJRNKmNEoYjQydx/I6eRvNnD2Mf7NSzXEg2RHorsZMaDhVTbJk5naT?= =?us-ascii?Q?SagrUOJGSDuRyfY9a/wVPKcY7gExvlxZFr3nQwAVfh/YFc3uC40ZM6EwjQe9?= =?us-ascii?Q?ReTxP+t9a9uBSVH/lLIyMKU+tmTSGe8I4ZqMr01dBHId5stdHm9nFKUjSHSy?= =?us-ascii?Q?HTSHrxJr9JRttToVQbsstop+W4VDsvUVOrmPL4VranK/hIOj1QILOBkS9wbK?= =?us-ascii?Q?qjkwM6vzhbDLv/SCBV1D8U61yBXfSaTuNGJADTiaZWVlP65FS7tZnT3loaYv?= =?us-ascii?Q?L06r3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P1PBvhOdRdJ3hduVedJc0kt91xR1ABHFWDflJ2rMKDgLLCgR5WUGeSCQjjQI0XiwT9vFe+AZo1uDgvWH7hh9LoIUOur1RqPbZ8qpL+7VmCmbkklNXzaGeut8vnm7l4NpMiYlA4/3Mppqg==; 5:Vtq3GRNYIDX+1L/r4g59WfuyJaa8aRwK0aijr70q6ERo6hciJH48QFDhA0T+wx8PBlzyxvRSjLPFIZdkl86gR+6kSshA+nwUyokOi8R5nKRlXkD0h3NphXAvAo1CFDXVjWnXrEB9YZGZndsUbdB0LA==; 24:xAblRmV9bkNQTu4Vl0dIqvZTW5dTzPyvZHnqt64BOPgRBIZ9KGpek8GmobFhkwoWzeT196U/OV5T9TUYS8+qE/c+U7fN/OW8cs8QrPU5wBs=; 7:5os1d4iO7zorWzeJJiJVJ4j4B2btLanf7A3MIFO0lEk8IGMs1JMSm9R3b2STM4Q5rcMDBydvw1hrzWTVhVXxJmn5Y7MNBbHa7sxnJiDshjTUtHz0aPdWj1bfgKNroSEvu1NHAcGby5tGaxOPWskXGCcT1gnLGV4coSi6xcujnWExX9tbD6Y/aDj+HU5o1RBghJU0aKWy+oGfYqlua78p91BIXzC5uWD+VHxrVCRRbtY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO2PR05MB2776; 20:hb03nw9XkYLWFwdLaSK7BMH4KHF96BnLum+sEvqszkvEYVzphe0/5L8dNxdiG/huD35CtOvlWahB/ix04H139cSKVwNtw4xb4r2iAwTYJPTu3v0YkDm1NsTJjGbH4Ghq6dZ0DRO6eRHFLTaGoSxw7C6+YXcCD4hFmQ9hfNlLSQ0= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2017 22:56:33.3241 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR05MB2776 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: Adit Ranadive Since the IB_WC_BIND_MW opcode has been dropped, set the correct IB WC opcode explicitly. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Reviewed-by: Aditya Sarwade Reviewed-by: Jorgen Hansen Signed-off-by: Adit Ranadive Signed-off-by: Bryan Tan --- drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h b/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h index 663a0c3..984aa34 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h @@ -416,9 +416,34 @@ static inline enum ib_wc_status pvrdma_wc_status_to_ib( return (enum ib_wc_status)status; } -static inline int pvrdma_wc_opcode_to_ib(int opcode) -{ - return opcode; +static inline int pvrdma_wc_opcode_to_ib(unsigned int opcode) +{ + switch (opcode) { + case PVRDMA_WC_SEND: + return IB_WC_SEND; + case PVRDMA_WC_RDMA_WRITE: + return IB_WC_RDMA_WRITE; + case PVRDMA_WC_RDMA_READ: + return IB_WC_RDMA_READ; + case PVRDMA_WC_COMP_SWAP: + return IB_WC_COMP_SWAP; + case PVRDMA_WC_FETCH_ADD: + return IB_WC_FETCH_ADD; + case PVRDMA_WC_LOCAL_INV: + return IB_WC_LOCAL_INV; + case PVRDMA_WC_FAST_REG_MR: + return IB_WC_REG_MR; + case PVRDMA_WC_MASKED_COMP_SWAP: + return IB_WC_MASKED_COMP_SWAP; + case PVRDMA_WC_MASKED_FETCH_ADD: + return IB_WC_MASKED_FETCH_ADD; + case PVRDMA_WC_RECV: + return IB_WC_RECV; + case PVRDMA_WC_RECV_RDMA_WITH_IMM: + return IB_WC_RECV_RDMA_WITH_IMM; + default: + return IB_WC_SEND; + } } static inline int pvrdma_wc_flags_to_ib(int flags)