From patchwork Fri Jan 29 23:18:41 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: 8168691 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6FCCA9F96D for ; Fri, 29 Jan 2016 23:18:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 72AB920340 for ; Fri, 29 Jan 2016 23:18:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57B6A20328 for ; Fri, 29 Jan 2016 23:18:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755107AbcA2XSw (ORCPT ); Fri, 29 Jan 2016 18:18:52 -0500 Received: from mail-bn1on0061.outbound.protection.outlook.com ([157.56.110.61]:26114 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753204AbcA2XSv (ORCPT ); Fri, 29 Jan 2016 18:18:51 -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=kM9sqoGrxlJaSBBRK/VebiiSkL9p2Uo/ZrB3PVrKnZQ=; b=R+nIHzUMzDjwt8zkZJqf7fo4mj7Ec5SSjLUqWNJghAdof+4xzOY3JbmO5qu1IHTxrOenSUF3daf9VfqO3pn2a6lSDRtPPaTRxoIjxPvsX+aOPArtknfXXyQ1ITze0ZF2Zf2QqNPs06p++mqsor8EDn/AhwWaqOWnHARGDW3vzEU= Received: from BY2PR02CA0070.namprd02.prod.outlook.com (10.242.32.28) by BY2PR02MB299.namprd02.prod.outlook.com (10.141.140.22) with Microsoft SMTP Server (TLS) id 15.1.365.19; Fri, 29 Jan 2016 23:18:49 +0000 Received: from BN1AFFO11FD037.protection.gbl (2a01:111:f400:7c10::161) by BY2PR02CA0070.outlook.office365.com (2a01:111:e400:2c2a::28) with Microsoft SMTP Server (TLS) id 15.1.390.13 via Frontend Transport; Fri, 29 Jan 2016 23:18:49 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.172) 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.172 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.172; helo=milsmgep11.sandisk.com; Received: from milsmgep11.sandisk.com (63.163.107.172) by BN1AFFO11FD037.mail.protection.outlook.com (10.58.52.241) with Microsoft SMTP Server id 15.1.355.15 via Frontend Transport; Fri, 29 Jan 2016 23:18:48 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by (Symantec Messaging Gateway) with SMTP id 81.60.29304.553FBA65; Fri, 29 Jan 2016 15:18:45 -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; Fri, 29 Jan 2016 15:18:42 -0800 X-AuditID: ac160a68-2a63198000007278-f8-56abf3558f6e Received: from [10.60.52.49] ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 47.AC.03910.153FBA65; Fri, 29 Jan 2016 15:18:41 -0800 (PST) Subject: [PATCH v2 21/22] IB/srpt: Introduce srpt_process_wait_list() To: Doug Ledford References: <56ABF16E.7070006@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , "Alex Estrin" , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <56ABF351.1040400@sandisk.com> Date: Fri, 29 Jan 2016 15:18:41 -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: <56ABF16E.7070006@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOLMWRmVeSWpSXmKPExsWyRoxnkW7o59VhBrt71CwuPP3OZPHy/AdW i5WrjzJZPDvUy2Jxo+0BmwOrx+I9L5k8dt9sYPN4Nv0wk8f7fVfZPD5vkgtgjeKySUnNySxL LdK3S+DKWLN5J3vBe+GKtbsfszcw/uTvYuTkkBAwkfg86z8TiC0ksIlRYvb0jC5GLiB7B6PE vjurmGCKpt87xQqRmMMosfTPNmaQhLCAq8SVZ4fZQWwRATWJTa8WsUNM0pI4d+ELO0gDs8Aq RolNV6+DJdgEjCS+vZ/JAmLzAhXdfHQbLM4ioCox5et3NhBbVCBC4nBnFztEjaDEyZlPwOo5 BbQllsy+AGRzAA3VlFi/Sx8kzCwgL7H97RxmkF0SAntZJd6dWQl1hLrEySXzmSYwCs9CMmoW QvssJO0LGJlXMYrlZuYU56anFhga6hUn5qVkFmfrJefnbmIERwdXxg7GrZPMDzEKcDAq8fB6 LFsdJsSaWFZcmXuIUYKDWUmEt+4FUIg3JbGyKrUoP76oNCe1+BCjNAeLkjivdYtamJBAemJJ anZqakFqEUyWiYNTqoHxgcCl+i1JYa1O/yeI1c85/fFN2DmhoqfSNqv3VLya0bvxZZvdVI0m y/T9zLueagpYJbe/35Y/Vebw5iCu/iNvq2ozrnVbLODiXZvjen252P/zr39GVrutOGAjv2va hsBr2hwuT96dZdtgtmd3z5NH3/JMavZeueNw7bVhSZTV5W7ve7z7ln5zVmIpzkg01GIuKk4E AI8a712KAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPJMWRmVeSWpSXmKPExsXCtZEjRTfw8+owg6bblhYXnn5nsnh5/gOr xcrVR5ksnh3qZbG40faAzYHVY/Gel0weu282sHk8m36YyeP9vqtsHp83yQWwRnHZpKTmZJal FunbJXBlrNm8k73gvXDF2t2P2RsYf/J3MXJySAiYSEy/d4q1i5GLQ0hgFqPE1DPfmUESwgKu EleeHWYHsUUE1CQ2vVoEZgsJaEmcu/CFHaSBWWAVo8TvlR/YQBJsAkYS397PZAGxeYGKbj66 DdbAIqAqMeXrd7AaUYEIicOdXewQNYISJ2c+AavnFNCWWDL7ApjNLKAu8WfeJWYIW15i+9s5 zBMY+WYhaZmFpGwWkrIFjMyrGMVyM3OKc9MzCwyN9IoT81Iyi7P1kvNzNzGCg5Qzagfj9Ynm hxiZODilGhjDjf5ZtJw6sbRfe/qPmnP3Xi/5tX9+oXfhywVcHZZrHW+eeJX+fZ3ofjF1Btez R7MO9v6csISz5aPup4WnNP98+uvetPxlTNGz6De1MWFvtmp7ihzV/dO8ytnj5pmsC5s/Xy/4 qqESvpAvtOsWq9zOgie/Zh09GRIQNjlj+qotRwoWty9XO82xRYmlOCPRUIu5qDgRABale/4C AgAA X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD037; 1:jCyA8IdMkQ3NIPHAbSwnyuV7INLGhWO8iAC0B/D+gZQc7jGpW9bj9+W/cdtq5Xm3pV90RsFAq65r790Hynm/UWK9qvgSuc8P9DBM3qxZJLCJe4XIvpJR83XIocG/4e6EDaRkbhGCdmlgaokvtR9ahQgemP94rjUQW9tW6pp8NwzgyKckesZRFPLXkz6KyPDjPp6pmtiiCV3xLcCKkNt2J+5sPybLlLDvwr3A6ZDob5A6MkInpjiYP4UWJWmfYYJJvtEN874Fa0jc7Diq6sdBSAbLRDvQhgb358PQg6JVA3WFgAjTTokz10BkEP5CB+ItMKQIlwZN74IlJicJhGcOLvNGM450gGl0o/UNFETHNnNMjQIEcR4396hOgAtzlRKYWnjuWWlkjoThdRDZoL6+OlKp176apsFSRXIkndd5vp8= X-Forefront-Antispam-Report: CIP:63.163.107.172; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(199003)(189002)(33656002)(64126003)(87266999)(76176999)(54356999)(2906002)(65816999)(50986999)(4326007)(19580395003)(80316001)(19580405001)(65956001)(83506001)(5008740100001)(50466002)(189998001)(1096002)(230700001)(2950100001)(77096005)(110136002)(86362001)(23676002)(4001350100001)(11100500001)(586003)(36756003)(47776003)(1220700001)(87936001)(92566002)(106466001)(5001960100002)(229853001)(65806001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB299; H:milsmgep11.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB299; 2:52bWgcYEUPQAFJajwM6AggUkHe6DnYVZJf/+Ib2/jDml5eUtx5PvaiNztV7gG6rO0qJ7bCxW2LUxp8W3vH5s3gSxWpbrybTCmG0bt7ePSuS1yxnifGT9tI7rVSOrXNcop2zpEalzJNS+AnaJWDINcQ==; 3:CiLW+GSyHqZNPDHs9e/a1VjUDIaPgNmoahSDEkkd8RynTGPA+IhDOLVkt2NFb+vVjDgHeRNnsSjUjckI/NUUEzFIzurbMyOAAhb82u2paxCPZrlPidCUIdLbtEDDVNGEWfZiqDHT2z5A0tyj7dB/R7sZVqjn8rmhrChePbxaQs8jYEUhC0XO7/Nc1ujBukBGPe2Ssi8FnjvvBHCQjj17zNdZMv3xikURy5lcT7+6iJVWVIo3C75KJc3dBncrdenZTyH9w4Pm53NqF1TvmNZjQQ==; 25:YW3Zg1mwIg0mkh8mk4rHxbWeKwCAu4OB6KU/QAf9IDyUbudsZKTEA3nYGPw8yu82itY5n2HNY2IKw3SRLHhwASITr3iwhxDj99k77VcfwMbRHIufMbosjKleZJLwf+xkZAZRC5sSG6GVtOgDBbsCpBqLJ4rCIVKaVY4us7qb/MB294/9dAyPzYmmkGtnKYOkFYuc0UB8AwzhOG+yRFciXGKM6rOnljrL4tXnXBhIxQYNYHsbOEH0LRXSk02+zUuK X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:BY2PR02MB299; X-MS-Office365-Filtering-Correlation-Id: 10d03337-68e9-4551-46bf-08d329028b04 X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB299; 20:eh/hxmZ4+P0X2A+FD9cq7n4+HfRhSjiff97AtX2Mdsf7svn8PsXWpZZU0ZOMk97RSZVFMIGMGBlAQ2kxgt2aOYuuSFF7Y3Tr+Zc6URwk4wdLzjl5MUYFdmvZ5Jm3YUS8JMtQuxITXkfRgaueqC+q6uwN5/I45JtXBQcGMTUn88qjGN8ObMGAf+0T2Y04aEKjuo1XyCzOxsUZuEcPOdr3gJh1OligqsxnfcJFsTRt3QSxiBmav8xlZHhz9bqbtytbK0yHKF0KJzF52R7/ojawi3sq0YX8Snb9JzWBIZC+bxS0R72HJGKVq1yxyrKrmiSodaMlbA/WAfqSTRvVDHs0lkAHyGBoOLQTA8sVF8APbdk/GjJmeP6m68KGDY3P1DH1OuyMGZCO5doseM/RpQIRbtTa3+/LnqP9euwFN7wqqgXKFoJzf6nfPdnfh76q4soj3Sd4IokhWIvOHIzvy5Yfxz7WMOBQGJrj6rkpVn/8ZINZgXvKymjFe/x1zNQw0A4I 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)(13018025)(8121501046)(13023025)(13017025)(5005006)(13015025)(13024025)(3002001)(10201501046); SRVR:BY2PR02MB299; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB299; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB299; 4:VZDBVCd9fC+vZz6V4wP80E5qmoOjbOA+BwPdx5JAMsKxGGt2mcsDGWiKejQujIAxk5VIfibbRkYS2Zm1vgNEnuzNSzyKH9xNTaB8DEll/orc2Mxlq1NtKOig9yLj3bI8BhyWfpKVq1lEUzH0l6BV5idZmBhUFC+NB6j5dU16OjFqBfMSrP/0SD6xrRYp2UEI8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RNUFhkN1hJ?= =?utf-8?Q?uTfiPufDOEKXRjW9N0Yvvrj0w8?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB299; 5:wdEt/fAi3zMcKQYirjjGz56Ri3/PWH666LEz/aZNR+EPR9DOHcoo33+R7wbLczdG6T8Gh1WgrztuV43IgFrjiPrgWAmgjbxh79rp4R3OoaLNHPlzFnUH2vNdeNPlhpHbkoaEuZ5o1UAHMF/8xGpirQ==; 24:kK+YZvlJSuBEiUsf0f9dWUPksIbgTmqprwgJUIXWwzbMq6CFprgCQQrICfHo7Lc7gOdzbB/CPYru55AT6XYWRrP1ihCCeRAlzWJ2F4lvMJQ=; 20:kyHAkADuf7nAJcPImjNfZUI20urexwmIjyEhSHNZv1kNKzNNI84PxpqTXSZBzS21jTKWFQifW2dJUwR6rZlczM+M/I5TyK88/cjyaFIb8vM1rj/VvyIbSfuZwrex0gRy+I5NidUL2XKcDdY6T1yFbyYNyyPJCHNrMWvDgsOarOfYJZjr5tAHbe57FK+0W7WVAHWUs5OtHoCZg26vHR0LVGSkfshd6pESrQPJ+rz62MLy1/jXM+rc3JjW76E+Eifa SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2016 23:18:48.3054 (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.172]; Helo=[milsmgep11.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB299 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 This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Alex Estrin --- drivers/infiniband/ulp/srpt/ib_srpt.c | 42 ++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index d5b932c..5185eca 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1730,6 +1730,28 @@ static void srpt_recv_done(struct ib_cq *cq, struct ib_wc *wc) } } +/* + * This function must be called from the context in which RDMA completions are + * processed because it accesses the wait list without protection against + * access from other threads. + */ +static void srpt_process_wait_list(struct srpt_rdma_ch *ch) +{ + struct srpt_send_ioctx *ioctx; + + while (!list_empty(&ch->cmd_wait_list) && + ch->state >= CH_LIVE && + (ioctx = srpt_get_send_ioctx(ch)) != NULL) { + struct srpt_recv_ioctx *recv_ioctx; + + recv_ioctx = list_first_entry(&ch->cmd_wait_list, + struct srpt_recv_ioctx, + wait_list); + list_del(&recv_ioctx->wait_list); + srpt_handle_new_iu(ch, recv_ioctx, ioctx); + } +} + /** * Note: Although this has not yet been observed during tests, at least in * theory it is possible that the srpt_get_send_ioctx() call invoked by @@ -1769,17 +1791,7 @@ static void srpt_send_done(struct ib_cq *cq, struct ib_wc *wc) " wr_id = %u.\n", ioctx->ioctx.index); } - while (!list_empty(&ch->cmd_wait_list) && - ch->state == CH_LIVE && - (ioctx = srpt_get_send_ioctx(ch)) != NULL) { - struct srpt_recv_ioctx *recv_ioctx; - - recv_ioctx = list_first_entry(&ch->cmd_wait_list, - struct srpt_recv_ioctx, - wait_list); - list_del(&recv_ioctx->wait_list); - srpt_handle_new_iu(ch, recv_ioctx, ioctx); - } + srpt_process_wait_list(ch); } /** @@ -2304,15 +2316,9 @@ static void srpt_cm_rtu_recv(struct srpt_rdma_ch *ch) int ret; if (srpt_set_ch_state(ch, CH_LIVE)) { - struct srpt_recv_ioctx *ioctx, *ioctx_tmp; - ret = srpt_ch_qp_rts(ch, ch->qp); - list_for_each_entry_safe(ioctx, ioctx_tmp, &ch->cmd_wait_list, - wait_list) { - list_del(&ioctx->wait_list); - srpt_handle_new_iu(ch, ioctx, NULL); - } + srpt_process_wait_list(ch); if (ret) srpt_close_ch(ch); }