From patchwork Tue Jan 10 19:15:50 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: 9508407 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 A55E06075C for ; Tue, 10 Jan 2017 19:16:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 991E127F89 for ; Tue, 10 Jan 2017 19:16:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E1012859B; Tue, 10 Jan 2017 19:16:39 +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 9B26B27F89 for ; Tue, 10 Jan 2017 19:16:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941646AbdAJTQO (ORCPT ); Tue, 10 Jan 2017 14:16:14 -0500 Received: from mail-cys01nam02on0082.outbound.protection.outlook.com ([104.47.37.82]:2863 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S940383AbdAJTQA (ORCPT ); Tue, 10 Jan 2017 14:16:00 -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=gidQ60yedB+n1A4ZUH9iJYGJIhjh3n7cvwFcXyQzevqFsLfkmTm3HxGGaBftTMWsL/0u4ZDFHs/0d+f+ko4q+5Jut/3MCIeuU7VbianzBkuXTTq/nMwOmCZo0oYVTXSj6F5nSfI9C4F4qlQxNi97kigEk+YUtqdGbcy3282R2jA= Received: from BLUPR02CA044.namprd02.prod.outlook.com (10.160.23.162) 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:15:57 +0000 Received: from BN1AFFO11FD019.protection.gbl (2a01:111:f400:7c10::160) by BLUPR02CA044.outlook.office365.com (2a01:111:e400:8ad::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10 via Frontend Transport; Tue, 10 Jan 2017 19:15:57 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) 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.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BN1AFFO11FD019.mail.protection.outlook.com (10.58.52.79) 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:15:57 +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 A7.87.01420.1D035785; Tue, 10 Jan 2017 11:06:57 -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:15:54 -0800 X-AuditID: 0ac94371-47fff7000001058c-56-587530d1e764 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 5E.48.16817.AE235785; Tue, 10 Jan 2017 11:15:54 -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:15:50 -0800 Message-ID: <20170110191554.17359-12-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170110191554.17359-1-bart.vanassche@sandisk.com> References: <20170110191554.17359-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNLMWRmVeSWpSXmKPExsXCddJ5ke5Fg9IIg3/bVCxenv/AavHsUC+L xYb3a9gdmD2eTT/M5PF+31U2j8+b5AKYo7hsUlJzMstSi/TtErgyjtzZzljwWKHi6K0+xgbG tdJdjJwcEgImEnd2bWPtYuTiEBJYyiTx+NJRdghnG6PEkuXn2GGqms9dYYZIbGSU6Ni2lQkk wSZgJPHt/UwWEFtEQE1i06tFYA3MAo4Sl6Z9AqsRFgiRWHzrFlANBweLgKrEnB8yIGFeAQeJ Q5v3s0LMl5fY1XYRzOYEin9YcJ8JpFxIwF5iyipjkLUSAs9ZJA60n2eG6BWUODnzCQvEKgmJ gy9egMWFBNQlTi6ZzzSBUWgWkrJZSMoWMDKtYhTLzcwpzk1PLTA00StOzEvJLM7WS87P3cQI CeLCHYyvb3sfYhTgYFTi4e14VhIhxJpYVlyZe4hRgoNZSYQ3Va80Qog3JbGyKrUoP76oNCe1 +BCjNAeLkjjvxeiPYUIC6YklqdmpqQWpRTBZJg5OqQbGxZZTPlyafnza+zy+R1PD96ddUT6w cteNWf7HqpS2tTexPJXQelh32kB/DivzDvmwZdUVIiVzGf6v62t4cVDpjZbEhzOLHDLkM0Ru z6sJUgsV6uWy81f5LPx/X+n9u8kte6Kmz1h10rv2tmzWas6/1UV5V/k1DwhdtAx837n2vNWu uaKahj/6lViKMxINtZiLihMBYlhs+V4CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkuLIzCtJLcpLzFFi42Lh2sjJpvvKqDTC4FmnhsXL8x9YLZ4d6mWx 2PB+DbsDs8ez6YeZPN7vu8rm8XmTXABzFJdNSmpOZllqkb5dAlfGkTvbGQseK1QcvdXH2MC4 VrqLkZNDQsBEovncFeYuRi4OIYH1jBK3bp5mAUmwCRhJfHs/E8wWEVCT2PRqEXsXIwcHs4Cj xO3zISBhYYEQicW3brGAhFkEVCXm/JABCfMKOEgcmXCBFWK8vMSutotgNidQ/MOC+0wg5UIC 9hJTVhlPYORewMiwilEsNzOnODc9s8DQUK84MS8lszhbLzk/dxMjxMuROxifTjQ/xMjEwSnV wCjsHLYlaJHbNeYYnRtfnT46iMvl/vkV2+J9tfp32Wd52UeWR6+3bWv7YsRbrm4/f+aB/b6F fxvLJk9anF3uvOqT3K1P711zZAvvC9xyrNs4+6CvayrTXvdE8505fsprbjteCb5kUrNS3X9H 3hRLv8uV71edtDy1sbvG+PUc9ds7TF7eiI1bb6zEUpyRaKjFXFScCAB36A4yogEAAA== MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; 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)(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:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD019; 1:+QHnPhG8JotmbwObHHQEeG8TLHXoDPrLOs2f7qagwlzR4uiYyyECOwYfZ5Cvn38753z8kUatoGNRZozgWDjds+uGeWM0qCQJDEVPLOXzLTTMJ8nAWd5do3RSbuLn9Jn2tR4nQSi39zaXvHF17UbGAA7woLBKJ5cwvyh/QMkgd+e3XVfnjYab38EKZyuwcrEhWAC4H7KGeRY+lOrEXXIyBcrj4KrHssTg83dPgCsdoRFnQBB/3uw6zHFNOqsoxn/1w2IKfV4VCNibcl8Bgau4bIGNyxhqleEkNQnItfaV8hDtCztW8BIdIxvFO1+07umAodm0Xf+J0V7/ItipkFw63uZ2XLeuJ2GIfuFrk4ZVkxvYNCYzYHNW+tgOxCRxSLe/ISed4W1gUfL29fyrOJfoeyNxqF+RwpbgJxw1ZvemxfB1VRdM7hOgebs79NVHWpV5RMzVlRZ1Omh9lm+sjOSdeRYc1r2WRGQydzJNnwPUZHc= X-MS-Office365-Filtering-Correlation-Id: 37560451-e6d0-433d-aeae-08d4398d1b1c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BLUPR02MB035; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB035; 3:SC+OIJ6oLR/4ZJAbLlz3Gab5uR+KEaVFQ4koDlqtmU7iawqmZGKU9f7ftd1V6UwTqtYe9XA49ORwB1Sejeiyt/tOdf2RTp6NjHJfvyGOhXc9hnDbih+V9QWwsV5I1d4Ur+APgv19se/jZdDzpeBuhiZUeuA3XCuWk2VFQAoAGkFW+itD8pVQyhHrtbuwBxLvt1EimhqJKY+edt+g7Mejlt5g8WttE7Aw3fehxoe1L+c1kFgW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-Exchange-Diagnostics: 1; BLUPR02MB035; 31:nwu5+3+yEknu06s567za7YJ2nunf8QP/uilDKZvUcGKmk260DsV2U7rst8uq/KRKJSk1jnVKp60OpTaF5TqyBm2M3u2stmtZlAhX128mW6X0q61k1DI6uOpyWEkqzc6itHTipVnVcc2eC6awRrpSmdsyG/jPrwoXJYN8DXIs7KQ0NPn+yADopZsXwYGQmYlrhoI9cgcZy9fulTB2OoH0rw0KdtcuH/ahBWfEBkcp+3N2uu1X7NTX0hVPlIbHlUGig7lVDMRqN9GWuwA23xGO+NZhlGrx39f90jx60iJdCKc=; 20:EST892/hWqcthc3rC+mWTZuqS5omhXiuZWR0/AyeWmhF1t1DOSkaWsTZqgDY6MQ8dvXJkvmPZX6X/s7jidq4qkQA9bkgmPGkPkbzPdOO0ZuwsQwl1Ijadv7S9pFEqJY9LxIEVrSJaHfb8i5YrNsW0nInE9nBzQiMEt7PtgyLs0oERNgFFjbuXUP5tX0YAKFZOeohxw1zOAp2iaf3+7uwmfUrS+VJe5AK5CRUAKzKyTt/R0xxxWos9qliamIKnTc8x28jDvReVGhNIaREo52Lbp2MqXYRKnZ/GZ5TbwUUlHSwjyRymzZSEMJUErPpglC7SNF67MJrFK6FdAs5V8ohOFKzkSvSxqGExX88YU0wlf/2SDpsH4OA98bJg6F8BwPfffx78fdrjVLp3Is6GGJGptEWEk07Sjc3gsnqoxssp/+6cyN+TvO2vMa4LGGA2HOGgA1stG2wvZof1EKc5iXHYZmiMtm9WdURsSAdFdeJjS3grVN9EAi/15dYCr3FYbeh 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:u3+jiMlhA8VNAUa+wSFkki6AjqH+Q0DQB0hvPaz2+YanQoFr2jwTc7DCkEPAhc7R9TUnHFTcBEUcxhnsFIhr/ToLZkwTYapWaQSBtSKFVMNSEzi2guByp5Nd7VcMyX2eBhUij+TFqKZ6WdPQO1P3HiT10XUT/xUFgyAOtDMqF30dX8FIdZJq1SLE+xjL4OOYGVKXDAABkwLM7Y+RLiGU8vNlyXrmQb4/3TXd7wg+maWCmQhx0vpnSurzcqPM+IadHwFiABcVdcjLT7B2sa8X4B1sbPH8CdZJrius5+wyRtsXvOjF8jPw+4qokA57+lCYn+OcaQPhR43ePycQCsgxa9rMUAIMDsNv71qUvjvgLZUqhFhcj5M29oOK2JbKcs5ipMlSzkJrgja63tyPZdv0x6LnfG1ul+G9WJ0A7DODv8odjBW/Lt72L2SoZprBO3Aatif4xZqUjW+STWEvM0DwBN5/qpMQL7RyQycMZbhOVIjnZJ7/Gn6My0PZA+hVOcSY43feoq6qRSHYBqMEdNPtJXuqM/E2crsYOmKLW8P3z0IFLgnj5hKeHI8k0M7MgrGYbQzAVWcKN6GeXtCax9FbposIPpeijkird+VI5bkC070K5WBoc7VlKMbMOcLIo00V1+U8Ccb0O3vlNeZi3yy6juFAj0HCRKrCPdf3DZ3TIzWYqxTFECtlg0TvBJF5HAfl+elc8Htv3LqlmszfHUtERw== X-Forefront-PRVS: 01834E39B7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR02MB035; 23:YS7GLIle16cPILBBamfQCVM37rf5SVWoql0v4pUB59?= =?us-ascii?Q?75YvqWM3xWo+VtKfOdOOyOu2Sv0QP+7OhtHWA9aGqwWt6uNxef8xHbth2cSJ?= =?us-ascii?Q?WOPWNmc6Eoseq29gCIVUtENKvRH6XhtBHWLR/OTUFL2JuvW0aJlSN46DZzAc?= =?us-ascii?Q?nCMpd70QHSKkameM8htb0/bIlwpHQ6vvK4wy1mYgEgGXx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cDHYWpgRr1tfGADuxXXSYSnY+o2k6Rf0yk?= =?us-ascii?Q?nNosvnLvuund8dOzhyX2d2iuM1XyXO?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB035; 6:NxJkIgHKHjQ84cPNfCiQya8FM9CvW/JLpwGL+JFRGdt1sCUWqrInKppxWSC3B8oEegxg1brC0FbU6yTnsWYwxLRWtsVWjptw0uSbS7jly/RxHXZlCE4YhH4lzPTTRD2pO708vzol9a47AiSp4cDi+PNXkrJeZ3/hHnyT1RdzF9RNfVMSvU0qi9UF8yI8qoik+DpLlUCopUdk3AJP6Hzx0kRjZBeHqDI8y/DEXmB3/vFfDD9jLWuR8nEX9c8JeHce07696JiKcD5gY9SRPjFVx3mW0wgTn2UITmNDC13uIFI33E7HQmD3Ks+RHLyaBkBFAYa1f9h9Kh1nCyGLSxxZQyqLXhbCtqe6C9zbQ1nm/1rCXq2A/zeG+0RVTnQrC9lIz9FNnABc7GCq2hZybCfFaoZAtgRS5SJGgwde4STjAb333E2Fe32BuaFjXiTSrTLIeN8SnAGglq2zkioTsM3yiw==; 5:4mwryRNmcYiiJu7+TN6/McDuXgE2TVrqYRSsqF1UmLSk9HKDlyncJq2fiqlAdI/JNQJnUpw/v54ABPCiQZCwPmbLMAH2tpWQcv12bReXGHu6j/LGuqdkZs5iOgB5hEPkigzpS9YlIiLxbLCwq0RU6PWxR5MHgNz7651ihShq06k=; 24:TiYjKooIMl5Nytsw23dJ1ptXsPSb3YT+M0Gt3O82rxb8sDvEt3VRtg/hDKMRpOOa/aK2bOf2voGWxssc324zgT+wTLdA4P302znqbcJgx60= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB035; 7:xuz1ELm8z/2dQxATxC4HLsiVIFjNVb5MOXTNv0hnitUlL8pHi9r/DDzQckbnOyt+TMS52ik3NB6HN6UPUPORwGgjPA2X1xDM8lE52BFKuXSPVTRYcOy4hLj8Zyl29HCVZWPgcV5uEEn+uNTK4kJOZ2GVEBQvT4mX0cDeWaYKYC9/9iedCcmc9mCeSzrKcJkyc8yh7qO6hlKifCIV2GNjc4oyfzDpCimMJqeozwlK5fJ4jmG/SbbicaGVhdejJQ3FzKv8GFxhoUamn/OLLohpBebjI1N8uxB6WU8MwHDnFBPiZrdDZNVHgPtlUyIREGCHJ28N2M/iD/mCoMfD4l3YXEYLovM2tPeCLEiZj/5bh2S80+Q3nHPn3odVMT9HsW5vDxwWDCsrv/B3dkvsX3Hh+cwQVMaKmoMjPq4urENdKdQev9ZPfjrOAZdaXtECqFBJrSpUqBGrKgTa2fU2UDZ8CA== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2017 19:15:57.0375 (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.225]; Helo=[milsmgep14.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;