From patchwork Tue Jan 26 18:46:59 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: 8126451 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 5D5EABEEE5 for ; Tue, 26 Jan 2016 18:47:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 47B0D2027D for ; Tue, 26 Jan 2016 18:47:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3FFBF2021A for ; Tue, 26 Jan 2016 18:47:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751542AbcAZSrO (ORCPT ); Tue, 26 Jan 2016 13:47:14 -0500 Received: from mail-bn1on0069.outbound.protection.outlook.com ([157.56.110.69]:51965 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751527AbcAZSrF (ORCPT ); Tue, 26 Jan 2016 13:47:05 -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=7giq13+F5maqNFnTCxgBcJeWsX+zSYGGzxZV3NmBeRs=; b=nEtswMXIrpJ2iOO8JyZH4VH19A93Wm62V7k/wR+my/sBVcZ85tR80o2ewc+WAj30xi1XSw3JCmxqeaBIN9UfIk85UnNZGik3N5wnLIdM0XjX7T/Cyl8PaQnK0lHaMuDr4s82r9PtAbaiXs8gsAI40mcElvIBhUs3zKK+c633Luo= Received: from BY2PR02CA0062.namprd02.prod.outlook.com (10.141.216.52) by DM2PR0201MB0832.namprd02.prod.outlook.com (10.160.95.153) with Microsoft SMTP Server (TLS) id 15.1.390.13; Tue, 26 Jan 2016 18:47:02 +0000 Received: from BY2FFO11FD020.protection.gbl (2a01:111:f400:7c0c::141) by BY2PR02CA0062.outlook.office365.com (2a01:111:e400:2c40::52) with Microsoft SMTP Server (TLS) id 15.1.390.13 via Frontend Transport; Tue, 26 Jan 2016 18:47:02 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.174) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; 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 BY2FFO11FD020.mail.protection.outlook.com (10.1.14.137) with Microsoft SMTP Server id 15.1.355.15 via Frontend Transport; Tue, 26 Jan 2016 18:47:02 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by (Symantec Messaging Gateway) with SMTP id 5F.0B.25823.42FB7A65; Tue, 26 Jan 2016 10:47:00 -0800 (PST) Received: from milsmgip11.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; Tue, 26 Jan 2016 10:47:01 -0800 X-AuditID: ac160a69-647ff700000064df-69-56a7bf24b4e4 Received: from [10.50.231.72] ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 16.24.02700.42FB7A65; Tue, 26 Jan 2016 10:47:00 -0800 (PST) Subject: Re: [PATCH 06/15] IB/srpt: Simplify srpt_handle_tsk_mgmt() To: "Estrin, Alex" , Doug Ledford References: <568BD0FC.70207@sandisk.com> <568BD1D2.1030609@sandisk.com> <56A7ADA3.5080507@sandisk.com> CC: Christoph Hellwig , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <56A7BF23.1060306@sandisk.com> Date: Tue, 26 Jan 2016 10:46:59 -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: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDLMWRmVeSWpSXmKPExsWyRoxnka7K/uVhBitazS0uPP3OZPHy/AdW i5WrjzJZPDvUy+LA4rF4z0smj903G9g83u+7yubxeZNcAEsUl01Kak5mWWqRvl0CV8bPgw/Z C74KVTxtns7ewNjM38XIySEhYCIxse0+WxcjF4eQwCZGiQPPF7GAJIQEdjBKLOsxhSm6frkB Kj6XUeLuLiUQW1jAWWLbo2VMILaIgJ/EydYbUIP+MErMWrCMESTBLBAvse7TGzCbTcBI4tv7 mWCDeAW0JJ5MOM8OYrMIqEosnrCVFcQWFYiQONzZxQ5RIyhxcuYTsHpOgRCJn3tuA8U5gGZq SqzfpQ8xXl5i+9s5zCB7JQTWsUp8ur+BGeJQdYmTS+YzTWAUnoVk1CyE9llI2hcwMq9iFMvN zCnOTU8tMDTSK07MS8ksztZLzs/dxAiOA67MHYwrJpkfYhTgYFTi4RU4uixMiDWxrLgy9xCj BAezkgjv7/XLw4R4UxIrq1KL8uOLSnNSiw8xSnOwKInzWreohQkJpCeWpGanphakFsFkmTg4 pRoY66Y5lO1+9d9w+pObQoUaX4zSPPTzefvLxJJP7Lh+SXVN0HFNi+mtr5tOJsnzHslK+q82 hUmrvPnt7IkSOYo/pBeISMxN9l2yq/WO3cryVLV7999HWsm9ljni6rKJSeG7UEhL7gde9q0T m08Zaod3/cv916PdelJnVVVOwsm2ZdN/bnFmu3haiaU4I9FQi7moOBEAZidP2H8CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsXCtZEjRVdl//Iwg6sn1SwuPP3OZPHy/AdW i5WrjzJZPDvUy+LA4rF4z0smj903G9g83u+7yubxeZNcAEsUl01Kak5mWWqRvl0CV8bPgw/Z C74KVTxtns7ewNjM38XIySEhYCJx/XIDSxcjF4eQwGxGiZdXNrOBJIQFnCW2PVrGBGKLCPhJ nGy9wQZR9IdRYtaCZYxdjBwczALxEnc7wWrYBIwkvr2fyQJi8wpoSTyZcJ4dxGYRUJVYPGEr K4gtKhAhcbizix2iRlDi5MwnYPWcAiESP/fcBoszC6hL/Jl3iRnClpfY/nYO8wRGvllIWmYh KZuFpGwBI/MqRrHczJzi3PTMAkNDveLEvJTM4my95PzcTYzgcOSM3MH4dKL5IUYmDk6pBsYa X8XZb6SU3558+nqazNwfXytfnnfTern6u8TP5X+3mq/pb1hQfXGrFRdT47WIIx8uNza2/735 UEHL+teiYmnf/1FuE65cOV3glXen7cGmC9dUpLQ/WHxXuSXJ7LLmykXDNXuUQ5qf7I63rfnl 1BO063AP6+k0U9lv1+4c3/6Gp4QjXvyN9a49SizFGYmGWsxFxYkAGknBh/cBAAA= X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD020; 1:0JlR/9NFYJS0ocYpn8bX08SyYMrs8ygImj/t9v0SRsbAlV0/rRSzoJHNMuD+8327Z6shUu26gJ7U8ON4tmQYiobUflO9MW/RcFQYEcV9tToufw0YPpaFqnXDOk0AaGYB+zWR29TtrFWkzCzEAjmvcbRW7oryAPGIhLA1bc09mFcHsaRzdX1Z6/f7xLT0zDYTkbGdL1nc7sDraWZq3On2dGQ8rRgOJtyG9NDeYa1m/XwylVt930jD9HKtLCWlKeSoZldmuopgDiNmllguzNr4raKpSM+fw5MofUdqiQwlxloinm+5SjFZbxdx5Q0ko0DIPJ4sguT6ZsaGOSXPAM98l6CVJjAzxDtpEe/qm190S08ofQr0yXyb8iN/pl9a2ovxXC6nGTOwYSUY4ZpO71roMNa5HrrNXtWVZjN4nevA3bONnZzOaAOkLXMDJ3fGHArf X-Forefront-Antispam-Report: CIP:63.163.107.174; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(479174004)(24454002)(189002)(199003)(5001960100002)(87266999)(2950100001)(230700001)(106466001)(54356999)(1220700001)(1096002)(77096005)(11100500001)(65956001)(65816999)(189998001)(586003)(50986999)(97736004)(5008740100001)(19580395003)(4001350100001)(33656002)(81156007)(65806001)(5001770100001)(47776003)(76176999)(2906002)(87936001)(83506001)(4326007)(80316001)(36756003)(59896002)(50466002)(93886004)(23676002)(86362001)(69596002)(92566002)(64126003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0201MB0832; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0832; 2:rS/m+Q/+ZmBQJHLD2UN+KJeaWq0/BR3or5z9r5YyrCC51p5dMXTc8rsewPCK3UBA0JcW8T2zMt9ZIjpDwdx8MmwaVGLv6zjFKJKKK84U4yOcrofFc3aufWwW+iTzj1uom25G60jdRZfVGQLarhc56A==; 3:vavx9/ILygnKQhhPqHc2FK4Jf4M0R/B8PcLtbBK2Vfa1Iqaz4FRDU1XRF1vrEU00uVRJ9hTqMlk/He2LL3aBc/mKEmfVML6FUoLTcuFyKmyY45sAC+NLKRYzIvGcG1/L1j1IJsOME8kc5Gj3DoTn85iX4660pR5yCevbcYXPHq74iUknOK7CLMCteW2YhM44JvD2rcJ98+WVRNnk4YlSRZmpXPB0W0rHskm9WQsI7uOTeFtu2TEETdTeD7S+iRhap3zx+Ec/Do1K6Rv/neW+Gw==; 25:13xujR+vK7XxaLvYNgs5sb9TF0KmzTtikpaF9QwAK67Wljduf3O0pvqjz1+ndN3EMVa0zX6jhdtmAIURlH13GcDtXSsLDm1uvmolzvp/3FWX4DzsjhdTKk2ggfAGBizGCuYWsuE4g/zQTxBIb14txvwMSylS89HiuXzkMt3G7zsdH1zhin/yUZV/KjyTDIh8YwJLwwQa8+qpe3mrh6ayHlGwCo0YrP7TS1blgbEHm39HrUtNML1vUrpRKVSYuy3/ X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:DM2PR0201MB0832; X-MS-Office365-Filtering-Correlation-Id: 63b8db24-003b-4715-238f-08d326811456 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0832; 20:XlFD2Z83rJpYw84U0bYFoEpb494gf/Zfnjom0gLDaQTrufATgUQkIbNgU3LKZVf2jNABJurXmt6xcSxd/nNnhLY/QLEz+eY5/IrFoM5NnRLFrS19xgpYzYbYJ+1WXHe2TfdfzKy16lMErw9+dG9kiv9Rt/hVKpH3idPHgWhSaUDSfskIwXkGwh+XXKmzyBjIiMR5hORXKFUkdUSP48P4F7o4smdws3+ThrYKXBXt/gYI4xbvspX5sBbY4S3Dg3TYa7Heao+3JJXPCRhudIXgmcJv6v1HwWq0WhRs/b7Yy4v8O+XBc2uW34g0pmTegLIqNbeb6hxSdbihB4XlLSV8lCHflgOUfGK1ByQ7G5PQKX2081FBfIceujC38sjhI18TWthOE/lXvWfDdUePaocflkpJDjwFq3tnEdWHVnTg7f0/HkxaIC6jrBIQuDqdBYtX5NfriiKlkrFMEyZg0ED2WSWBqbsP7QP4CC8xCyQToVo0Tk6q7K2VkUSFNYjjEH5b X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(123027)(601004)(2401047)(8121501046)(520078)(13023025)(13018025)(13024025)(5005006)(13017025)(13015025)(10201501046)(3002001); SRVR:DM2PR0201MB0832; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0201MB0832; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0832; 4:2Ngjlt1v0p4RCPmgTqN+ZSxjPeAbVKYUq5oim+5ulmiRvWdhXVRjKEqgItzghkr9fWLzQ4LofoTn5yVDYbXIjOBw0m7q1ED9k0lgrH1Yiid38UzBYm2RdGwedJ/Yadl4zIc++vjQjdOKFD4d8I0VmtZcJ3isZxV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?utf-8?B?d09peVZXWThGNmVsMFlzVmg5SVZJRXU0VkxESWplSHUrSkR0RDl5a0s2ZFU4?= =?utf-8?B?bVp4NlpoZzc0OGtuM0VJYmtLckkwVXVZcEhHaGNVVUsxRWQrL2haMDlUelE1?= =?utf-8?B?N3dYaVFyWk91aXZJaUc1MlBaZlVXSTZMSzc3ZERIVjZSbjVwb2hmVTcyL2h4?= =?utf-8?Q?Qr2iyOkPHOImQvhSpiG116?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0832; 5:jxnjnoPOaSBwhqF6JL5cB5zyr7F9uY35I6ZY8tUJiyRUhv853vKYEXlzUAd5QQ6R6Ly+BTChprEveSktHHDDL47ImayQCsviAT+l4F/Mt2n5lEr4OLbvea2utcSTRJjSvnhVEnwwq9hd/7NCjTg77g==; 24:FiTN5E1SkT9arwUPfKZ5Lkf+VEhENrZxyRyNHX4zl5zWa5/yjCFzeSyvCiSM20P45xztZQKhG+AFkZntU1hISBJA4F3uo6Qg9N15rs1tBxU=; 20:wEi+OKXZPiqabDEEDM+mP7c7wwM2YoaqRCjEgWn6Hdp3Eznp8zJleZBHdRIuM8WFR4gUphoQHUVbvEWyyfuTSzKlisK0fXUacHvqWnPmiP07Qejzck2C3oTtxIYw2OAmow+7/e3vejDYdSsSjUv3AcWFEyq+17+r9h7kIfWcp1tZuZWCpQ44P5G8EVoRqixUTs3kzfdPe35ZZn/Oj04enuKbDa9qra38nRs512OOS7UWclto4NZB28KAGh6FrL4i SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2016 18:47:02.2730 (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: DM2PR0201MB0832 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 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 On 01/26/16 10:35, Estrin, Alex wrote: >> Thank you for the feedback. Since the kernel 4.5 merge has been closed I >> will retest and resend the whole patch series. > > Bart, > > In this case I would suggest to extend the patch by removing > this unlikely check, since it is also taken care of in target: > > @@ -1843,25 +1801,10 @@ static void srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch, > srpt_set_cmd_state(send_ioctx, SRPT_STATE_MGMT); > send_ioctx->tag = srp_tsk->tag; > tcm_tmr = srp_tmr_to_tcm(srp_tsk->tsk_mgmt_func); > - if (tcm_tmr < 0) { > - send_ioctx->cmd.se_tmr_req->response = > - TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED; > - goto fail; > - } Hello Alex, How about introducing a symbolic constant for unrecognized task management functions, e.g. as in the below variant of your patch ? --- drivers/infiniband/ulp/srpt/ib_srpt.c | 7 +------ include/target/target_core_base.h | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 21cdb7e..352dd87 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1595,7 +1595,7 @@ static int srp_tmr_to_tcm(int fn) case SRP_TSK_CLEAR_ACA: return TMR_CLEAR_ACA; default: - return -1; + return UNKNOWN_TMR; } } @@ -1629,11 +1629,6 @@ static void srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch, srpt_set_cmd_state(send_ioctx, SRPT_STATE_MGMT); send_ioctx->cmd.tag = srp_tsk->tag; tcm_tmr = srp_tmr_to_tcm(srp_tsk->tsk_mgmt_func); - if (tcm_tmr < 0) { - send_ioctx->cmd.se_tmr_req->response = - TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED; - goto fail; - } rc = target_submit_tmr(&send_ioctx->cmd, sess, NULL, scsilun_to_int(&srp_tsk->lun), srp_tsk, tcm_tmr, GFP_KERNEL, srp_tsk->task_tag, diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index ec2ddbf..2fb005a 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -192,6 +192,7 @@ enum target_sc_flags_table { /* fabric independent task management function values */ enum tcm_tmreq_table { + UNKNOWN_TMR = -1, TMR_ABORT_TASK = 1, TMR_ABORT_TASK_SET = 2, TMR_CLEAR_ACA = 3,