Message ID | 1520239811-10934-6-git-send-email-Michal.Kalderon@cavium.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show
Return-Path: <linux-rdma-owner@kernel.org> 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 6A9316037E for <patchwork-linux-rdma@patchwork.kernel.org>; Mon, 5 Mar 2018 08:51:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59F902899D for <patchwork-linux-rdma@patchwork.kernel.org>; Mon, 5 Mar 2018 08:51:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EBB9289A5; Mon, 5 Mar 2018 08:51:56 +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 C06522899D for <patchwork-linux-rdma@patchwork.kernel.org>; Mon, 5 Mar 2018 08:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932979AbeCEIvy (ORCPT <rfc822;patchwork-linux-rdma@patchwork.kernel.org>); Mon, 5 Mar 2018 03:51:54 -0500 Received: from mail-sn1nam02on0067.outbound.protection.outlook.com ([104.47.36.67]:52144 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932872AbeCEIvx (ORCPT <rfc822;linux-rdma@vger.kernel.org>); Mon, 5 Mar 2018 03:51:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=n2q++6dOggZjlRmsWnbq3DYZkrpwfy7CEDtO6+dO4LQ=; b=HFHBocpnyDwoILurT/N+hf4QR/ofZAVd2USAmEYDGyuckLAXOnPNDRpZjp27X2/bqq21QAUCQdFxXwWRdXeA6tgSuhO7QHb/f9SNh2nbO8Zi9vuhFOrKBh19VZ920pcUBIx0ybukcxgPJd+bH+g9ytPsrmHhZtzwXsCNcWNyMnQ= Received: from CO2PR07CA0057.namprd07.prod.outlook.com (2603:10b6:100::25) by BLUPR0701MB2081.namprd07.prod.outlook.com (2a01:111:e400:52f4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.548.13; Mon, 5 Mar 2018 08:51:51 +0000 Received: from BN1BFFO11FD002.protection.gbl (2a01:111:f400:7c10::1:173) by CO2PR07CA0057.outlook.office365.com (2603:10b6:100::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.548.13 via Frontend Transport; Mon, 5 Mar 2018 08:51:51 +0000 Authentication-Results: spf=fail (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: Fail (protection.outlook.com: domain of cavium.com does not designate 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1BFFO11FD002.mail.protection.outlook.com (10.58.144.65) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.527.18 via Frontend Transport; Mon, 5 Mar 2018 08:51:50 +0000 Received: from lb-tlvb-michal.il.qlogic.com.com (10.185.6.89) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Mon, 5 Mar 2018 00:51:47 -0800 From: Michal Kalderon <Michal.Kalderon@cavium.com> To: <michal.kalderon@cavium.com>, <dledford@redhat.com>, <jgg@mellanox.com> CC: <linux-rdma@vger.kernel.org>, Michal Kalderon <Michal.Kalderon@cavium.com>, Ariel Elior <Ariel.Elior@cavium.com> Subject: [PATCH for-rc 5/5] RDMA/qedr: Fix iWARP write and send with immediate Date: Mon, 5 Mar 2018 10:50:11 +0200 Message-ID: <1520239811-10934-6-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1520239811-10934-1-git-send-email-Michal.Kalderon@cavium.com> References: <1520239811-10934-1-git-send-email-Michal.Kalderon@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(376002)(346002)(396003)(39850400004)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(106466001)(86362001)(107886003)(51416003)(478600001)(104016004)(72206003)(85426001)(105606002)(316002)(36756003)(305945005)(76176011)(5660300001)(2201001)(6666003)(2950100002)(110136005)(16586007)(54906003)(47776003)(81156014)(81166006)(50466002)(26005)(69596002)(356003)(8676002)(186003)(77096007)(2906002)(50226002)(8936002)(48376002)(336012)(4326008)(14773001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB2081; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Fail; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD002; 1:+6OiZgMjjEcB8tiJ3sZGuhst2sS3js+8WlTwR644IpYdO1qAFGt/aEENJzQJ/4ot2pMUy4IsD6YSSE+DkrCpNW+QfUxB7gyiV3twVc5v2jQ/FoAKdBRLFvf5a4xzmvmT X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 939b864f-0b2e-448d-b4fa-08d582765697 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060); SRVR:BLUPR0701MB2081; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB2081; 3:+bnSHQNvzQVeIjw5RvSzstcC0AxMMNjP9s9WGz17pt94srE/X7KbWtGV4DyAuIS4tP2sCtsR5FRLRrP+ABQFrc/2w965XS7sQOByc0upzkIrMFjdwj1ZwJLjRHehmNbZXkIBBnmNTQPEzxHWbpF7AuTLVbX2Z+STIVunnbqvaNbuf9vyNtGmdSmSchF/5VkewIURuqW+DR05JsYZfoU+AOc4TBrzBGotRBxze+mJmEZ7jfCHK2E86XgGJ0hsZLs31kcQNhmFgLc8CGJq74ApCZjg12TH0ZeSBJ9gErg1Rvtw9ZExnhO+KZl4E6nHHXgC1mPhAmQi2oE8n/A7L3OlW36Idxc1Oyh5Qgj7hN1Htu4=; 25:ENsZV3IC2xivDOtBFITUeXdxTspFPOblV19cFUziYhxED8RNQALduZ4royFwV+jhENPkolY3cI2pir/ellGeZLWBebr0nsTVnAbpUtwqk2v8Mq7RDzKo9a+Xy33h1aIhW+u6KB7N/QzNZmDFLdW4nkIMeeJj+HMYUYv9ZNZWmWCPEqJ1mob62c0Er/EzQfJ/8M8Y0NrxjcEaP1a/sKp/UVyL4mS6cUV42nrn7dy5SZG4mFf390H6KnFge31mMsYmfW6lIOyupK5qb02DKdkO1RJqj12ZHLAFJr7Pd3Cac5jIjljLBkxzYtkvkz4r8XyC8KCy2/tz8QGw85epI/F5YA== X-MS-TrafficTypeDiagnostic: BLUPR0701MB2081: X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB2081; 31:SCUxk0RLo/BFN27Fv7MF8DUhHNZ6HhuQ9Rp+Xv2L+kZEaoBuMChZ+BChr1ZeMygeWV6t3HGUiGYkpJLJBRyh5B+bK6tEHJwmpSOrofynFjNuiqa9RNghNPVTxuqBZN1MMCMYgIm3zaLTnZ8oH7oV9w5l38XlOjKbEKjmQ5Nx2jKyvyRnlTLZ0mSYnxGkUPmMvfmskPkMRkkQaAnGxtAr3CTAXANExpy85rXQiXuustY=; 20:qWHelMZku4/dcBESregs8DB8vx+I1JRlljpaeHjkBL7xe+5c1q93M7LYvrLY0ECkxT6QLvSNP8gbCxBx1srqwJP/Ov57xA7u3Do4cgxOMThQSM/6bPzjt7i16b9Jzodf3vQr1bFnWwkTIEgms2Omu39OOIC8PANFutvzumBv49OZEFwz12D6AEwL11brmdhNKlaz6/f0RPEMMkEKA5ltx2bRA6fQYarV1rQo8aJk9GrrL0D74CMFVHUGLgddBXupLzFegCosHnF+9h6z7owr4PBuR+OWFMHUaEP0jTJtn6Qih9KdEEd7eAzEiYtzmbkVU5KspSwuMWUc6aQUJ3NznRvuwb5GI9akzJ19fwxk5nbMDmSsnAAotBBAzz3q9dw8GIPCKFB95CNTDyeSVWSPexgKBXVd6fS8a0PkS/qsfQz0A0rXt5RO/vWwz4sMnP/WovV8obGKCNnFzxyoy8Zr1XvZNFSan1P2ObB2Mj71uZA9vXTMmpftdaV0VTzKsqJ1 X-Microsoft-Antispam-PRVS: <BLUPR0701MB2081A7E0037F5505D70011BB88DA0@BLUPR0701MB2081.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231220)(944501244)(52105095)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:BLUPR0701MB2081; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB2081; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB2081; 4:SXdiGHs4gcqh9BSuPVNIfSQnpP8ou5su9YM085qCFWTgy/paBIqfZunVGtc0Dkik2lwvby2TQ8KIi2yqKhMet5o2tWL2lpxuWhFHxJsPrlPBF7/dpgMFednQbqKCfOHpEKINXT1Ym2NzefvSjKh4eGZWLNUCQKSU7yGiFe7t+ZU5jtkmzwnMikWJPRO6crsa0PTO2wxw7gvDi2swIC0i5BtJYABcfax7X7W+NUD3JM22aMLXJvocVYw2jfH8ouPILLhCyb9ml8twAjqoyQo05g== X-Forefront-PRVS: 06022AA85F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB2081; 23:W/WfCD5T/SjjOktXR8zjYpaBKkcW0uS/bmHYiuB?= =?us-ascii?Q?8g8VJkzOghJjQ4szUSMVPODu3gxaf/ftcVa8Mj5qfLv8fB0cR3HE3Vz04wef?= =?us-ascii?Q?PxKwYy7rmhk0SkSALAnl4G5K16GTBxEEDVBez0s7G/0fhvHC/jlW35LR1oDf?= =?us-ascii?Q?GM93UrwzqVlLfnDYqrtFGniUVXkP8dNl+w7VZKo3UtZhbOog4KYAzg6eiV4g?= =?us-ascii?Q?vBS5INHGOvlAbS9mf/evUMzK/P4iZMD0lWIsvar8SXC2+XN64/3rhHCknkI0?= =?us-ascii?Q?zxklKSCQh3QJ6L9rivNnXGJiwDRVyOxlHoNZ766mJ1zZbxNsgqje7ODGhAW4?= =?us-ascii?Q?48AcrlEfty63+gACqd4pGKHRdP+60rCKDrK4NDdq4Tg2cMC6jKWQCAneOF0J?= =?us-ascii?Q?i2Id7q+cV67BTD0M49g7Y87M7KzsK3GiYYOk5/EmEMweTuhqg0XY3jNMHN9J?= =?us-ascii?Q?Co9/GLuV4GD8TTK9O4WASs1aFwpsCdpayyy5amfDZuTer8Lf70LdI7oQw/HC?= =?us-ascii?Q?FdXQP3u69A0RzGSHYFZMWbfYdX2B7E7d7Tcr8QmI8gCvDgL+IHd2h1y2r22g?= =?us-ascii?Q?yQOMdcgao9Am4no8hB42XZWfSWa7udx3O0euqi3uWtjN/T8dQW7PbF7ZNCx9?= =?us-ascii?Q?COpRwD0YUqp7wizUHNN2Z9ZG94q9obRhH967jfvr8ZSkpfx75UngaYItahi6?= =?us-ascii?Q?i7cw+HcblWMhRSOKnGDRziJH0m3afKopK3fpo0ehc/qtMseDQXbWr3bqmMcp?= =?us-ascii?Q?vLGcEdFBrXAJdxF8IBXYTcR8mGinlJzWsFn3mNeiLesX0l2Riitslvkd28De?= =?us-ascii?Q?ucnVawRpGXelntY7Ye2QOwWDF7ZBAIevOUYJFKuo1hJxFiQqS9uRFvJmMQOm?= =?us-ascii?Q?P+WIXFo1ELZnn/hQgYykwERAh12r20euSPgBW0WSA5kNW2tAyt0/ng2S6SpW?= =?us-ascii?Q?+3bpBjY4DdOkmFPP/RVc1h690D9dBH994FvI++aaNXYYmchNgFgZSNeKN5ri?= =?us-ascii?Q?AsuqDxG7055E/zDU1/BksMQVJ7M3qCZwkCjY/hVTypuIoTBFw3c/cWSqKHlk?= =?us-ascii?Q?y9ou/mrt6ziDRRo8wZt3C8EtE1mwcUXQBKybxtlLypytbyCEhkWd84rmsbAD?= =?us-ascii?Q?XS/IN7S/6XBg=3D?= X-Microsoft-Antispam-Message-Info: KSSCwDEhKikJIZS2aEo/1bdBAlWnHHTZ3akwQQDPkCN6Col5zvhnwhpisiv4qGc6RtbmokCeRQIjjTwOpeY2r0Q3AkT3E5nK+o+ycklRx1GANKVxO9nH3RbyPRofNOCffhTH/mriGuPr3ZY/xKDRKid3MiSXhxntllwtiSWU709r/lz9j7NPbRkPPfukvK+g X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB2081; 6:LyZf9xIIB3hfEA+VAYpWt/MMKmqngJidy3w9TJLbeuYMzfGoX5t/i8WLX1d+XiSrW5h/9huBJgI1qEfLn2uxmS1qukzX3n1LMDUfkw6DqM5fk+E1gxr2zJUzGx3VDkE539m7HAmzl6en0M5x6+jccI4pVvoXQCixY3ZLfmExwW4iXkjELotKANzYkNRnaAxTjYtua6rHJVWh6lMOrlWWxzLn9e/zuLHvEfxLMulo1DIokuQL2MZlvGwG52h1x6f8k1nA0GqrY2ve2uZEDM5NkJh7ivwS3SDvs4zpR7AeRdnCyc+WCKgSYXc6v3CQ1rzjkuOYndVbK20rlsWgZ4MoXMYuxnShBGjk2fVKbVo2EhQ=; 5:FhgGATAWJXrFe7kes5DeQZvPq+T1yU5KPRaWeDcUmFJzbjxnopsYQcEIGEz5tkihnZFFBOn2SNjP4sUZ8MbYYHPpRLYhySn5ZHGrudrDCEIcMVvMaMFlrS3uDMCJ1ROZtsFnHxrmcK93t09cGVw4f8PPZrnEmZCZU9A86sfc6QY=; 24:ZF8xGITBKbehxyPMrF1t+jwZRTLS7LLvuYKG6a33MwsNjtWNkBCacCXv/xqCC9CYUmcSnL8WTuLAgu6uyXr7bt82NSxKV4e3JuQL7EAAYXg=; 7:c6rUu9ewzBrNQ6THx9E+wmgSqlo7G4NcngaB8toULRn7C9e0gMFNMZd9lKdsaEn2L4ejQcOFd/ACfaWc4IO+hjD2oaaoGkd56tuBQeE9M7VCZITyIJugA3X8Ib8I4GoL//px0XsSKhJEB/kyxsFEAP1aKvAg7Pag1lGsP21PCEennvQBEJLWZG+wvtcCTVbe8OOh70eBG1ABCSdwRCN40tFNUpADg8EaDs3oXsCsh6IUM8CpG07L/bbksHDntpkN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2018 08:51:50.8335 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 939b864f-0b2e-448d-b4fa-08d582765697 X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB2081 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: <linux-rdma.vger.kernel.org> X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index 102b9e0..875b172 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -3034,6 +3034,11 @@ static int __qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, switch (wr->opcode) { case IB_WR_SEND_WITH_IMM: + if (unlikely(rdma_protocol_iwarp(&dev->ibdev, 1))) { + rc = -EINVAL; + *bad_wr = wr; + break; + } wqe->req_type = RDMA_SQ_REQ_TYPE_SEND_WITH_IMM; swqe = (struct rdma_sq_send_wqe_1st *)wqe; swqe->wqe_size = 2; @@ -3075,6 +3080,11 @@ static int __qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, break; case IB_WR_RDMA_WRITE_WITH_IMM: + if (unlikely(rdma_protocol_iwarp(&dev->ibdev, 1))) { + rc = -EINVAL; + *bad_wr = wr; + break; + } wqe->req_type = RDMA_SQ_REQ_TYPE_RDMA_WR_WITH_IMM; rwqe = (struct rdma_sq_rdma_wqe_1st *)wqe;