From patchwork Mon Jan 7 18:53:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adit Ranadive X-Patchwork-Id: 10751085 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94A9C6C5 for ; Mon, 7 Jan 2019 18:53:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81E45289AF for ; Mon, 7 Jan 2019 18:53:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 737C5289B1; Mon, 7 Jan 2019 18:53:35 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 F11FA289AF for ; Mon, 7 Jan 2019 18:53:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727317AbfAGSxe (ORCPT ); Mon, 7 Jan 2019 13:53:34 -0500 Received: from mail-eopbgr690069.outbound.protection.outlook.com ([40.107.69.69]:20064 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726602AbfAGSxe (ORCPT ); Mon, 7 Jan 2019 13:53:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q0Qyf4imPAeK52sUFP8WWisL0K4VURE9s+gdWIebtRg=; b=Yqpw4srvGMLSXV57GFNoLs0dFxV1OkGimW/FtR1xSx4/+tl1T55O/8JO+ukGjzmTvG1IMgvJbyuWLk4USb9zvhEaewyJ/U+213yi7hQ/trAIJWxFTt5I0SfENoNpBoliEkVDTWvm4z9tvURAiB+KouokqHy8ZLBSwbRYvlT4u/Y= Received: from MWHPR05MB3648.namprd05.prod.outlook.com (10.174.251.22) by MWHPR05MB3631.namprd05.prod.outlook.com (10.174.251.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.4; Mon, 7 Jan 2019 18:53:24 +0000 Received: from MWHPR05MB3648.namprd05.prod.outlook.com ([fe80::2077:8b33:a166:25be]) by MWHPR05MB3648.namprd05.prod.outlook.com ([fe80::2077:8b33:a166:25be%2]) with mapi id 15.20.1516.010; Mon, 7 Jan 2019 18:53:24 +0000 From: Adit Ranadive To: "jgg@mellanox.com" , "dledford@redhat.com" CC: Adit Ranadive , "linux-rdma@vger.kernel.org" , Pv-drivers , "stable@vger.kernel.org" Subject: [PATCH for-rc] RDMA/vmw_pvrdma: Return the correct opcode when creating WR Thread-Topic: [PATCH for-rc] RDMA/vmw_pvrdma: Return the correct opcode when creating WR Thread-Index: AQHUprpEM1rwo1luj0eHCh2T5Z002A== Date: Mon, 7 Jan 2019 18:53:24 +0000 Message-ID: <1546887183-1238-1-git-send-email-aditr@vmware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR04CA0001.namprd04.prod.outlook.com (2603:10b6:a03:40::14) To MWHPR05MB3648.namprd05.prod.outlook.com (2603:10b6:301:46::22) x-mailer: git-send-email 1.8.3.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=aditr@vmware.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [66.170.99.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR05MB3631;20:0hhSrOyS0DnahvId13/RpcVPDylgUkQEQUblEh9/zU3dAyKJT1ifM++YeVAoQj1TEROuQh+RLIQl0XjXKirMwW5DurmkdeKsmWobcFeZ99xNrd4/bj+625sIaCcH53BYY4IlUrJMAdWzZoWebsLqvmVVIhWEuUR5OfKEsfaMNLk= x-ms-office365-filtering-correlation-id: 2c97d15d-cd8f-444b-2a26-08d674d1671d x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020);SRVR:MWHPR05MB3631; x-ms-traffictypediagnostic: MWHPR05MB3631: x-ld-processed: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(8220060)(2401047)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231475)(944501520)(52105112)(6041310)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:MWHPR05MB3631;BCL:0;PCL:0;RULEID:;SRVR:MWHPR05MB3631; x-forefront-prvs: 0910AAF391 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(366004)(136003)(346002)(39860400002)(376002)(189003)(199004)(4326008)(6486002)(71200400001)(6436002)(71190400001)(476003)(486006)(99286004)(2616005)(6512007)(97736004)(25786009)(4720700003)(53936002)(478600001)(14444005)(2501003)(14454004)(256004)(68736007)(386003)(6506007)(102836004)(52116002)(50226002)(8936002)(36756003)(81166006)(81156014)(3846002)(6116002)(8676002)(106356001)(105586002)(316002)(7736002)(2906002)(66066001)(110136005)(5660300001)(54906003)(186003)(86362001)(305945005)(26005);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR05MB3631;H:MWHPR05MB3648.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: umUhOWDtLtY18hkyHSYeuhFCmmw6RZ+YJbG4o7yfUwdQROH05NQm/nSlJ+/wOTY6U2612e+HvOiYBI0eCB/mNXtZhRn6EP32oYtIzCXf/PNWBfm/R+VtrML+wbO8kphaQtaf1nymqkt7owCsmAFv8Mk+OkOqY5fB6RKNXZ4zIMJ5hzBCBfm7G3TRwOyZbWy2i7xmmir5lL/sJo7u+PSSdyUki+h2Z+FfVErbniz5vOrvNdouBoljv4GuXqBbl7OE+DZvbU4RpMJHtVcQY6s79j2jt/EbJ7MXBE84dne88azkxOOEqbH2YcF3dX5iG4H0 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c97d15d-cd8f-444b-2a26-08d674d1671d X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jan 2019 18:53:24.9157 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR05MB3631 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_WR_REG_MR opcode value changed, set some of the PVRDMA device opcodes explicitly. Reported-by: Ruishuang Wang Fixes: 9a59739bd01f ("IB/rxe: Revise the ib_wr_opcode enum") Cc: stable@vger.kernel.org Reviewed-by: Bryan Tan Reviewed-by: Ruishuang Wang Reviewed-by: Vishnu Dasa Signed-off-by: Adit Ranadive --- drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h b/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h index 42b8685c997e..c2ed09e66d2b 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma.h @@ -427,7 +427,26 @@ static inline enum ib_qp_state pvrdma_qp_state_to_ib(enum pvrdma_qp_state state) static inline enum pvrdma_wr_opcode ib_wr_opcode_to_pvrdma(enum ib_wr_opcode op) { - return (enum pvrdma_wr_opcode)op; + switch (op) { + case IB_WR_LSO: + return PVRDMA_WR_LSO; + case IB_WR_SEND_WITH_INV: + return PVRDMA_WR_SEND_WITH_INV; + case IB_WR_RDMA_READ_WITH_INV: + return PVRDMA_WR_RDMA_READ_WITH_INV; + case IB_WR_LOCAL_INV: + return PVRDMA_WR_LOCAL_INV; + case IB_WR_REG_MR: + return PVRDMA_WR_FAST_REG_MR; + case IB_WR_MASKED_ATOMIC_CMP_AND_SWP: + return PVRDMA_WR_MASKED_ATOMIC_CMP_AND_SWP; + case IB_WR_MASKED_ATOMIC_FETCH_AND_ADD: + return PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD; + case IB_WR_REG_SIG_MR: + return PVRDMA_WR_REG_SIG_MR; + default: + return (enum pvrdma_wr_opcode)op; + } } static inline enum ib_wc_status pvrdma_wc_status_to_ib(