From patchwork Tue Jun 28 11:26:58 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: 9202971 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 48C106075F for ; Tue, 28 Jun 2016 11:27:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39076271FD for ; Tue, 28 Jun 2016 11:27:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DB28285BE; Tue, 28 Jun 2016 11:27: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 90AB8271FD for ; Tue, 28 Jun 2016 11:27:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751331AbcF1L1h (ORCPT ); Tue, 28 Jun 2016 07:27:37 -0400 Received: from mail-bl2on0082.outbound.protection.outlook.com ([65.55.169.82]:1296 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751956AbcF1L1f (ORCPT ); Tue, 28 Jun 2016 07:27:35 -0400 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=5Osbau2MBZjsgTxvcfxVBlquZti5i5iYRXLssIZY5ps=; b=BmiQzMDEWnJUCYjGgy65UgaIafK/lb3v101HEMGtd/+ZwMUDzGsCirlRj4XVfVzS2ON53m5ZWl4jwUApsU6MkAMjhojMoAmkWE2KmruwdB5sBnuNjwne/+lWwCRcOy5uUVrtUoWxgISoavXrLughSKanLXS16zQLmX4pV8fecl0= Received: from BY2PR02CA0087.namprd02.prod.outlook.com (10.242.32.45) by BLUPR02MB501.namprd02.prod.outlook.com (10.141.82.13) with Microsoft SMTP Server (TLS) id 15.1.523.12; Tue, 28 Jun 2016 11:27:08 +0000 Received: from BN1AFFO11FD023.protection.gbl (2a01:111:f400:7c10::188) by BY2PR02CA0087.outlook.office365.com (2a01:111:e400:2c2a::45) with Microsoft SMTP Server (TLS) id 15.1.523.12 via Frontend Transport; Tue, 28 Jun 2016 11:27:06 +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 BN1AFFO11FD023.mail.protection.outlook.com (10.58.52.83) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Tue, 28 Jun 2016 11:27:05 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [172.22.12.162]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id D5.DC.03838.AED52775; Tue, 28 Jun 2016 04:22:21 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.279.2; Tue, 28 Jun 2016 04:27:01 -0700 X-AuditID: ac160c71-a17ff70000000efe-5d-57725deadb96 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 95.E5.03875.30F52775; Tue, 28 Jun 2016 04:27:01 -0700 (PDT) Subject: [PATCH 3/5] IB/isert: Limit the number of SG elements per work request To: Doug Ledford References: <419391ba-0c39-11ce-f249-84b428dc73d5@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , "Nicholas A. Bellinger" , Parav Pandit , Laurence Oberman , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <885f39a6-9d75-9999-d582-e403f072bec1@sandisk.com> Date: Tue, 28 Jun 2016 13:26:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <419391ba-0c39-11ce-f249-84b428dc73d5@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeLIzCtJLcpLzFFi42JZI8azSPdtbFG4wfwDKhYvz39gtVi5+iiT xbNDvSwW5z+8YrJoW32G0aLxkoHFutfvWRzYPXbOusvucf7eRhaP+9uPMHnsvtnA5vF+31U2 j8+b5ALYorhsUlJzMstSi/TtErgyfn5tYCo4Llax788NpgbGJuEuRk4OCQETiXWNG1i6GLk4 hATmMkncv7iQCcLZwShxc80EJpiqGZ9fs0EkljJKTL55kRUkISwQKNF9bC6YLSKgJrHp1SJ2 EFtIwE7iTdt3ZpAGZoFmJoldv8+BTWITMJL49n4mC4jNC1R0/+kLoGYODhYBVYm1t0JAwqIC ERK9v5ZAlQhKnJz5BMzmFLCXOHz6JRtIObOApsT6XfogYWYBeYntb+cwQ9x5llWi+6IbxAnq EieXzGeawCg8C8mkWQjds5B0L2BkXsUolpuZU5ybnlpgaKJXnJiXklmcrZecn7uJERI3hTsY X9/2PsQowMGoxMO7o64wXIg1say4MvcQowQHs5II7ytg1AnxpiRWVqUW5ccXleakFh9ilOZg URLnvRj9MUxIID2xJDU7NbUgtQgmy8TBKdXAuDCWtz6bXdGVz2XVqfaFDs7HFPmU/gp9lG+v FXtzzsW2zrYh+CPzy6mnaj0qttVlXvFk33Vn8jvd/+fs79gnTSpLvJ6waxdjSeZvdp0Q4cxW 8bN6TH/t9i7ccVNxatGXfVGN9jc3eOW1ZzyKsbT5P8/j4lGP4OQ9ofLv/7/SX5H5pvpRRlKG EktxRqKhFnNRcSIA284DhZcCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNJMWRmVeSWpSXmKPExsXCtZEjRZc1vijc4NY/SYuX5z+wWqxcfZTJ 4tmhXhaL8x9eMVm0rT7DaNF4ycBi3ev3LA7sHjtn3WX3OH9vI4vH/e1HmDx232xg83i/7yqb x+dNcgFsUVw2Kak5mWWpRfp2CVwZP782MBUcF6vY9+cGUwNjk3AXIyeHhICJxIzPr9m6GLk4 hAQWM0r8m7+NBSQhLBAo0X1sLiuILSKgJrHp1SJ2EFtIwE7iTdt3ZhCbWaCVSaL9qwyIzSZg JPHt/UywXl6gmvtPXwD1cnCwCKhKrL0VAhIWFYiQ6P21BKpEUOLkzCdgNqeAvcTh0y/ZIEaq S/yZdwlqvLzE9rdzmCcw8s1C0jILSdksJGULGJlXMYrlZuYU56ZnFhga6RUn5qVkFmfrJefn bmIEBy9n1A7G6xPNDzEycXBKNTD2J1x0CvVJXZ+/QPZhc1rzJM1bQnPLutOk3n+MEZg7OXH9 u6/iP9sYihbsNH79r6tYMvv+fZG9bMfuNX+SymkSLVkQtPaGg16T1EmhjJ68rQfbNvwNWPrz SXXMNwbHLc2lq/89u2hSECoR9rh0uXbe00Q1zdsptYuKUpl4VIp/yKYu78uZUqXEUpyRaKjF XFScCADObYa1DgIAAA== 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)(2980300002)(438002)(199003)(52084003)(189002)(11100500001)(305945005)(19580405001)(68736007)(87936001)(69596002)(64126003)(19580395003)(110136002)(47776003)(92566002)(31696002)(106466001)(83506001)(8936002)(33646002)(6806005)(189998001)(97736004)(4001350100001)(77096005)(65956001)(53416004)(7846002)(5003600100003)(7696003)(31686004)(65806001)(2906002)(23676002)(81166006)(8676002)(2270400002)(81156014)(586003)(229853001)(2950100001)(54356999)(36756003)(50986999)(4326007)(230700001)(50466002)(86362001)(76176999)(356003)(65826006); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB501; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD023; 1:TfYHUQ4FTVGFn9YHRt4vAsp/4v0W6sPsGYwAep3CeUzrAkxoE6QQZNeumC0jgtjlzn1dFeOtev2GjfwA/debsI2H3bGumjDQ9pErufJ+YQum2e+3CFu9YW32RUmzSA5cHjiffqfgdPOa1lq/FsUTnLVzr6re10mHPxQKKZgRbGvQx/ZI4R3EowTv+/plF4qhMvUsOdZX3DE63RlN5oCSAj8Y0CZb0WKMGCV2l88ib5yCUgo97FvOJBMYNs22MYCVCW6SAotfU44OD2JkCieFc2Vz2A6Z1bO/H8yo8WcKmvy/CMFosdTV8NN4H6SjbQOXY9u8toBlXhHK9F7sx/ukSwBCunltzfEsNDV9O1Qm+At1hjvVYYv/o7d8JkH0ixzqwi7C+rvIZ6TzzlgcI2X13XIX42GOE0LWSh1hBB80C1R3aWiGvPA4Ji/wiPLksnScddrFPEhqURWeKCdH2/JmIZapiNDXbxkbelFkJXFqFpc= X-MS-Office365-Filtering-Correlation-Id: 7931f120-7d6c-4a57-1e77-08d39f4722cb X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB501; 2:NGAwL3ClYfqrBFJkn+yavI4W8/T2ooTzBJar6qACq3jfJCPjim4LpH6WgEYhLU+qKALotSZGR0F7mZSZD4/tDPAjjBGNtL6aMlr5fE19Npp6oBphQlW9HPEfKCEePFPsAc0mp8lsRP2fHG2G9Wj4vtN+CT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tzsEkzir4SIZnUupY8e/b9LQR5s671CYR6GAIJ0sUrp3roTcUX50v9GXZzEWIZAoGeFw/gQynNRrbIofhjeD4Q0LZHdUuwpmuiFqe4zXtI+Q6hP0jo0bHxZur/D2OawlbrcxyOjGMqskGpMyCExfMr+oHwK64Tkf2tXlUDvHDJQEJ3vF3uHBvWST6tD X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB501; 20:1zit3gcecCohMDQOw6NVms9sIgnGxz1gcSAo/WO54IDSfmLL/ScAMOZY1f0AsNlnHsPh/MP6Sz5yWUrkc2KrEQsa9alEVKSrp6fX7EK0iACNJLnrxyXKmlvZqUx9p4ZZl4fY5ujVVfiK6UxQrvf2GxwtgM20Sx7Qy02s4Jvftkhdk8NrsbilFkd5cAphPkzKNHcdlP940rosIOTw4DY+Dq+9uesJjoZtKAS2FudZYA+2HtvD5MGpqYqENwRbkQuhM4PnuOT49sGawy0u21g6DqpD2aEPzSMRay3SAxOLUeC7CcfOZ89WDh6IJJ/k3skBDNxtF3byr04ueaqE3VLV8xdo3sblfL1RETOUgY6M2s3lHDsxt+jUx4AXsNiVTsIhMDSizkY6NTmV2POJTz6xzD+9z7eDS+8A314fvsxD/eacsvUH2EZe4IWhyUs09vleflMkszsfKnj2aPtob+KFg7JziEgKNtxDeRc1kM/2D5oCQXhJUk0TEScozXuYI8bD X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(131327999870524)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13018025)(13016025)(10201501046)(3002001)(6055026); SRVR:BLUPR02MB501; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB501; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB501; 4:3ZOdUYS3sSMHKzo6EfXMBdJLPWtNyn2RlNb6lgiygt6AI2hDET/zv8ZirB44KYf/xzvxACImifAgVCjvv3BfBGeNGqUvhUMghZ2ipggBAa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PA/HZyPLDotiX5nvQPmaMji+vYpQ7M8yWr4srAd9+lXZzV5QY8CKsO8d+Jcy13VZg/KP/m0dpEWJQ=; 7:nzDqf5dZsyVuGK1QU/HsNEWUnT4efrtI+iW/5PV/cSgrcsraTw/8dJoE0WEpnrYIy/VfyrFWmxtkiDBHWyK6JHbSVtJmjAeCtPAltyMnsehZuzY90NKBIzB5ktE2z4HaeJkDJiv8NsisCPkmjA2FilP/wv5FKKKRig+kP/7Ot274tzt/Gs+BSerxzRGCMGPYwpOtfgC8uiOy7ZwsCwGa/ZigprKtKgwaps5H+BXiBxMxLoMAtz8xc/4OSwfT0E4tNLyI7z2Riu9/kjm14Xdwww== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB501; 20:020w5t93cdA3y/sZu7J5euil80hjgphIgsF60V4B5kdKmUXLTwNhTtvUVwden2lVWFVb2u4ve/XD6lgosXKamKltysD9PZUWvdXvUP7VahZKDVmeebV9SzYI8zwCgTgTL+JMsiQRnTssgbjE4HDWfnFNonmXkKG5qrJJM3MfsgFR4v5OOYZxClVVMr0f0Qle6ZIS/b1wScNKX+ghizJjuoGhotvK4xznpKH1wB3e+If4s5yHTKYzlhzEHtu4hg/x X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2016 11:27:05.8051 (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: BLUPR02MB501 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 Limit the number of SG elements per work request to what the queue pair supports. Fixes: b99f8e4d7bcd ("IB/srpt: convert to the generic RDMA READ/WRITE API") Signed-off-by: Bart Van Assche Cc: #v4.7+ Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Nicholas Bellinger Cc: Parav Pandit Cc: Laurence Oberman --- drivers/infiniband/ulp/isert/ib_isert.c | 10 +++++----- drivers/infiniband/ulp/isert/ib_isert.h | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 06a5671..b5d6556 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -137,8 +137,6 @@ isert_create_qp(struct isert_conn *isert_conn, attr.cap.max_recv_wr = ISERT_QP_MAX_RECV_DTOS + 1; attr.cap.max_rdma_ctxs = ISCSI_DEF_XMIT_CMDS_MAX; attr.cap.max_send_sge = device->ib_device->attrs.max_sge; - isert_conn->max_sge = min(device->ib_device->attrs.max_sge, - device->ib_device->attrs.max_sge_rd); attr.cap.max_recv_sge = 1; attr.sq_sig_type = IB_SIGNAL_REQ_WR; attr.qp_type = IB_QPT_RC; @@ -151,6 +149,9 @@ isert_create_qp(struct isert_conn *isert_conn, return ERR_PTR(ret); } + isert_conn->max_send_sge = attr.cap.max_send_sge; + isert_conn->max_recv_sge = attr.cap.max_recv_sge; + return cma_id->qp; } @@ -2075,7 +2076,6 @@ static int isert_rdma_rw_ctx_post(struct isert_cmd *cmd, struct isert_conn *conn, struct ib_cqe *cqe, struct ib_send_wr *chain_wr) { - struct ib_device *dev = conn->device->ib_device; struct se_cmd *se_cmd = &cmd->iscsi_cmd->se_cmd; enum dma_data_direction dir = target_reverse_dma_direction(se_cmd); u8 port_num = conn->cm_id->port_num; @@ -2087,12 +2087,12 @@ isert_rdma_rw_ctx_post(struct isert_cmd *cmd, struct isert_conn *conn, addr = cmd->write_va; rkey = cmd->write_stag; offset = cmd->iscsi_cmd->write_data_done; - max_sge = dev->attrs.max_sge_rd; + max_sge = conn->max_recv_sge; } else { addr = cmd->read_va; rkey = cmd->read_stag; offset = 0; - max_sge = dev->attrs.max_sge; + max_sge = conn->max_send_sge; } if (isert_prot_cmd(conn, se_cmd)) { diff --git a/drivers/infiniband/ulp/isert/ib_isert.h b/drivers/infiniband/ulp/isert/ib_isert.h index e512ba9..ccd6927 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.h +++ b/drivers/infiniband/ulp/isert/ib_isert.h @@ -138,7 +138,8 @@ struct isert_conn { u32 responder_resources; u32 initiator_depth; bool pi_support; - u32 max_sge; + u32 max_send_sge; + u32 max_recv_sge; struct iser_rx_desc *login_req_buf; char *login_rsp_buf; u64 login_req_dma;