From patchwork Tue Jul 19 16:22:29 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: 9237835 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 03BB9602F0 for ; Tue, 19 Jul 2016 16:36:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E87C026A4D for ; Tue, 19 Jul 2016 16:36:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD53E2711E; Tue, 19 Jul 2016 16:36:58 +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 3258426A4D for ; Tue, 19 Jul 2016 16:36:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753355AbcGSQg5 (ORCPT ); Tue, 19 Jul 2016 12:36:57 -0400 Received: from mail-sn1nam01on0040.outbound.protection.outlook.com ([104.47.32.40]:32991 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753324AbcGSQgz (ORCPT ); Tue, 19 Jul 2016 12:36:55 -0400 X-Greylist: delayed 859 seconds by postgrey-1.27 at vger.kernel.org; Tue, 19 Jul 2016 12:36:55 EDT 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=3zmqka+erzUktYCNXjmtPayOqJpLkDXOar+Fh+EBwwo=; b=opKUra1WWMBboNPzovCl+S1b0VCfiQe0tWOTJ8bVKhE3oa1XE7w/J+oIgWl917iEtl25eGCDFFCV+uMzQ2LWrEkHfgA0i86G7QbN4ki6q+rpI9ZNJN9+2AHotdeGlypYUUdekzkeAWe06p/nhuDK/MisHEfjd8pcOf3k0zn8hsE= Received: from BY2PR02CA0023.namprd02.prod.outlook.com (10.141.216.13) by DM2PR02MB462.namprd02.prod.outlook.com (10.141.88.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.544.10; Tue, 19 Jul 2016 16:22:34 +0000 Received: from BN1BFFO11FD002.protection.gbl (2a01:111:f400:7c10::1:112) by BY2PR02CA0023.outlook.office365.com (2a01:111:e400:2c40::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.544.10 via Frontend Transport; Tue, 19 Jul 2016 16:22:33 +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 BN1BFFO11FD002.mail.protection.outlook.com (10.58.144.65) with Microsoft SMTP Server (TLS) id 15.1.534.7 via Frontend Transport; Tue, 19 Jul 2016 16:22:32 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [172.22.12.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 AE.23.03698.1725E875; Tue, 19 Jul 2016 09:16:50 -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.301.0; Tue, 19 Jul 2016 09:22:29 -0700 X-AuditID: ac160c71-20b1198000000e72-d7-578e527117f1 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 6E.AC.03606.5C35E875; Tue, 19 Jul 2016 09:22:29 -0700 (PDT) Subject: [PATCH v3 3/5] IB/srpt: Limit the number of SG elements per work request To: Doug Ledford References: <8fb358c3-3504-02ca-fcb8-1624f28be1b0@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , "Steve Wise" , Parav Pandit , Laurence Oberman , "Nicholas A. Bellinger" , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <2599c210-c86e-b292-15e4-2bc042ad1453@sandisk.com> Date: Tue, 19 Jul 2016 09:22:29 -0700 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: <8fb358c3-3504-02ca-fcb8-1624f28be1b0@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeLIzCtJLcpLzFFi42JZI8azSLcoqC/coP82k8XL8x9YLVauPspk 8exQL4vF+Q+vmCzaVp9htGi8ZGCx7vV7Fot/a7tZHDg8ds66y+5x/t5GFo/7248weey+2cDm 8ej5OUaP9/uusnl83iQXwB7FZZOSmpNZllqkb5fAlXFn01qmgj/8Fb3XkxoYr/N2MXJySAiY SGz61M/cxcjFISSwlEni2uf9TBDODkaJeTuusHUxcoBVfV8pBFXEKLHxRQczSLewQLDEudbf YLaIgJrEpleL2EHqhQTsJK4+LQSpZxZYzyTxZ9ltFpAaNgEjiW/vZ4LZvEA1b3YvYwOxWQRU Jf5snMEEYosKREj0/loCVSMocXLmEzCbU8BeonXvR7B7mAU0Jdbv0gcJMwvIS2x/OwfsAQmB u6wS01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AgAA 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)(189002)(52084003)(53416004)(4001350100001)(54356999)(86362001)(33646002)(586003)(81156014)(81166006)(19580405001)(5003600100003)(7846002)(6806005)(8936002)(189998001)(69596002)(2270400002)(83506001)(110136002)(64126003)(97736004)(305945005)(68736007)(230700001)(7696003)(356003)(2906002)(19580395003)(8676002)(77096005)(2950100001)(31686004)(47776003)(65956001)(65806001)(4326007)(36756003)(106466001)(31696002)(50986999)(76176999)(23676002)(229853001)(11100500001)(87936001)(50466002)(92566002)(65826006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR02MB462; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD002; 1:R5wjxVbNy0mBBhNZG4fg9CBgyjvrWsa+O5DCCx1cIY0twbo70J+fq98t+Hlno0Ddcbymj0B56Erulu9M2yO5r2ufLG1YU6gMBoA0JllcQF9i7OllfJpZCReHdTWMOuwDb9JGUfMfwTUmXZCqxYZr57f91ZBrUW7Ss1/8p/JBBlKMHQI/Fq/jqhwLlJSjv8cRrLU+mKU95Z9PigzwM7SFdk05lsyuW909peZUOWsJH9UFMBg9UHfcQO3XWhhV1r6U5WKpDj8cJkr5td44IoOZC19AV1ZzdR+HMslkOSsozya4gVk8+WnLmqmUlyikNzb0YFHSqX6yjWuCYa/xg42XnZPpC3/JozxpxuKC7h7i05zG2nM7yjPkWb5GwwTCLdm5QvZKRLYcFsklMy8rFkfALmR0NEdmTymNKnkp42QBALmfzSWkiNpCJfF7cc12+1SVohO1rbZ//PsWM3E9cs05UfbNo7lH1SlSbOMZhpB3cyY= X-MS-Office365-Filtering-Correlation-Id: fa37c37b-52ae-4def-e0a5-08d3aff0e333 X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB462; 2:4PYVQBN1JghZrEbi0OLcQjzfaFHuac+bpSFtdcBupTiTSKEMjflreElFh55K+aUFWCpAoT6nZVQ53tvqJo0DXWIJ/DETlJhvY1GUFmmDZmvyCXpQC1kgfRtOl/QXxiKFmbS5Q5erowIVKFKKc7aR46c5so9r5NcUd2jDED3q4g3jkWbOKHt8l3sTJyV0vgJZ; 3:VNbi981Ms614Nv0iSpRJAg3rlyhlZGBXGhsHLUZkTijmypVy3XbfWOYaviYEgZkuXYGCVePvpIYqcTn1SOk0lQbr9SkoQ9Q+Pq/3guaZTceERQPYUq6NNIupGT0kxPMbCX2+pBnR5bm/Zn8TDYUTdxp055TtHsVYO/iaigoOsdUsmIhY7P3u7ZSEisysQoPzNjtjCtdnujO1CbdtDGYLKwIwWGBwU0lQRaM80xMnx7lfypemzcp8mFRp9Wq7jreG8F6VNUvliAe1hvkrtgZdWA==; 25:dhY8a4omT59RxqGl7t3tbGs5eTWwsCQilHTTt1AYz1SdGWFOSBNWiJePgskVgnDH6iQdMKjWZi1shOz1zNZuCULk+vbvGUNLVIw93hk2P4c0YiOXsL24ol9sJnpthIDmb6dDTP0AcFlpgfOEy3EoCknKCPmOE7pOJHuL97DQZhlK9o96AtrLM1wUKK/m7e+tKG9y1cfFlRMjFglGdokPb9cHzhhG+gggi+nCn+FLe6Jw9zygIXznOOJYHxRb8Hnqp2pGgDWpYh0Ef3lcVWSf8VZ7EmBwqe8WrEcoFepkBKoCBqXNxrXD6StoO/mgilW0DZE3RPRVb3/0LzKwk4BMb0qB3QoSkPVx12RMZTxFoyimCPnh6q1Ufhmx4wK6DRJ/EMkPpvEv7Bc42PT2QeGdSSEgSioF2EkQnOKD18yiH/s= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:DM2PR02MB462; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB462; 31:0REQ/c3qzjyxPlonErYCIwtfE4olo+fT5RqEQ0scLhSNd2E/WyNw6PwydG/cvruU3aM7l95LCwXp905PP7hIUVdfop2+cVc3h4r6i5MjTz6jFQqzh8yqS+FFuCUD5BzvkjwV79nPl3UVL/Weku2r2Kah+YRQgwdwxXwDGuuF9UR1fgpQn1Pe21vmdndQjzi0QMiGWb0+ysK/1z4iNV2Ahg==; 20:Tujr6AcEwFsapt3/CKBaWygSSLM0Hu0nEXDfNkhU1k6VMqvaJ+R41wEX0X7bSoMTUQN8Yft6g3xtQAIWta3rTXutBl23ZL1UI5pDzWUtGO6BVVDlMm17VwEvaOfQF3+aQXdxoNj9eFl7jw8TW6t8BtZiEj0qigiVrozYJQD15dORwvd4fqsuHOn0sp68U9Fe4Vkiv+gLnie6EEKhksfAz0lID7kgr3M1ZAcWjyEHTis5CJvzLoQVXGgfQPgGfufzj/pw1yPcIyotNhcBClMG9OMA4QAv7Zs7+DVUpm1kmY2NQYjU93wM3FP+ial79ThCB3iM87glAdmRhcfUHj1tABqeOnaAAkJAw9RsxYfnz/DYdZNCfBwAMBWZ/4471enYffrrN8N5YvyzT501Ha+5WkZHcZ4WFoS/58BxqdiopbXBkFz6jfxtN11GneHzjGABt2VCYHmiPb7ln7FJOwzxV1CUxRVT6Ebxd79AJW//9hlYDzFacBl6FwW82RyYDIVk 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)(13016025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:DM2PR02MB462; BCL:0; PCL:0; RULEID:; SRVR:DM2PR02MB462; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB462; 4:40PT2WjsR0MMylWjfZ6fa3Mu+Ce5YfW65W/cTPOZO95vYsz60yPkGxDynXibSa+mUeh6oL80kh3vSZwap4OXkF6yh0XEkdyO8XhufWijgs9Ry/KnrD1rxXi48dNVQEHNTTIzRobf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P6wFTjdVFeuhVtdtwt7yVBIfdscKWXcBXzDkTomw2o=; 7:j1dKuDr6w+3T/yP0q0u4tne5dW2UDAdlR5XMtAldSgmRyzQfE3SU9flKiO1K75yL8zOa+R4rCBSJI39IOMoJwIO+oEkd4u45GkJV48nc/vjFOq1/1yCQSeS+gkQnFEO1afWeNAw/tByTGAjXXdR7lAAF4lSkrBJkbsGccREpVl7T0fQM1E2k88zGCo4D1Xn4xixILKwfORhhXxDUTVmInznR6rqIyBwppG79HU7FH40IGmMjR8G3JUH1T9FNn+U2 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB462; 20:nDyDqcJDFpAI76h6sZwTieI0uV0u9r5odsY+r/TNNl2mvXgcUDBt9vSEDM/2+fqN6y1HI6StO52L2mwkWCuOf54F9su6Q9gOc8C4A0boQ/+GIyCO5nYR+zT4Mlv38kWFEZqkyQ2X/TYX0B9wW//vFomy5BdgvHJCtfkq7SYIfAIuXHXT7fzqAndGlRXcTeCDZ9B2Y7eOJGnSulVkF6MS3I8NQ8A+p7oL0e51hXOWfCPVhKqSdGlETzGjCkx1VeqK X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2016 16:22:32.0411 (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: DM2PR02MB462 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 HCA and the queue pair support. Fixes: 34693573fde0 ("IB/srpt: Reduce QP buffer size") Reported-by: Parav Pandit Signed-off-by: Bart Van Assche Cc: #v4.7+ Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Steve Wise Cc: Parav Pandit Cc: Nicholas Bellinger Cc: Laurence Oberman --- drivers/infiniband/ulp/srpt/ib_srpt.c | 3 ++- drivers/infiniband/ulp/srpt/ib_srpt.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 4a41556..9a3b954 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1601,6 +1601,7 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch) struct ib_qp_init_attr *qp_init; struct srpt_port *sport = ch->sport; struct srpt_device *sdev = sport->sdev; + const struct ib_device_attr *attrs = &sdev->device->attrs; u32 srp_sq_size = sport->port_attrib.srp_sq_size; int ret; @@ -1638,7 +1639,7 @@ retry: */ qp_init->cap.max_send_wr = srp_sq_size / 2; qp_init->cap.max_rdma_ctxs = srp_sq_size / 2; - qp_init->cap.max_send_sge = SRPT_DEF_SG_PER_WQE; + qp_init->cap.max_send_sge = min(attrs->max_sge, SRPT_MAX_SG_PER_WQE); qp_init->port_num = ch->sport->port; ch->qp = ib_create_qp(sdev->pd, qp_init); diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.h b/drivers/infiniband/ulp/srpt/ib_srpt.h index 3890304..d444f8d 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.h +++ b/drivers/infiniband/ulp/srpt/ib_srpt.h @@ -106,7 +106,7 @@ enum { SRP_LOGIN_RSP_MULTICHAN_MAINTAINED = 0x2, SRPT_DEF_SG_TABLESIZE = 128, - SRPT_DEF_SG_PER_WQE = 16, + SRPT_MAX_SG_PER_WQE = 16, MIN_SRPT_SQ_SIZE = 16, DEF_SRPT_SQ_SIZE = 4096,