From patchwork Tue Jan 10 19:08:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9508361 Return-Path: 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 B4E1760231 for ; Tue, 10 Jan 2017 19:11:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5D4B28553 for ; Tue, 10 Jan 2017 19:11:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98F7328596; Tue, 10 Jan 2017 19:11:51 +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 D956628553 for ; Tue, 10 Jan 2017 19:11:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765913AbdAJTKY (ORCPT ); Tue, 10 Jan 2017 14:10:24 -0500 Received: from mail-eopbgr720066.outbound.protection.outlook.com ([40.107.72.66]:19088 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1765818AbdAJTIf (ORCPT ); Tue, 10 Jan 2017 14:08:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=yqbMZGH2Cgs/IECzQVW4M1V/UnKHCYzVbVNQydgHaM4=; b=XD2STJVX0bluVaH7qPwCDXm7ITYeUgVvZNs2UKdDdUx3W0JnMF+67CeDiEjJp19etUVbJQzJA86I2aUbxJOgAoU5yDhdCv5kEd8fIfiJyQFhcAXaf5TUMKTmZ+t7f5foJ2UbM7htFW4k/Ps3jIYfQmax+53ZHyRtByg+UfxhXxI= Received: from MWHPR02CA0011.namprd02.prod.outlook.com (10.168.209.149) by BLUPR02MB035.namprd02.prod.outlook.com (10.242.191.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Tue, 10 Jan 2017 19:08:31 +0000 Received: from BL2FFO11FD021.protection.gbl (2a01:111:f400:7c09::141) by MWHPR02CA0011.outlook.office365.com (2603:10b6:300:4b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12 via Frontend Transport; Tue, 10 Jan 2017 19:08:31 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=bestguesspass action=none header.from=sandisk.com; mellanox.com; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BL2FFO11FD021.mail.protection.outlook.com (10.173.161.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.8 via Frontend Transport; Tue, 10 Jan 2017 19:08:31 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 28.A9.65426.98E25785; Tue, 10 Jan 2017 10:57:13 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Tue, 10 Jan 2017 11:08:24 -0800 X-AuditID: 0ac94369-b62949800001ff92-cc-58752e89270f Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id A9.38.16817.82135785; Tue, 10 Jan 2017 11:08:24 -0800 (PST) From: Bart Van Assche To: Doug Ledford CC: , Moni Shoua Subject: [PATCH v2 11/15] IB/rxe: Generate a completion for all failed work requests Date: Tue, 10 Jan 2017 11:08:18 -0800 Message-ID: <20170110190822.16953-12-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170110190822.16953-11-bart.vanassche@sandisk.com> References: <20170110190822.16953-1-bart.vanassche@sandisk.com> <20170110190822.16953-2-bart.vanassche@sandisk.com> <20170110190822.16953-3-bart.vanassche@sandisk.com> <20170110190822.16953-4-bart.vanassche@sandisk.com> <20170110190822.16953-5-bart.vanassche@sandisk.com> <20170110190822.16953-6-bart.vanassche@sandisk.com> <20170110190822.16953-7-bart.vanassche@sandisk.com> <20170110190822.16953-8-bart.vanassche@sandisk.com> <20170110190822.16953-9-bart.vanassche@sandisk.com> <20170110190822.16953-10-bart.vanassche@sandisk.com> <20170110190822.16953-11-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsXCddJ5kW6nXmmEweQNOhYvz39gtXh2qJfF YsP7NewOzB7Pph9m8ni/7yqbx+dNcgHMUVw2Kak5mWWpRfp2CVwZR+5sZyx4rFBx9FYfYwPj WukuRk4OCQETian/mhi7GLk4hASWMkk8uvWDBcLZxigxZ9dLdpiqk7vOMoPYQgIbGSUePPAD sdkEjCS+vZ/JAmKLCKhJbHq1CKyeWcBR4tK0T0wgtrBAiMTiW7fAalgEVCUe713IBmLzCjhI 3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ttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39410400002)(39860400002)(39850400002)(39450400003)(39840400002)(2980300002)(438002)(199003)(189002)(5003940100001)(76176999)(68736007)(50986999)(1076002)(92566002)(2906002)(47776003)(4326007)(97736004)(33646002)(189998001)(93886004)(86362001)(36756003)(106466001)(69596002)(626004)(2270400002)(2950100002)(6916009)(110136003)(50466002)(5660300001)(6666003)(54906002)(77096006)(38730400001)(8936002)(356003)(81156014)(81166006)(48376002)(8676002)(305945005)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB035; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD021; 1:2N9jzOv/Pcb6UT+G75xvu/LDt/2+HxYWJno4bAcAzcKF2Wjcasg8DMTxSeoDRStFHsHV7VN98Te3On+dNKwm9Tus5qnnUgcVWeeJ4C2Zq4Ii7WdAlYaRGSWZq0hNimJgfFt5gcdwFqm6kZj6J1iywJgBjL29t3bjV3tUEwyzhezCUOlU7uUOCTkV0kd7ArwEjG+BIhcrB0Q8922DfD7RmETJNYekr9cIyIoNN9IoDjuZXrR/wY4zijV8JFMxyl0Or2fefJ4un/sU/PscUnWvwl85NgGu2RhOeRIg9R74iMy2hZbiUct6NJywIalmZ0w/R/6YmBYmTPBur2MUrturBf5rELlJPBFlgK8AHQ6+zz1bPRFC6MBIUwq46KQ/3FLpRW1zv8XL3GsBoLIstugy4oGUiwRv4KCMgayNaLUpbdvk8+SfxEhFmo+1nHJzrR5eA92AUcOX2a3DV9sTiYTD+ZZYiWZzNkux6RPb+c3BF2poMtri+CF1LmUSjmx/GJD9tPNXZ8IpxEI0NkV09w10Yw== X-MS-Office365-Filtering-Correlation-Id: cc4633f0-7bc5-448a-8f56-08d4398c1154 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BLUPR02MB035; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB035; 3:k93ZoYz9JmixxeYyuKEb0uBeVD9u+L3k+RY/+Yx/w8BFDP8Tfd5riWgd9wOP4Bn+//kjjPfiq9iOZltHLqQKr5uz6sxaK1jYsUqaBR09nxkeFDneqgqC+51EKRmUv0cR2XlryDm9rzAS9k0yqYWiXUCiJtoRq+SgZvSJOy7ckJ6X1aP6pDkVf4llc34/p13OybxVfW5xcUE/D3hkCFIh4cLnQFfm9GZ0biop1+V/5gpvMGshhJ8aY2w5gZuL17hNnd+u7maeMoeHc/SgKH2p4ypCpm+5Nd4zjqxh9ZRtF13P0CA0m6MU1LxcXTpcHSsfnpAAWVc1sPkaqiplL4K+npW+bWgKKbq+8VkYjDtNynUgd56Bs8gAb5NxE62jgtIrDyIiZQgo6ChRIYj/QlAc7Q==; 25:Tm8wD0e4qrL7qbgW+uLjK7znR7AszuBktrA9nKEhVeybkRxuZFkzk37JGcCeys9lLLijwJc33txBrAj3ngYYZErSaa6Zewc6IhGvPzoSHeXukNev/utk5ZRFcT8K2yz9WEt4P3uc7UsIocbtiDW5EmxxujK67c0SWgUGORGQxwovQ+okVE4qNXRNAoBfQ9dYXAFCbaYBZpqXuzzcX4Vlu9XQwdnYMZw1Fee5W+rfRyBlRVVF5L4/EWH+ekoZ9erjfkAd0kUPA80q5l3NrH4vOLsdU3ngCekpHPYyst2qIAjx3eSou5c6HTWY90ca9bDOmnw3lhBjHjk1rR3wq1REJjVgRDTNORCD+lUpv8aSlDlIebIWgsjetgAbyzxAveqXOgkVCYufU9gOi8iCRhsAR6doaIBK2bMA2651sDpetHOCjBhQLSRok5DNcScYiEGmyg5JON+yLRGRi40PgktwvA== X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB035; 31:BTf94yoc5CIITdtQBv3AdQA+nunb3LQvoOxx5Jtwc+6jb1IYbCEStRaj2rJ6AJHiQvuWkRpqVwdpU+/VZCTvtaL6rcNPxoITcsx+hWsVbLfmmhmLi/KBdTtHIjGsP/u+5lKqFRWUTJYt9B5X2OzRvJibRek7rhYRm5wVOzx4AnBahGLKSApFcLhG5rFR85WCTfK/ndn7mkkFLiWzgYlyMpsEw0BP4d2owMyS2CFUouOBo2Ua+Aq8JbaTWxrhOFbmVi3+kSCRkaegAQxjmhdz5Q==; 20:oBorkd7ZV9bS89l7RvRD/cXlRvL77P6mDdPEX7ri960mdsHejK9cI3OPkvmSEytE1P5O9M8LaW3pHCZrGrFhtIgsl8HFEhlijWfkiVSEOenkiyIxc1L57Ybz0rP4AxHoKGgDeG4sZ0a1Zyo5ZHSCYuukuzn4cznh6my5r0pkfPP260P8+09By4Rgc/km+oRMGet4e/gullGSNIrM66nyXzU50jqa2c5Rfs5ZvoiSnpCSJDby3w7E2vGNhtzegrjtbLjweLiFo31zy0Ruyws6X21FgcztmTcwK1yCPVUDVKzlwYlAAq/5D8WNVWbJUagqy5iJoy3UBA1p1mCvaYNVr5LDcM5cYkAU9O/k89YFMVlkr36d+W3dOh9I+9uti9/yPI9Q79t4QfEGcHsrzreuyoxu8J6YOP53JsisI7fzkyyBMElF9lwEu6SrMP/tl9wvgtC8P1/24Vu/UAw6hbxA3c4eo6g2W2uozsFgR+f7M9nJfvfE9zyF5WS9l1ImYsUF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(56004941905204)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13016025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:BLUPR02MB035; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB035; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB035; 4:OP4AuqrkmvgG1x7Z3zURyvdd+FmYu2Bo5BLnjm0uv5siniP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rQXbI43+LlUQ7LB69PBowtFeVUGJgDOhYfAxw/EEq8QXUYkmSiqhbD0d9vqLA7hiWNZPL5HK6wMPz7yXwP7Wb1BlU9vplIr/g3SrtKV7moAVprRJvu3TOuTSfxxBXa/X9jvFChH0FRXW3TQhREMOB7/JxedhsjFrIiW7ak/qIx2zWxLClJyJarNyClYHYDvc989rA+m6l+suJML8yFdjwYCZWBTWFUkdp+jRDc9ShLTtHnNIfDCtZcRK5pv3duVlBjEIKA15P9y4raM+3TE7mVsIelVYcQo3Lohkd/R9DgmwVPsuE0oJ6MJVAfG+aDg== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2017 19:08:31.1141 (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.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB035 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 Change do_complete() such that an error completion is not only generated if a QP is in the error state but also if a work request failed. Signed-off-by: Bart Van Assche Reviewed-by: Andrew Boyer Cc: Moni Shoua --- drivers/infiniband/sw/rxe/rxe_comp.c | 11 ++++++++++- drivers/infiniband/sw/rxe/rxe_loc.h | 1 + drivers/infiniband/sw/rxe/rxe_req.c | 18 +++++++----------- drivers/infiniband/sw/rxe/rxe_resp.c | 4 ++-- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c index 6769a075501e..91317c159b9a 100644 --- a/drivers/infiniband/sw/rxe/rxe_comp.c +++ b/drivers/infiniband/sw/rxe/rxe_comp.c @@ -412,13 +412,21 @@ static void make_send_cqe(struct rxe_qp *qp, struct rxe_send_wqe *wqe, } } +/* + * IBA Spec. Section 10.7.3.1 SIGNALED COMPLETIONS + * ---------8<---------8<------------- + * ...Note that if a completion error occurs, a Work Completion + * will always be generated, even if the signaling + * indicator requests an Unsignaled Completion. + * ---------8<---------8<------------- + */ static void do_complete(struct rxe_qp *qp, struct rxe_send_wqe *wqe) { struct rxe_cqe cqe; if ((qp->sq_sig_type == IB_SIGNAL_ALL_WR) || (wqe->wr.send_flags & IB_SEND_SIGNALED) || - (qp->req.state == QP_STATE_ERROR)) { + wqe->status != IB_WC_SUCCESS) { make_send_cqe(qp, wqe, &cqe); advance_consumer(qp->sq.queue); rxe_cq_post(qp->scq, &cqe, 0); @@ -709,6 +717,7 @@ int rxe_completer(void *arg) break; case COMPST_ERROR: + WARN_ON_ONCE(wqe->status == IB_WC_SUCCESS); do_complete(qp, wqe); rxe_qp_error(qp); diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h index da191d7acb6f..bdec460f1fce 100644 --- a/drivers/infiniband/sw/rxe/rxe_loc.h +++ b/drivers/infiniband/sw/rxe/rxe_loc.h @@ -225,6 +225,7 @@ extern struct ib_dma_mapping_ops rxe_dma_mapping_ops; void rxe_release(struct kref *kref); +void rxe_drain_req_pkts(struct rxe_qp *qp, bool notify); int rxe_completer(void *arg); int rxe_requester(void *arg); int rxe_responder(void *arg); diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index 310cd3350578..d62be4828899 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -594,9 +594,14 @@ int rxe_requester(void *arg) rxe_add_ref(qp); next_wqe: - if (unlikely(!qp->valid || qp->req.state == QP_STATE_ERROR)) + if (unlikely(!qp->valid)) goto exit; + if (unlikely(qp->req.state == QP_STATE_ERROR)) { + rxe_drain_req_pkts(qp, true); + goto exit; + } + if (unlikely(qp->req.state == QP_STATE_RESET)) { qp->req.wqe_index = consumer_index(qp->sq.queue); qp->req.opcode = -1; @@ -743,17 +748,8 @@ int rxe_requester(void *arg) kfree_skb(skb); wqe->status = IB_WC_LOC_PROT_ERR; wqe->state = wqe_state_error; - - /* - * IBA Spec. Section 10.7.3.1 SIGNALED COMPLETIONS - * ---------8<---------8<------------- - * ...Note that if a completion error occurs, a Work Completion - * will always be generated, even if the signaling - * indicator requests an Unsignaled Completion. - * ---------8<---------8<------------- - */ - wqe->wr.send_flags |= IB_SEND_SIGNALED; __rxe_do_task(&qp->comp.task); + exit: rxe_drop_ref(qp); return -EAGAIN; diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c index 51c134dbc6c8..33defaddc000 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c @@ -1207,7 +1207,7 @@ static enum resp_states do_class_d1e_error(struct rxe_qp *qp) } } -static void rxe_drain_req_pkts(struct rxe_qp *qp) +void rxe_drain_req_pkts(struct rxe_qp *qp, bool notify) { struct sk_buff *skb; @@ -1388,7 +1388,7 @@ int rxe_responder(void *arg) goto exit; case RESPST_RESET: - rxe_drain_req_pkts(qp); + rxe_drain_req_pkts(qp, false); qp->resp.wqe = NULL; goto exit;