From patchwork Thu Feb 4 22:58:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 8228981 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CBDD3BEEE5 for ; Thu, 4 Feb 2016 22:58:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF7822039C for ; Thu, 4 Feb 2016 22:58:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA0B02021A for ; Thu, 4 Feb 2016 22:58:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934300AbcBDW6X (ORCPT ); Thu, 4 Feb 2016 17:58:23 -0500 Received: from mail-bn1bon0054.outbound.protection.outlook.com ([157.56.111.54]:31168 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934264AbcBDW6S (ORCPT ); Thu, 4 Feb 2016 17:58:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=x/Gr6i/SwLBKhs5ueMEX13jVR3//GMcXRjnrdhM6ZuY=; b=qBU+WwHMO8YcfBBd5ZH9s+TLFRK7UQzCPh2SqPFNM/WDrX2UIsQsmxP5tEtMBFgnUD5nLc4QaxcmhNGu9H4GtWDFqlPYBxin13bhKYDLHidGe5bImKUq1uigPbtcxybPdqACEeHWxGc6nan9cAkKI38JmBCBlNekOqWV7oHtfeY= Received: from BN1PR02CA0025.namprd02.prod.outlook.com (10.141.56.25) by BL2PR02MB291.namprd02.prod.outlook.com (10.141.90.148) with Microsoft SMTP Server (TLS) id 15.1.390.13; Thu, 4 Feb 2016 22:58:16 +0000 Received: from BY2FFO11FD032.protection.gbl (2a01:111:f400:7c0c::125) by BN1PR02CA0025.outlook.office365.com (2a01:111:e400:2a::25) with Microsoft SMTP Server (TLS) id 15.1.403.16 via Frontend Transport; Thu, 4 Feb 2016 22:58:15 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.174) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.174 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.174; helo=milsmgep12.sandisk.com; Received: from milsmgep12.sandisk.com (63.163.107.174) by BY2FFO11FD032.mail.protection.outlook.com (10.1.14.210) with Microsoft SMTP Server id 15.1.409.7 via Frontend Transport; Thu, 4 Feb 2016 22:58:15 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by (Symantec Messaging Gateway) with SMTP id 11.58.03533.687D3B65; Thu, 4 Feb 2016 14:58:14 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.248.2; Thu, 4 Feb 2016 14:58:14 -0800 X-AuditID: ac160a69-bb3ff70000000dcd-75-56b3d786743a Received: from [10.60.52.49] ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id C8.5E.03361.687D3B65; Thu, 4 Feb 2016 14:58:14 -0800 (PST) Subject: [PATCH v3 18/21] IB/srpt: Fix srpt_write_pending() To: Doug Ledford References: <56B3D453.7030409@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , "Alex Estrin" , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <56B3D786.1050707@sandisk.com> Date: Thu, 4 Feb 2016 14:58:14 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56B3D453.7030409@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRmVeSWpSXmKPExsWyRoxnkW7b9c1hBnve2FhcePqdyeLl+Q+s FitXH2WyeHaol8XiRtsDNgdWj8V7XjJ57L7ZwObxbPphJo/3+66yeXzeJBfAGsVlk5Kak1mW WqRvl8CVsWfaa6aCb/wV718FNzCu4+1i5OSQEDCRuP/oFUsXIxeHkMAmRon+V8cYQRJCAtsZ JU7MqIUpen36JRtE0RxGifMP/gB1cHAIC1hL3HvCBFIjIqAmsenVInaIXi2JqetmsoPUMwus YpTYdPU6WIJNwEji2/uZLCA2L1DR4e7tbCBzWARUJPqfpYGERQUiJA53drFDlAhKnJz5BKyc U0BbYuWtRWBrmQU0Jdbv0gcJMwvIS2x/O4cZZJWEwF5WiQ3N+5ggblCXOLlkPtMERuFZSEbN QmifhaR9ASPzKkax3Myc4tz01AJDI73ixLyUzOJsveT83E2M4LjgytzBuGKS+SFGAQ5GJR7e jNWbw4RYE8uKK3MPMUpwMCuJ8H6+ChTiTUmsrEotyo8vKs1JLT7EKM3BoiTOa92iFiYkkJ5Y kpqdmlqQWgSTZeLglGpgDOzO4P0wSVPwBd/2j/W1/0Wilu/RVtgSPNlzVc7Ms+Gsmk/3PGyR 43oR2vVt3+3DDqesCjVv5X5vXX5awfnM/LvGDpZvjYIfOIr//XnIdrLJvVfKzNlx6k0lnMGK Hd4VKcFb0p8yijH4zqyJ4fW9Gv+PWa3mb1gMv13xB83GzGVLF/9WMVuixFKckWioxVxUnAgA fUvRi4cCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDJMWRmVeSWpSXmKPExsXCtZEjRbft+uYwg/uLNCwuPP3OZPHy/AdW i5WrjzJZPDvUy2Jxo+0BmwOrx+I9L5k8dt9sYPN4Nv0wk8f7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RY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(52314003)(189002)(199003)(586003)(2906002)(65806001)(47776003)(110136002)(4326007)(4001350100001)(5001960100002)(230700001)(87936001)(92566002)(1220700001)(1096002)(77096005)(2950100001)(5008740100001)(106466001)(19580395003)(19580405001)(80316001)(229853001)(11100500001)(23676002)(86362001)(64126003)(83506001)(59896002)(50466002)(189998001)(54356999)(76176999)(87266999)(50986999)(65816999)(36756003)(33656002); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR02MB291; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2PR02MB291; 2:ngsqajgEix7cnZUEratwjk96MmiGPgcsaocnCFbilLSL1czu9ThBYUzLs+4D1XpQhAPAwqOqx1/7zqgm6y66+S8xaX23qYQRbcI8gbAsCOXFELoXo/fjPCRcR8UGWadzcb05l5+7NVMGgNh87MjTCA==; 3:+nICs52qeiV9UPbzoUbTxxXTl8Mxk6JoTgMynKcdYLSP+G9Z1XZxOF4BaJ80+X3o+m3XkjQqLiteJAdEGaLZ5ZR5dZjTHYb0p5rOFVfygl0lQYo/K8534WT2AqdOe8CLLfwpOfLyOQo+tpIC1VMxHGz8EYxpsXi3fMvJMUf/ccrJfUtYM6b+2qbr0pMkvqys45wDmlxRo/82nzh/oMKrXznHup/qc/1bkCWgjX3d6+/+fk/HowNj1Wu5IDahEN7N023nm3/IRYrH0TdnPXHDgQ==; 25:w50V2vGE5QfEtr8jGhz7BjMn6R/eSxCe4f/lV3U1PVn1Tw5DVQTJ74j3eMOVBoScXQISNNM4U2Ex+gRJaaT4Fk5pprGpIPIex8NJMRZ+DraNUfcmSTQ5HQY0RWkFc4ksV+IC8Myu5fIzGQJhUW29onILuPZ5gqWCLXV6dDA2ONGIozCkDBEUVZpXxgXPlz1+A9keEQMLBTIB8Ibx3a9LoSSK7LKwa64eUylZboAkYKswqtEcnTXsBUP0JfV8InyEW0XkHlq4GsIk4A5xWSlhGETJ8P63OXk8SYLY/pGN9VIX6iuomW6OW9HP+3SkAVgy X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:BL2PR02MB291; X-MS-Office365-Filtering-Correlation-Id: baefc2f2-f7d1-42c3-f0fd-08d32db6aa39 X-Microsoft-Exchange-Diagnostics: 1; BL2PR02MB291; 20:fE/xlPKcCMsspTpHbKjLFOOI4l7jQovwSs9NeMIRWXO8fRdPjqeyGyyyEveu6kWYr8zQXbuLb92NI8AlfBVEeYom7XRsdHEkPi3iuu7LklOGB2ktUPouYenVMIq5Jdc7muZ6zsewKs9UH47lVkMT0ln0cjDjAnakeJweeURcKvjxn4YG833caMr87SwWuVeiZIRuPX5+fNCo9OuzI1CGoZs0/CkRMhNig5lImOz1ArbRovkZWww/a/jGFiutmMapW51RwRMruCwVvV2p1Mrrvau+W5iwV4S1bZkkvAuulTcnIU771CW5b2qfqImLjgiNGnR4nWQkj2c65IQwMvvQlUa0UdrRTkdRrhA+vEKS181Q4gspQUPiOMm0f/GEFUtLSm3rOq2qiVH50BOk9SPefdbdiqBEO5pD0d2NuvVnJ9tEnwT5o262jBw4wlJOmAtI8iPJrW97QTF42mAuYGTDLVLodEpXv8AYgPP+snxmL9lhYcagNTYUnIy3eJ0mSg3x X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(34787635062028)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13018025)(13024025)(13023025)(13017025)(8121501046)(5005006)(10201501046)(3002001); SRVR:BL2PR02MB291; BCL:0; PCL:0; RULEID:; SRVR:BL2PR02MB291; X-Microsoft-Exchange-Diagnostics: 1; BL2PR02MB291; 4:Ka2LpzZDWnCtzH4jdBMU7qYTDJAoEot/YjeyOwxfOEv8hvxifH7MjTi8QYhMCuEt9CnG4bmNq/cqnLb62NLeXyTljcrUUR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MNVIxUEhSMHI3VzRseUtlM2k3WkxMNHJk?= =?utf-8?B?ZTg4eW1CNWtkSFhQRjl6dW5GenhucmxkNWF0dkxNUjRJdGdqY0tDb09RRXds?= =?utf-8?B?RHg5amZxcSs5WlFEaitVc2RUVHRyNU9jbFdJenJlYzk4THp3cVZZejE2eTll?= =?utf-8?B?TDh3PT0=?= X-Microsoft-Exchange-Diagnostics: 1; BL2PR02MB291; 5:Pp04Zmj2Qx1VbrCY87gCwDF2WK7/6BvmV5594NPTEfrikmurxFtUbq1ECZxTncaEjGSutqh0pzR/3QbWO8IiRidAxvsdedGAjnx0kIWx3ZmDGiLgDBsrdW1dq5hv3dFpTBF08M/BrdVXRb+jbSfBkQ==; 24:tVN+/DWN463QWp+lTAYttHF7SNK23lGS9TYUUQrvLryzZIfyTFbUuyUiJmoR8QoPnDGpYRioVgUD/DhoAxgxAypAyDlX8fNGdyO0Nhm0xGU=; 20:aL9wNB2Ei+9ogSAKNZGurLrQexmBi0kdVbaKyfxCqSglPV060L8sq181MjoCGGRgxtjKiYni2BzCRmIQ7L3E3DeD+ukG1JriiWNg2C0V6sngGEbEK0b1d9fZjyDnXIMhQsCZm11zHakWg420I2AwWdWAzmqkbyl8aXTTQLqlM0zwxO9n9IgCmOSEGZY1jEgQb88KhnDVyqW0MwkYUf9jFwyeGT0pgAVJ5k33ZwvDR0hFN2LPbvxqpn+xdP0uUeD7 SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Feb 2016 22:58:15.2281 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.174]; Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR02MB291 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The only allowed return values for the write_pending() callback function are 0, -EAGAIN and -ENOMEM. Since attempting to perform RDMA over a disconnecting channel will result in an IB error completion anyway, remove the code that checks the channel state from srpt_write_pending(). Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Cc: Alex Estrin --- drivers/infiniband/ulp/srpt/ib_srpt.c | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index ed1a261..0c88190 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -2486,39 +2486,14 @@ static int srpt_write_pending_status(struct se_cmd *se_cmd) */ static int srpt_write_pending(struct se_cmd *se_cmd) { - struct srpt_rdma_ch *ch; - struct srpt_send_ioctx *ioctx; + struct srpt_send_ioctx *ioctx = + container_of(se_cmd, struct srpt_send_ioctx, cmd); + struct srpt_rdma_ch *ch = ioctx->ch; enum srpt_command_state new_state; - int ret; - - ioctx = container_of(se_cmd, struct srpt_send_ioctx, cmd); new_state = srpt_set_cmd_state(ioctx, SRPT_STATE_NEED_DATA); WARN_ON(new_state == SRPT_STATE_DONE); - - ch = ioctx->ch; - BUG_ON(!ch); - - switch (ch->state) { - case CH_CONNECTING: - WARN(true, "unexpected channel state %d\n", ch->state); - ret = -EINVAL; - goto out; - case CH_LIVE: - break; - case CH_DISCONNECTING: - case CH_DRAINING: - case CH_DISCONNECTED: - pr_debug("cmd with tag %lld: channel disconnecting\n", - ioctx->cmd.tag); - srpt_set_cmd_state(ioctx, SRPT_STATE_DATA_IN); - ret = -EINVAL; - goto out; - } - ret = srpt_xfer_data(ch, ioctx); - -out: - return ret; + return srpt_xfer_data(ch, ioctx); } static u8 tcm_to_srp_tsk_mgmt_status(const int tcm_mgmt_status)