From patchwork Mon May 29 13:23:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Amrani, Ram" X-Patchwork-Id: 9753217 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 26B0B6038E for ; Mon, 29 May 2017 13:23:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D7272018F for ; Mon, 29 May 2017 13:23:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00DEF204C2; Mon, 29 May 2017 13:23:56 +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 66D8A2018F for ; Mon, 29 May 2017 13:23:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751017AbdE2NXz (ORCPT ); Mon, 29 May 2017 09:23:55 -0400 Received: from mail-cys01nam02on0083.outbound.protection.outlook.com ([104.47.37.83]:28967 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750987AbdE2NXy (ORCPT ); Mon, 29 May 2017 09:23:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=GDxZAQNPVmH7GFpZPT1IXZQZS5LuUTkOADaENZ4DO/Y=; b=ecGHDVHV2lLGs2/ZUumtndi1jZuL83rXBBupizYmyGMexfvez0pEJHbcFyfRQyLvcJtk+LET6diyQMPSUBMsQ54aMJpgLQrmYBU/z5/2/NWxlQfthtbCpEYq7GTS6P3y+J1B7+5ptV9ad1To/2L3pAlz3K+NPJwekaUe2TVUmxU= Received: from CY1PR07CA0038.namprd07.prod.outlook.com (10.166.202.48) by CY1PR0701MB1584.namprd07.prod.outlook.com (10.163.20.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Mon, 29 May 2017 13:23:52 +0000 Received: from BN1AFFO11FD032.protection.gbl (2a01:111:f400:7c10::141) by CY1PR07CA0038.outlook.office365.com (2a01:111:e400:c60a::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Mon, 29 May 2017 13:23:53 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1AFFO11FD032.mail.protection.outlook.com (10.58.52.186) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1075.5 via Frontend Transport; Mon, 29 May 2017 13:23:52 +0000 Received: from lb-tlvb-ramrani.il.qlogic.org (10.185.6.119) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Mon, 29 May 2017 06:23:50 -0700 From: Ram Amrani To: CC: , , , Ram Amrani Subject: [PATCH for-next 2/2] RDMA/qedr: Add 64KB PAGE_SIZE support to user-space queues Date: Mon, 29 May 2017 16:23:11 +0300 Message-ID: <1496064191-11442-3-git-send-email-Ram.Amrani@cavium.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1496064191-11442-1-git-send-email-Ram.Amrani@cavium.com> References: <1496064191-11442-1-git-send-email-Ram.Amrani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39840400002)(39400400002)(39410400002)(39850400002)(39450400003)(2980300002)(428002)(199003)(189002)(9170700003)(6916009)(101416001)(76176999)(50986999)(104016004)(2950100002)(47776003)(6666003)(50226002)(2351001)(86362001)(110136004)(38730400002)(107886003)(105586002)(106466001)(48376002)(50466002)(4326008)(72206003)(189998001)(478600001)(77096006)(81166006)(5660300001)(5003940100001)(2906002)(54906002)(8676002)(356003)(8936002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1584; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD032; 1:1Lt7CTLmwNE4++v2WGF9thxPgw+3C+DcoGAl7l13M0+/u8Bm9Qn4KnCL0Rd6E0FcWfwbbpmJ/fWVap6hW0MIzqmLGV/PvGnB0WTQYZxh+EMtpaRTr34qmtVQiiooWqhtWFF5TJiVeyEmHBqA9Y3W7s0YqP/cTE9UDuEdWFd4C8uuHEcGVTkyA4o8ti9bazTWotoX/nT4Ua7JPOZ8fH1g7xSLdtpMIg0k0HEQW67Mkhi9gsHZz3oLydPUIgYUJcpVK0RL2CR4STmfXwCJygSfUQC+64Je94s3mSXk2kKp9gycqdfDcuU/B2/DLATQfHD0xndcn4/ZcqTCee+cQG/j7bhj0Vw0XqiViuySntYF5qwjaCxpFq+QSIe8At5VhgX34m4sXSdgJ3m1pej33erENXxAttDP7dze4Udi2avnXHPgHSCqXPJdU2dlOdGe0MzElCYQeII0BckprnMAb7GXVfj6HLGQYwTQnXlJqugvQX75SQmFGwluhh6u40cfnqjO X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0701MB1584: X-MS-Office365-Filtering-Correlation-Id: 53ab7071-ae8b-4cbe-cbec-08d4a695f32f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:CY1PR0701MB1584; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1584; 3:IFJOIYRJXvOgDb8gLLYDlFlJKHLsRb/jQZBaU4F6MNm7RVdnUxs7wG0iYq7AG8AkXl8v6Z5i8NfNAoD0ns9RppJoEewx3PjEYnl71sgo5S6xiNmfZreQJg140kWNrRqkeDxmNH5NTzPXdfVUpS3lsiUeHgNESAcYLWHw8pD2bQr/AOmSDdoOvb5OtUBwctpxiTt4FWfJOGWJqdA9LpWG7ZGoAOGS1LFowU/RDQzdRdoqBLt4rqEChz+pty9M9A+zcNFOaQ7cT99ppSRhv5XFMplvBfh5lzLYmERNvDkMHQb7bFuaSuAcU3iQ0VkCEZkBLFf/kiGbWLpWZ+utrNDz9ILYDO+kC6hsfECUVh8UPO3kYBL6aLqGZAEf81he7zf99mHs8TixqSWYKuG4dABNy13vqbmRmEZWcLz0DpkugMj1IkvuxydDNQqSNW+v/qqIxLHBI423gw3Yi+r9CdCxxXMb0F64A0j8NyEpdvvBgsUgjgoUUi9rIpWV6pkWHjhx X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1584; 25:3S5+vp5IK43M5IMkSRoN5RZwLmOHoUYwZxn5+p0WuzYA8ccCxjPA6zF/Do0/P+Yl3SEeXXX7OSB0/h7s4jbeAKBJ97k8l8LqXK69DLS4QjjORxUKevvIMUc2jSSCVJhi+KbzXwiEjEKYK9LMZp9fH6AyYcgE6vKRdMU+TgacxOxIYXlXwx1P8RPEkaznekge36uD5pKuUxnfA7gbhMaMyMtQSH1eoDKSTHVUJjnGHCbpQwOWXdNigjkAnaYR8rLw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-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(13018025)(5005006)(8121501046)(13016025)(100000703073)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(6072148)(100000704073)(100105200095)(100000705073)(100105500095); SRVR:CY1PR0701MB1584; BCL:0; PCL:0; RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095); SRVR:CY1PR0701MB1584; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1584; 4:X5QS68Px1XYqr78VeOqdzrlNqZHs7KEczAh+RxQ4?= =?us-ascii?Q?Y0smD/aKZqo3hzJbfAOzWb8avUEwMdyLZHoz91Ab7rRyHRYhyfTlxWxRHFDg?= =?us-ascii?Q?BFhsBpeuj6scl2LBHNEBAkgfOEDw2Xjoelo5TM3XrHCNhg+CjnUT9jtB3FMC?= =?us-ascii?Q?9iW227Z+HrWoY5F5bq2Rh/WblKTn7zZSbqj/QtpAFLEq7WAwtVXs0m6xWs5F?= =?us-ascii?Q?tuOMoPTqFLn0eMNB656dts/FKzH+8dm4RjhlMyPjojoSbnPh2teY8OnlShGo?= =?us-ascii?Q?siDOGxqKLnka0Y1eFdr31wm7qHjOKcJlb+qIRPmwJAdMDIxsbZt6mFsvEvs9?= =?us-ascii?Q?FU8DWNkmFb+yUseKEsWXv4eFO7DmTkL4ZCigETZfVv+porzG0EL1bK8tUh7r?= =?us-ascii?Q?feFjBspSugYSJWvmyfF3squfC7ZYf7V747rQHyCOVFEB9Tu9G7cuds4JZPxl?= =?us-ascii?Q?rzy+91MC5D2u9UEbUnx/xWItUv/gflPCJyn0M+mk26tQsMhatygtcrJEA1mk?= =?us-ascii?Q?xTy3d4Av8/gZFJiMYr6MQnqTXsnzKeFfPSZYyzxOfK+w3wmN/hJXrWKi7eWo?= =?us-ascii?Q?CuaPJIeGw/DXyTN2Lj6LdBzVbWO6W9cE5aI6RVQKPPPqsy57+e7WcukcW2jR?= =?us-ascii?Q?7oVmSwgvr2vbiv+LCHqsn+rJOlQ8L1jKi8Wi3IWU1eeAwyTrEs+LiKdhjGuA?= =?us-ascii?Q?WszBnBiBwJwczwqmhc0VCR/anW5dnG4axd8zT+hh9X/v1BMhjbBQ0BoBZuCw?= =?us-ascii?Q?VB8Cs+Nts7Np5JaN6xgqYdx1VUP5xCMS7XDm9OZD42L0o3PCb91lP7MoDCqK?= =?us-ascii?Q?+9/ox7EiHpJhl9wQUv3b7nF1kVcYkxvBv62CT1xMlXUAjF0Lv9j3y0e21gHT?= =?us-ascii?Q?j+d3OehfSweUt0yEW4rVRrfrPLxriJ5UK9ZD8vFZJJmBiutadaLk/JkgBcT8?= =?us-ascii?Q?uCOmnso7valt9f9YIii9P/U8Q8/fjlQIUANbsmXwwbkLU5Q09+vP7q2+ktnx?= =?us-ascii?Q?Qku7obEECSovmACZ3MQFOn0hZww2pqDpWDqJSHv+Z3kVgJuFzVaVyhK0R2F6?= =?us-ascii?Q?aqn4mcfsnwKjUuRFqoLEmOJrdY4IrvP6FAUnK7be0bT1pb2PAW+U6VyQojKd?= =?us-ascii?Q?y92QvzSywbNxll90wNqu64qJN7nuGKWuqSmNOb4zITawb5b4TEWcAM7uO5X8?= =?us-ascii?Q?32urKyWeIQuUDjA=3D?= X-Forefront-PRVS: 0322B4EDE1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1584; 23:RELE9k/kVCMO7OYX9yOxlEl91UcEiOnDpQaImRv?= =?us-ascii?Q?NNkSk7HauFd92hN0jKjztMsp1RMVbcQBFuF87dpNCvKqptdgX6UFcASBoO4b?= =?us-ascii?Q?q/m+ZkXmE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eMRS9a6ro7vn6jCUqnFsEJsmd7mnlV99Ff35gjP2qUZ60uieZ1YqmD0bsXKu9NJLfrFO/wrXIZxX3D7mpSO3nUKB9NQ5xFqcmxAFJNL3Fpynpa9cuon0YaJ6d/aLylLAHwhGw1zFL7f7svzifnq9TMDH51+kRxlaAi0blw4pBjNVL9L/tZJnKfYih/X5k+J+L4; 24:rjz0zB9jnmcReOdP1fJ77oIFVutBEKQORf0tbFO9j62/ZewULXlnCWmqDJgXhCNLKWenFzjGaUs8VkVqo8WIqv0HIOjZGxg1qecuEdxG/vs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1584; 7:JejYWu6sd4ODiBqjSF2Cjmkz3J4YJQnOI8JMHbjlljSikdAugZwuRh66/HYvhJkS6DgTA2b60qejtKGXw6GE0KnogyCYeDPhqMcg1Nlllb3+BtyduiMl5zwC0m2Z6Uc/XiUkG7CaGmzsBqAtohbb94zOxYOUOOW9cS6ZDX8Ryu5rjGdYnhlHQzTFsY5CJ4ygqTq+LRKP7eh6H+xbL8GLX8ahKKlb2Wwit36WGtRjQy78pfK7OluH91V9NHOv405ZwTXxSqAUzC3n7yip2/QEkZ1bBchnfPlqW9L+PCSqRzt+xLFIqBSfvAXWWAUdw53kYa7yPRuUyCCGv+6W598qzw== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2017 13:23:52.2984 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1584 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 Add 64KB PAGE_SIZE support to user-space CQ, SQ and RQ queues. De-facto it means that code was added to translate 64KB pages to smaller 4KB pages that the FW can handle. Otherwise, the FW would wrap (or jump to the next page) when reaching 4KB while the user space library will continue on the same large page. Note that MR code remains as is since the FW supports larger pages for MRs. Signed-off-by: Ram Amrani Signed-off-by: Michal Kalderon --- drivers/infiniband/hw/qedr/qedr.h | 4 ++- drivers/infiniband/hw/qedr/verbs.c | 64 ++++++++++++++++++++++---------------- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/drivers/infiniband/hw/qedr/qedr.h b/drivers/infiniband/hw/qedr/qedr.h index bb32e47..b55a961 100644 --- a/drivers/infiniband/hw/qedr/qedr.h +++ b/drivers/infiniband/hw/qedr/qedr.h @@ -57,7 +57,9 @@ #define QEDR_MSG_QP " QP" #define QEDR_MSG_GSI " GSI" -#define QEDR_CQ_MAGIC_NUMBER (0x11223344) +#define QEDR_CQ_MAGIC_NUMBER (0x11223344) + +#define FW_PAGE_SIZE (RDMA_RING_PAGE_SIZE) struct qedr_dev; diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index f3ed4cc..7007450 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -652,14 +652,15 @@ static int qedr_prepare_pbl_tbl(struct qedr_dev *dev, static void qedr_populate_pbls(struct qedr_dev *dev, struct ib_umem *umem, struct qedr_pbl *pbl, - struct qedr_pbl_info *pbl_info) + struct qedr_pbl_info *pbl_info, u32 pg_size) { int shift, pg_cnt, pages, pbe_cnt, total_num_pbes = 0; + u32 fw_pg_cnt, fw_pg_per_umem_pg; struct qedr_pbl *pbl_tbl; struct scatterlist *sg; struct regpair *pbe; + u64 pg_addr; int entry; - u32 addr; if (!pbl_info->num_pbes) return; @@ -682,29 +683,35 @@ static void qedr_populate_pbls(struct qedr_dev *dev, struct ib_umem *umem, shift = ilog2(umem->page_size); + fw_pg_per_umem_pg = umem->page_size / pg_size; + for_each_sg(umem->sg_head.sgl, sg, umem->nmap, entry) { pages = sg_dma_len(sg) >> shift; + pg_addr = sg_dma_address(sg); for (pg_cnt = 0; pg_cnt < pages; pg_cnt++) { - /* store the page address in pbe */ - pbe->lo = cpu_to_le32(sg_dma_address(sg) + - umem->page_size * pg_cnt); - addr = upper_32_bits(sg_dma_address(sg) + - umem->page_size * pg_cnt); - pbe->hi = cpu_to_le32(addr); - pbe_cnt++; - total_num_pbes++; - pbe++; - - if (total_num_pbes == pbl_info->num_pbes) - return; - - /* If the given pbl is full storing the pbes, - * move to next pbl. - */ - if (pbe_cnt == (pbl_info->pbl_size / sizeof(u64))) { - pbl_tbl++; - pbe = (struct regpair *)pbl_tbl->va; - pbe_cnt = 0; + for (fw_pg_cnt = 0; fw_pg_cnt < fw_pg_per_umem_pg;) { + pbe->lo = cpu_to_le32(pg_addr); + pbe->hi = cpu_to_le32(upper_32_bits(pg_addr)); + + pg_addr += pg_size; + pbe_cnt++; + total_num_pbes++; + pbe++; + + if (total_num_pbes == pbl_info->num_pbes) + return; + + /* If the given pbl is full storing the pbes, + * move to next pbl. + */ + if (pbe_cnt == + (pbl_info->pbl_size / sizeof(u64))) { + pbl_tbl++; + pbe = (struct regpair *)pbl_tbl->va; + pbe_cnt = 0; + } + + fw_pg_cnt++; } } } @@ -753,7 +760,7 @@ static inline int qedr_init_user_queue(struct ib_ucontext *ib_ctx, u64 buf_addr, size_t buf_len, int access, int dmasync) { - int page_cnt; + u32 fw_pages; int rc; q->buf_addr = buf_addr; @@ -765,8 +772,10 @@ static inline int qedr_init_user_queue(struct ib_ucontext *ib_ctx, return PTR_ERR(q->umem); } - page_cnt = ib_umem_page_count(q->umem); - rc = qedr_prepare_pbl_tbl(dev, &q->pbl_info, page_cnt, 0); + fw_pages = ib_umem_page_count(q->umem) * + (q->umem->page_size / FW_PAGE_SIZE); + + rc = qedr_prepare_pbl_tbl(dev, &q->pbl_info, fw_pages, 0); if (rc) goto err0; @@ -776,7 +785,8 @@ static inline int qedr_init_user_queue(struct ib_ucontext *ib_ctx, goto err0; } - qedr_populate_pbls(dev, q->umem, q->pbl_tbl, &q->pbl_info); + qedr_populate_pbls(dev, q->umem, q->pbl_tbl, &q->pbl_info, + FW_PAGE_SIZE); return 0; @@ -2168,7 +2178,7 @@ struct ib_mr *qedr_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 len, goto err1; qedr_populate_pbls(dev, mr->umem, mr->info.pbl_table, - &mr->info.pbl_info); + &mr->info.pbl_info, mr->umem->page_size); rc = dev->ops->rdma_alloc_tid(dev->rdma_ctx, &mr->hw_mr.itid); if (rc) {