From patchwork Mon Jun 26 18:07:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 9810269 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 9E15E60329 for ; Mon, 26 Jun 2017 18:15:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D5B6285DA for ; Mon, 26 Jun 2017 18:15:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91C94285ED; Mon, 26 Jun 2017 18:15:37 +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 8DE43285DA for ; Mon, 26 Jun 2017 18:15:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751427AbdFZSPe (ORCPT ); Mon, 26 Jun 2017 14:15:34 -0400 Received: from mail-sn1nam02on0067.outbound.protection.outlook.com ([104.47.36.67]:46048 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751428AbdFZSPc (ORCPT ); Mon, 26 Jun 2017 14:15:32 -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=2OwdRnKlgqf6eMOgorCUXWuyajL7WGPzXo9Ekb+flWI=; b=QbssBuEl5xuapDaVDs4XdGuoeiD193+r894gBKkPdJWPbzoZ+TZrufi/8o6jZYmnuDVh8+nuJXhtAGZLC9nCfw9ne1vqdlm13GWHsvMt1KaoI0covZGGN+GDuOtTOxP6xqf51PjA8XKnX7ee+jq+oQPjHBOwyyJkZ4MhwJF9GmY= Received: from SN1PR0701CA0045.namprd07.prod.outlook.com (10.163.126.13) by BLUPR0701MB1571.namprd07.prod.outlook.com (10.163.84.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Mon, 26 Jun 2017 18:15:29 +0000 Received: from BY2FFO11OLC003.protection.gbl (2a01:111:f400:7c0c::151) by SN1PR0701CA0045.outlook.office365.com (2a01:111:e400:52fd::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15 via Frontend Transport; Mon, 26 Jun 2017 18:15:28 +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 BY2FFO11OLC003.mail.protection.outlook.com (10.1.15.183) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1199.9 via Frontend Transport; Mon, 26 Jun 2017 18:15:28 +0000 Received: from lb-tlvb-michal.il.qlogic.com.com (10.185.6.89) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Mon, 26 Jun 2017 11:15:12 -0700 From: Michal Kalderon To: , , , , , , , CC: Michal Kalderon , Ram Amrani , Ariel Elior Subject: [RFC 17/19] RDMA/qedr: Add iWARP connection management qp related callbacks Date: Mon, 26 Jun 2017 21:07:07 +0300 Message-ID: <1498500429-22557-18-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1498500429-22557-1-git-send-email-Michal.Kalderon@cavium.com> References: <1498500429-22557-1-git-send-email-Michal.Kalderon@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)(39450400003)(39850400002)(39410400002)(39400400002)(39840400002)(2980300002)(428002)(189002)(199003)(9170700003)(356003)(72206003)(4326008)(54906002)(50986999)(76176999)(101416001)(478600001)(105586002)(5003940100001)(50226002)(36756003)(106466001)(47776003)(107886003)(38730400002)(2201001)(50466002)(81166006)(8936002)(48376002)(8676002)(575784001)(77096006)(86362001)(305945005)(2906002)(5660300001)(6666003)(189998001)(2950100002)(104016004); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1571; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC003; 1:hSyr47Ygek2XkNpbTpeUVxDBvfmKnQEu8pReZiYckpju+q75PI/Np8Gpulw4j6A8M5NbBavD9kFaYDHfpiMDZyvOuaYfdVJb+r6uHPFTMI2RQRk35bzXq8VpDP5PYups5Pvcb0JDOxIo0Xycr69gKey4yLdNvHzc+vliiqZLwhEL7aanRmhrPtX07lgIavwKSWfHI0ysuRrjHpiVT3vsXSc/ZKiE9QZh2gdTSuocF8EhFRKciHzwwvRkOcw95zaoKJFr4S9mBTuJ4a0/TWf+meyg8H34WwpncAF4WphxyKz7tJS09G723bIoJ8fhTPLquYHsMAZ2PaYktb9In3dxCND95oOn5emetE8Nb4KtpUH62Y/je9j8goZ08lp6y3iQtFDd4Bs3rSEKLs2mjzP9xPJ/+ZsuxxO3eZwnTTWzN0j6n5iV9yjhINU7qVgywP4hx6DxikY/gyW7RoRljxj6igguBYDyOf/QPsur+SgnlvdtUdEkYFNRgsa1pfPmYkDMv29MHKmnAR7reLOOpZGw2RpV+oWJ/FOPB/OwRFNuqbc61iHQiRYvRzT3IRDxtxwrOcBQlZebbHoblxqYFUpGyURgDSPzDDLnzACbrc32+r4pC0wzMbGOB+dYAOUoSbMmuOxPW8Kgw0PZkAtuBFAlJSaRHZAq+EUmbelJ25MDUbZnC61sNh2Pys7/ZA48wYgCQWwqvRoLZ6cjvCjWGXgvkLWD2uKD4OmpBGpmVymBXoFQk6tYyqSB8v2CrQXDUSrO45UI1N8VNlQmB8FULGLaehdRIETJOXklcJ+fj5P39xE98zB9o+/5sUHsIPXzR9OV4hGyVgjrv/FaHPd2Rd2rR94yS0XYZyIySyySyQi1QKM= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b887a774-fb2d-4728-ebf2-08d4bcbf535a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506067)(300135500095); SRVR:BLUPR0701MB1571; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1571; 3:ALKNBftdwQqkdU/gNJR1gXfL+cHUXBGFdZv8OMFXdgG6oZ4IKW8Ps5ZeqYqmqlcbaTHTm+sNri41JkpqcxCd80VfwtBdLc9dkFbGc1Ya/xzU/g/IzI6qTxX+OzNYu3kKJwpz1H7riKBBBISZhMnh02zENaW1uajiYVQ7xfGM1/2z5OfRA5bKKLZvnf1pj9iKed8s48IyWyXal0qMlksIqphI83Yxsj8ceh7vVbyjQbZuZuuwqfGk6K8l2hmeJGZCdPBbgPh2oWq3FX+yUEXrX1Q3W7bofoxCN/kAYjAw7T5QlSrIwNJNOy10M1B4ZLFCBcHssDMpTd7KCT5oADMRujGIniVXr4Q8cdDQnx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ezGz/rED+i+fe05HOJM7vrYVmAClRmivUyFi0u2jVA6NP8rs0X9X0HAC4Jpx/pyPDzJ4JwiqVFhyAu7NhYiHUdSM/TgwQg4SaGd7ct5lYnT+b96LXnGOoee/EzVOg4+RyhiDLJSFCqZRHt6oYOwWg== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1571; 20:zhrgwzbO9bzasc4V0K9es7n2UcH+xdW2mUfTu8FNXFvptpQbJd6ayZYFPB1zY+XzDgpMJ6a+5kLJLms+QY83eKpR7SV8lmvZmtRs/scHt3ifnrajoZZgBIRrMSCaHVVjlwa+CtFIWrwOcGctjHukRQ6+GsqNViSeAQ6AFLCQGZl1QPSWImVenOQ7Vc/YH6L8gPo7CLMKJtuNPFHJvxwPKuGGywa+pckW0C4EaZulyINWSPksxiF2a2wAhJI6/dZlPrM8yjwxFKUjGkEMtPWwZseRSQ/frZkI3+xwtyBPzoa7it/YLme0U6tfjgzwvyDo9zJLktAtiR2mkJ0msB+/crIAWgPi/kGvsuSbAGwl6DHmBCz5GHiGru8z7PmnGotwIK8L0kRt8R/Vl0xF8RGuNj8Hl/BToZnSD463+2eiohIl6qsMkx61Cw+qaOd7fV70U+4b4tbl1Yz5DOLr0ccVCDn34EBpUuM1UXwkKhAtAevCsyLt6JI0Y8hNRI5Jocs1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(148574349560750)(247924648384137); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6041248)(20161123558100)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1571; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1571; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1571; 4:GflV+lr3OuJePUKALbJl2J6q6WxVgdtpDbPrH29+?= =?us-ascii?Q?+4G4oiJ1EdO+nkbisywT4vhKu0y+w7jQQQDlOXNXqC9CNBcywav6LCVYJ/cs?= =?us-ascii?Q?sf3jS1r3d7sKyayVxdHS907IwfRGfyoibR4DscrUaItJbWjv0gIqwQJrmpIi?= =?us-ascii?Q?VKeSXU+D3oeGhvdtemfEOLQAQWEgSqwIU3qBtV6Ch98CX43AqNOY78jEaAbs?= =?us-ascii?Q?7zgn+Ry3q3HNTE2j0FHaANe+CFVI2Xd/OKr6sUd5StC4Kh51/pdchdzqkMCF?= =?us-ascii?Q?fkNAFQWLkfxbGj30mhOQzdbIczACdwaRxfZ6IomzJJiv0sTE7B3WpN4C+gq1?= =?us-ascii?Q?XQxRUsZ2GomS7aloLzYf40U1jWFIm4vvNPrggKC37RE7IzeqPZ0X1gwSKGPr?= =?us-ascii?Q?whtZhTj89B5G5qr3R3UN5H8TjnpazzR5kdPXXMUW0tnarW2pvN9IR3hGa5LI?= =?us-ascii?Q?iUYro7BOo7XoYAkggBJ1QLxUNmka+wCUWqB4oAv0lbEes5cxCaebwxNpO2R7?= =?us-ascii?Q?N3uirgch+/KleOoMviZ00MVlIbkuqdspkApvBse5JubJdyYpsHpuLlI8wJQE?= =?us-ascii?Q?8XV6YwxBnB5MfXIQA0sTrexOpm5E7Ah46717+f4/hDQ/LCFKzLXWZ8qsX66W?= =?us-ascii?Q?d8vcZRkEy+8SRZwsCAbYNEvg7O5WXTwYCWOyK4FyicfmkzdfDiVFNeOKfVHV?= =?us-ascii?Q?7S2WcgN7idJOiM1jPc31hyzUfirIPo62gNx9P60t7hOC+eqxPPdQ62gyOheJ?= =?us-ascii?Q?wgH/QIgVRvfTXbYKyogP0HEeQkob20CpFrmbn87FcBBLvOifuskNxUT8TXiM?= =?us-ascii?Q?D+cYkaknNhPbKKfUc80Ll0EWjrjFoLNTkLX+WNoMSu8wTS5+tv7BDVxUForF?= =?us-ascii?Q?1o7TL7pCIud4gCigd4Yh10xDxAPv2IAHNvxv73EsIeQXvfmVrelw/dEtSTbg?= =?us-ascii?Q?b1HVn94lgAUIlgDrZ3wG+omKmERHToj2/6/7K992q62M4Ji1RyS8qh5iShPk?= =?us-ascii?Q?n7DbpP4sp+38zfbBGHoDCRqvg0YJSATDdnqsVKmhkSYM508Ed7shml2fw6mD?= =?us-ascii?Q?NvNXzpXosTcAQw3FQDA11ppfCCdfseZ/+1Pe+mTjQMeXpSvbLjPna7pDoJVu?= =?us-ascii?Q?tD9ccxn0e03ZFxoTD/gu/0VbryUZemQYpV3Aw3qFL5HhwtKqDhnCEElpRJ/Z?= =?us-ascii?Q?cJKR9zc6MSDrvLzvLrJd5TekXzdY2is8/tSMFMUbOyUI8GW/sJO4DX24pi+I?= =?us-ascii?Q?UUOlhYoP7WxsovSjOvFQi5QQGhMLtQndnjzxEoOLVZG25SPgNdYNKaAvIpUM?= =?us-ascii?Q?bg=3D=3D?= X-Forefront-PRVS: 0350D7A55D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1571; 23:/feAwJuu3vVBj/oM/nCIcEuUyoRIZ6RC5XRtXZ4?= =?us-ascii?Q?TbdIOWfIRKUUQkaqBgubMuP9e1fCG1mgjCySFs+GkPocdQESXHPCvJQ6x7gy?= =?us-ascii?Q?QTisJTgyty/ArgyPUH/UCQf0ObmE4UOcBkuso6Oq5SJyJVb4m/8Rh8eTsJaN?= =?us-ascii?Q?Ub54A07GnQ61Je1kYXYzvmMEag2Srev2nkcROlnhzCoDB60xLyuopqgtEYIf?= =?us-ascii?Q?ajpN4zUDSJ4nJ5SgybwGsyr9QpIN/O0KL6mW2J7eGzle2jEcfOj6vkX2nDN1?= =?us-ascii?Q?KczVRe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viiwep//47AMEVex4+GhtTIDK0P+/K8ITTNiMNtVdVoYPnSuGt?= =?us-ascii?Q?LYuid2KW2dXb7xJFJkrX6jtChphiFvnuiI3Pmem/wKCDGFHYcGWvcUYAok5n?= =?us-ascii?Q?kVE=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1571; 5:NyPP5sZcnwnpBRicNZogpMo8HdIxEyHy/hlUV5wcNPL2WC0xCI9vSUZ3PgfBgnQYZLI0i0XW77bu8XczLZQyUA4bZoMG0mspigJHwgr52WuletGIbzcDl07yZfE50wMQ/Y+gJActicBz07w/KMDliNQI07pc2vjl2yxPkGED9mxQFfkPxTtt3IcQ46JZ7JdAk9PnEpcnwaf2M27V2JAbzy4GeboDD9xXr6Yl1hqs/AuYTOjbPxymRlkqK66GvIDUJMNxpo1bxWyQ3SOhApXIFrGf+rkS0Fx6mguV6mO9wyHTL3VSH64dZNAAzxog0meqCugeZ17Mp//cC2RZdknAnqFqkyi5sFoH6jUEMy2zNKEatFge8SF0oGAqvvuy86LfcIaIfkHvTFiOwYPHvQlkaahbplH9CXwTzKPrwycogD663BVdcem58QByEEwOA57FSqJiZFTMRLP+x7T6hMaaEmp3KlK6QOyEsiRHk/NSCvCRVcxBiLf19OAM4WKYzNfP; 24:5iaDGAdHiitiLcbEx+HwMc7NvbEvqmgnwcHs82qvdWlLro5qflBwLBM2gqCN8vAtrNppW6fXVpVD+SpRgh+TAbGTZnZaz2NMbCwOvMwMH9Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1571; 7:IwZhOkoQ+giam3fYlRFiFj1X+mahRBGYY5Cdk39flT8w+8jO7G/PSkhoi0iSxc+y8h/CzFJDxPejhY/v4eA1B3wldtpZjvzlcE8NX0lGMLDa6ZnHGEW0goWyLFPCGEJeqQH9grEHd40ow+5OOEoYPBzNFALJOGoqmOHHQDqYJs8BX2JuF/O4G9P0fGM9Q6I9C3rgwEpKSjflc3lVCtlp/3dib50CwG+dKsWPFS9qRYZW74dbc/251asvpSv7ZVRg5juKTRMfnKtfHDX7Kk3gldADxO0rpa9bcbVKEA4v+UF6nMPWqFpL8YrAHNomMzl8tTTeTgjmHGOOk0btYHm3Ml/smD0m19AkjaxEXY776JcefchHqW7IpYWuR6OvT1VhTcTlFySNEv+tp9Oeo5owYnPvlbhJQrcFq93yGMM2pPb2iEGLbAfGLAan9m4o1FljoEfgGrrO97bpE3YeMvfFVaYvIKaxEAwohiMyPRDgfL0HYR+ptTBIxCqJFsu1VuR5yV6GeUfqIaht43z4l/Yttq5Qns45gwejb3+j0nFhEvWCWMnXcXNnISH0FeTT26smTm3Z7A/1C87e9zNNNODSUFcTVOoPbFBAqg3z0UIKFve+77A9pnKK8QGYRhbIiwDl+ZF+98iHcYXfhYO1+nPmnk5t7kiAFdH2hQed1fmMv5gS7wp99Q3fPX2qZkypWJKBTvcyTbwFRCppe5XL4uYelpOz+TcI7q1437IGX1sp0bJfFN+OIZcPoo8QMmDqjLvtCCba7QZyFtKieDd41E1sS4kluEYLCCT8KmF1Owd011c= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2017 18:15:28.7297 (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: BLUPR0701MB1571 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 This patch implements the following iWARP callbacks: qp_add_ref qp_rem_ref get_qp Signed-off-by: Michal Kalderon Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior --- drivers/infiniband/hw/qedr/Makefile | 2 +- drivers/infiniband/hw/qedr/main.c | 10 ++++++ drivers/infiniband/hw/qedr/qedr.h | 5 ++- drivers/infiniband/hw/qedr/qedr_iw_cm.c | 57 +++++++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/qedr_iw_cm.h | 37 +++++++++++++++++++++ drivers/infiniband/hw/qedr/verbs.c | 38 ++++++++++++++++++++-- 6 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 drivers/infiniband/hw/qedr/qedr_iw_cm.c create mode 100644 drivers/infiniband/hw/qedr/qedr_iw_cm.h diff --git a/drivers/infiniband/hw/qedr/Makefile b/drivers/infiniband/hw/qedr/Makefile index 331a361..1c0bc4f 100644 --- a/drivers/infiniband/hw/qedr/Makefile +++ b/drivers/infiniband/hw/qedr/Makefile @@ -1,3 +1,3 @@ obj-$(CONFIG_INFINIBAND_QEDR) := qedr.o -qedr-y := main.o verbs.o qedr_roce_cm.o +qedr-y := main.o verbs.o qedr_roce_cm.o qedr_iw_cm.o diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c index ad227b5..ebac63f 100644 --- a/drivers/infiniband/hw/qedr/main.c +++ b/drivers/infiniband/hw/qedr/main.c @@ -39,12 +39,14 @@ #include #include #include +#include #include #include #include "qedr.h" #include "verbs.h" #include +#include "qedr_iw_cm.h" MODULE_DESCRIPTION("QLogic 40G/100G ROCE Driver"); MODULE_AUTHOR("QLogic Corporation"); @@ -143,6 +145,9 @@ int qedr_iw_register_device(struct qedr_dev *dev) dev->ibdev.iwcm = kzalloc(sizeof(*dev->ibdev.iwcm), GFP_KERNEL); if (!dev->ibdev.iwcm) return -ENOMEM; + dev->ibdev.iwcm->add_ref = qedr_iw_qp_add_ref; + dev->ibdev.iwcm->rem_ref = qedr_iw_qp_rem_ref; + dev->ibdev.iwcm->get_qp = qedr_iw_get_qp; memcpy(dev->ibdev.iwcm->ifname, dev->ndev->name, sizeof(dev->ibdev.iwcm->ifname)); @@ -315,6 +320,11 @@ static int qedr_alloc_resources(struct qedr_dev *dev) spin_lock_init(&dev->sgid_lock); + if (IS_IWARP(dev)) { + spin_lock_init(&dev->idr_lock); + idr_init(&dev->qpidr); + } + /* Allocate Status blocks for CNQ */ dev->sb_array = kcalloc(dev->num_cnq, sizeof(*dev->sb_array), GFP_KERNEL); diff --git a/drivers/infiniband/hw/qedr/qedr.h b/drivers/infiniband/hw/qedr/qedr.h index 0c0a39a..5dd82d1 100644 --- a/drivers/infiniband/hw/qedr/qedr.h +++ b/drivers/infiniband/hw/qedr/qedr.h @@ -33,6 +33,7 @@ #define __QEDR_H__ #include +#include #include #include #include @@ -164,7 +165,8 @@ struct qedr_dev { struct qedr_cq *gsi_rqcq; struct qedr_qp *gsi_qp; enum qed_rdma_type rdma_type; - + spinlock_t idr_lock; /* Protect qpidr data-structure */ + struct idr qpidr; unsigned long enet_state; }; @@ -399,6 +401,7 @@ struct qedr_qp { /* Relevant to qps created from user space only (applications) */ struct qedr_userq usq; struct qedr_userq urq; + atomic_t refcnt; }; struct qedr_ah { diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.c b/drivers/infiniband/hw/qedr/qedr_iw_cm.c new file mode 100644 index 0000000..8811dbc --- /dev/null +++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.c @@ -0,0 +1,57 @@ +/* QLogic qedr NIC Driver + * Copyright (c) 2015-2017 QLogic Corporation + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and /or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#include "qedr.h" +void qedr_iw_qp_add_ref(struct ib_qp *ibqp) +{ + struct qedr_qp *qp = get_qedr_qp(ibqp); + + atomic_inc(&qp->refcnt); +} + +void qedr_iw_qp_rem_ref(struct ib_qp *ibqp) +{ + struct qedr_qp *qp = get_qedr_qp(ibqp); + + if (atomic_dec_and_test(&qp->refcnt)) { + spin_lock_irq(&qp->dev->idr_lock); + idr_remove(&qp->dev->qpidr, qp->qp_id); + spin_unlock_irq(&qp->dev->idr_lock); + kfree(qp); + } +} + +struct ib_qp *qedr_iw_get_qp(struct ib_device *ibdev, int qpn) +{ + struct qedr_dev *dev = get_qedr_dev(ibdev); + + return idr_find(&dev->qpidr, qpn); +} diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.h b/drivers/infiniband/hw/qedr/qedr_iw_cm.h new file mode 100644 index 0000000..ea6d17af --- /dev/null +++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.h @@ -0,0 +1,37 @@ +/* QLogic qed NIC Driver + * Copyright (c) 2015-2017 QLogic Corporation + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and /or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#include +void qedr_iw_qp_add_ref(struct ib_qp *qp); + +void qedr_iw_qp_rem_ref(struct ib_qp *qp); + +struct ib_qp *qedr_iw_get_qp(struct ib_device *dev, int qpn); diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index fc9ff13..cccae13 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -1272,6 +1272,7 @@ static void qedr_set_common_qp_params(struct qedr_dev *dev, struct ib_qp_init_attr *attrs) { spin_lock_init(&qp->q_lock); + atomic_set(&qp->refcnt, 1); qp->pd = pd; qp->qp_type = attrs->qp_type; qp->max_inline_data = attrs->cap.max_inline_data; @@ -1342,6 +1343,33 @@ static inline void qedr_qp_user_print(struct qedr_dev *dev, struct qedr_qp *qp) qp->usq.buf_len, qp->urq.buf_addr, qp->urq.buf_len); } +static int qedr_idr_add(struct qedr_dev *dev, void *ptr, u32 id) +{ + int rc; + + if (!IS_IWARP(dev)) + return 0; + + idr_preload(GFP_KERNEL); + spin_lock_irq(&dev->idr_lock); + + rc = idr_alloc(&dev->qpidr, ptr, id, id + 1, GFP_ATOMIC); + + spin_unlock_irq(&dev->idr_lock); + idr_preload_end(); + + return rc < 0 ? rc : 0; +} + +static void qedr_idr_remove(struct qedr_dev *dev, u32 id) +{ + if (!IS_IWARP(dev)) + return; + + spin_lock_irq(&dev->idr_lock); + idr_remove(&dev->qpidr, id); + spin_unlock_irq(&dev->idr_lock); +} static void qedr_cleanup_user(struct qedr_dev *dev, struct qedr_qp *qp) { if (qp->usq.umem) @@ -1692,6 +1720,10 @@ struct ib_qp *qedr_create_qp(struct ib_pd *ibpd, qp->ibqp.qp_num = qp->qp_id; + rc = qedr_idr_add(dev, qp, qp->qp_id); + if (rc) + goto err; + return &qp->ibqp; err: @@ -2224,8 +2256,10 @@ int qedr_destroy_qp(struct ib_qp *ibqp) qedr_free_qp_resources(dev, qp); - kfree(qp); - + if (atomic_dec_and_test(&qp->refcnt)) { + qedr_idr_remove(dev, qp->qp_id); + kfree(qp); + } return rc; }