From patchwork Wed Jul 26 11:41:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 9864619 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 59AF96038C for ; Wed, 26 Jul 2017 11:43:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60A7228634 for ; Wed, 26 Jul 2017 11:43:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54A0428753; Wed, 26 Jul 2017 11:43:30 +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=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no 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 94DC028634 for ; Wed, 26 Jul 2017 11:43:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751528AbdGZLnQ (ORCPT ); Wed, 26 Jul 2017 07:43:16 -0400 Received: from mail-sn1nam02on0049.outbound.protection.outlook.com ([104.47.36.49]:34973 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751423AbdGZLnP (ORCPT ); Wed, 26 Jul 2017 07:43:15 -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=eX1xtVSbySaQwM0ybmI7qTPRFgg0CJZ5Hpt8h4f50Uc=; b=iLhd/tZY4EGJusrWgjmCZp7Z6MKUeV1pPggTOlnQbrSR1LqWnmM9JQrtrGN1IyC15/PTes/2UmD9Fgw5PMKtjyWrCGNipabXcXWBVEnT+TCPXitE2+mQJwFQ9yQkdbLXQiezEB2iAVezhQF1DkCzdKJL5rAoAda6I+DEJRXNXSs= Received: from SN1PR0701CA0031.namprd07.prod.outlook.com (10.162.96.41) by SN1PR07MB2447.namprd07.prod.outlook.com (10.169.127.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.10; Wed, 26 Jul 2017 11:43:13 +0000 Received: from BY2FFO11OLC012.protection.gbl (2a01:111:f400:7c0c::144) by SN1PR0701CA0031.outlook.office365.com (2a01:111:e400:5173::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.10 via Frontend Transport; Wed, 26 Jul 2017 11:43:13 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; redhat.com; dkim=none (message not signed) header.d=none; redhat.com; 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 BY2FFO11OLC012.mail.protection.outlook.com (10.1.15.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1240.9 via Frontend Transport; Wed, 26 Jul 2017 11:43:13 +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; Wed, 26 Jul 2017 04:43:10 -0700 From: Michal Kalderon To: , , CC: , Michal Kalderon , Ram Amrani , Ariel Elior Subject: [PATCH for-next 6/8] RDMA/qedr: Add iWARP connection management qp related callbacks Date: Wed, 26 Jul 2017 14:41:55 +0300 Message-ID: <1501069317-16601-7-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1501069317-16601-1-git-send-email-Michal.Kalderon@cavium.com> References: <1501069317-16601-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)(39860400002)(39840400002)(39400400002)(39850400002)(39410400002)(2980300002)(428002)(199003)(189002)(50226002)(2950100002)(36756003)(106466001)(6666003)(8936002)(54906002)(478600001)(72206003)(48376002)(105586002)(5003940100001)(104016004)(4326008)(2201001)(50986999)(76176999)(101416001)(50466002)(2906002)(8676002)(305945005)(626005)(69596002)(356003)(189998001)(47776003)(81156014)(81166006)(5660300001)(77096006)(107886003)(38730400002)(575784001)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2447; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC012; 1:ELtDHPE74BQqi0feLesAo1TgGtTHt4/oBZPR1GSHQKNQuOoWWhwZLnRmslW6OK0y39Di4mD7Fa/58pEEea3TQhuDCQBGRHlOOqvSkoWd3qVgo+ACBIf8c8AxEzeD7Z9is0UxvFY0McQ3yTce8wDUfV3aqDSGk/+k7d7yeOI26jswwc8hXahzONU5oGanH7uxIdsYEXj108osxxYovDIhpEJcrxR50HbE8NxYp/Qnwom1qJmInjhz5D68oMeLNVrcDEeWPav7jxn3GW5JKbYh7OvSZSCgB5jEh4+XTIde/zXuWG20xpuMwNf+FdjJ0UYqHp6m4LdE20zwV+GTeB99sR+1gbcRlrvcE5PlwvKHTCCwnq8dKD7IT9jz+SkgXV0BjMbwFlUm9H0uPssn2Qz2yQCoUCWW/BY/fV4QwZv2W3HWOdiYimmZZoTuRZ+f+QMIFg31t0Wjnw2iriE0vOprckMKjReXOO3w1F2cy2GuS9MROIiUInBQY1uTW+O2hNdhhxb3vQlM+wWcUYeeM8dgXpjCDDABA+D6GroPZZx00MQ6HnIL/5mAeOCVk05/WMnjJarkDnaD7t+5lz6BeBVfK3Jf7/58WFUAn/iaieSJ6uqo55Jkv01V1H/qZrqGGyjjvxAnoc6X/mPQQZ1IvonJbfn49blm3XsZuPSTxALOzwoQqujtgcfxEveScH5kUIodcoAgC2ggeq609uO3Olum9lAvWXOkOlu5pfDPCO1RsAQNdOvLT4/jiU944TBqFQWh77IOZt3tReLq9Tvr8vQJb6AJJLBJumWL4gBVK1naVaRKcH5Jx4W6l1Z9wQ/4VRDFEKsvdn8C29L3lcHF/7K9NA== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dde870b0-e789-4a16-f915-08d4d41b7f93 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR07MB2447; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2447; 3:bKO2o+bFdbrExKjW7yMz1oqQVcVFHc3gqvROzfRd+4UDuy4LuQiHyxdPKBB0e7U/k6xfO+kYeLcyaWNeIR/nl+mhnimb71sIfqqe8Gu6oakgf4kmRNcaXd5Iylz/Hw9wRDqobqZScDfc6AIzra0Gxcp8wOdlvVwYepmAJh/fpTlAT0AcdRuRZX75QSxGXEENpcPW1pCIQ3x4YMrJ8LdB0ltxVG48b6Kh0rrGuTd3VjiOvVmfasoXPoyP22dpF06mc0lIZMnDrdLxZQfH7u/vchgheOKLa8j/lKFi7fVOVE7o7dYnBlp24Fqsjiwp1CtFucDHcKa1NpztDi+Nuu3dqpUTvS4GeBic9isQBTzKZ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DGQ5JEljmUvwpTKoLV/qrM9TWgDRx72/nR8rUZxxkyFFA1gNK5FUMzeqp9+DgjOJb9LWKCNc4lyJ0FWeRRzSF3bJByBNiUOUtRUOTz7wp9WucxaH0ODhkxFvnR4iJKpwD+eBAfmeAoGJXihFVKvsqh8//ISd4Je16to/gUgidC7QFUqgKZxxN21jSG66CmrPSj1vBQDDqTbGh9XmskYEd4A== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2447; 20:KLY48FVFRpnTwv95XAB4yHwums7mgQTltSL6U7Ey11VtpXBz/iMLVH2bNGdRKi7fz/wQIblha4PUbasfQkeg6DhMmDWSK38Ncrhtdvwf6pJ9O931pbhurlN/tmBfFwmkNDeLkHJvDavJ5J7JvBfX9S1qdUb34y1cytPKjNrtEJIsPZIq+4tLoKUxdiMAgg/nUCepPNdmhyMPkv2X+b525CevOVt8nhYZA+p5tAlnf1arlNQ/rjCQ/UnRz88CNdfLQZNRhnqV22zm+9JLsw7bhrDaOfAv9RTX2C6VGQwr9TJpz7daw+/3t6BqlSYJzNTOVNvUJpAl9qFQ2VLK6u4Haopb4wWW1jjLCoswXbCDjp4BPXUgI4m83PDDwObII1fCOH7zvxmb3oRliwDL7Mlew8mgKncO7n3STsKXUcyGRfRv1aXfCyGhpoASTYTBkOKXv1d152SdCLimZUN/FKGwjYOHgYBnO2kChOVsw1+OJ3K1Kwd/McJ/Mtbqcrtk7Ku2 X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13016025)(5005006)(13018025)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR07MB2447; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR07MB2447; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB2447; 4:n4x+rTpdfOl0CxLR2eaD65QpCtQEg2Z8yKM9oB4P8w?= =?us-ascii?Q?q2AE31QEhKpwOgMdka2nMeud8VN9kNOI9Ja5wasgbjFGinqCrTuZH/Y3P4Xg?= =?us-ascii?Q?hKyLOGn4yy4tNXQowQH0mtSh0R9wb+WlrQDFBn6FWfFSHuiqSrZPQPg/pe6s?= =?us-ascii?Q?u0QZhoXsCsenKhzuWU6vLeYLIs+UcDb7jzztClTUCdEWwTb3sZdSNOQ6vQ+2?= =?us-ascii?Q?81cC2WU53IBUzewX1IUAa46COYVpe3sdu6Q5P0SG/EI5k7K6Q5C5u6WCO7Ac?= =?us-ascii?Q?fZiQB423qUYcxmtvIy4a+znEkpsTSHI4FJ6CAQG16gedDbuRLHronTR/Py5b?= =?us-ascii?Q?BhS4r/1GkqS0to2DVXfuvy9v//zCRk185pi1/YBJyZlnQbWyNPXMdGh0MnHJ?= =?us-ascii?Q?vojW/gKd5h9s2KHvBXgIlYjbO0nVUkfcuWihfHTuyeeZgfzwDkAAGjo8B7mp?= =?us-ascii?Q?qqWa/PCxPlhDWyRQv1mLy0SxnNRADp8ZIimbOQpROQx2nlUC+oUPQZQGeqEs?= =?us-ascii?Q?f+iRfd9YJJUCbJghRnb5hlAQqmVq33giJZhExijCSteMoIx36E3DriTXfq8L?= =?us-ascii?Q?UfiPh/nZ8IXpOjK8fq24+SmcAXTl2hlbQI0LtgDZvBwUAz6PYjerKyNE2TSd?= =?us-ascii?Q?ZOlObfTauwNU5a072Q9Dh/oeHkO5Hrwh98yJWMJffHSv6Zsb/np1dixh6o/Z?= =?us-ascii?Q?5NIPBn5M0KZ3WbrPV1MISFNmCJIlxhzibQSR1FtRz53iTAusQOQGM3kO3bLP?= =?us-ascii?Q?u2wbEH8kfxhMV3uQMr/TPXoCltTE6+KjcW+h8nzi7VaC+Ogf1EchGD1VKRkk?= =?us-ascii?Q?qAc2yL6LBHTteaKcAeCBm4a+jK+MeVrOZ2mmB0FdNZBO55hsyBy7plEEUGlz?= =?us-ascii?Q?v+7TWMaSleZuO6qoDHvtvNRMU6MYl3XuppKfqx6f6iTUjbwq5P+R/P3q1lFw?= =?us-ascii?Q?SiuRdfkD4serYOAvm5OtF9Z6yUVwiS3pAEJis1dlKULXIX6XhbeyDilSqveF?= =?us-ascii?Q?m1AbpWYQNMkkfeVQYl+5vvQw/u7daMefVjgj+jkzTxurF2JsSv0u4fUcWF3t?= =?us-ascii?Q?nz/0JbLKlT7l7d0RsGVmoxE/Y0JAbUvt6KDlsLOeeOyl8TY6BX8PYWkMuolR?= =?us-ascii?Q?rNP7h4l6zc+63rLALnDBsT5cXFgIxH5ubl5i3mbbspdyMx1KZ7IQ4Lgei/Du?= =?us-ascii?Q?5Vagex5X992Mo=3D?= X-Forefront-PRVS: 038002787A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB2447; 23:LLVrmcKdc3gEy2ETd6OITWKKdvGRsWYronAlGtB9H?= =?us-ascii?Q?NI4a6ZPzpOAd9YusxspktL5FELSqXzP8KohbiFwi6vw6lri/jyICww/cFBHU?= =?us-ascii?Q?3EXDiJ+C4vfou9AouS1x4t+lhFJntSXL2LA00300B0pUeAf4u5WEgHk+y/QL?= =?us-ascii?Q?9MEFTc/RRlwfN7cRmKWe/V1haJFvEbGf44QmcfA48Lsx/EYO3HDRoeUSVlJn?= =?us-ascii?Q?nzJyZOkCp0PNjONADTqUHToHbbB5pLSU4tlFz4uji34OpaowN2+nQ16oEt0f?= =?us-ascii?Q?Fe5ntvKEr7HySOxp8J4iBqs0sPdhD7xgtNo+k8HL6wRm12SQaPlTjB0NkCD7?= =?us-ascii?Q?JV6+QjIid+LZXfvlcURvXtPlaas6Yj1+A95+bsyz+GDi/Hwxpqu3TKV6CKgS?= =?us-ascii?Q?tr2vXOIhsz/WPiQxjcXTrcP7V1QJcxipnm5DlHXQZrMjTQd9FZVFcX1UPH1k?= =?us-ascii?Q?52dnFccyutoznRfV+D5T/+U2aZRTzDmKYYvm8zSdPX2T40vI2rQ/j70wgxoo?= =?us-ascii?Q?FSxta+Ofg351O2dfBk/0kRyrnMZSFTrCIRUftDN57uhE3ZmQn5VXD4tqEKt/?= =?us-ascii?Q?J1mAIUzyKygNwUNZVxelSes+9mPHhrRsRkt8zWUJ4s8JP5Jglpa7SPJ2GYeS?= =?us-ascii?Q?7jfBz5HyaiZmXbva+S12itftniKJ5h4wZIAOfFp9tE4HMVbBY69PcQ3/tG/D?= =?us-ascii?Q?jVtD18IKBsE4L6TwWftR4cLl2bV4cNpAPPxv3Dw1mKuiyFdgSwDyzEQELK4l?= =?us-ascii?Q?y7bx5SwGwP/+T/yw3x1PNnsP7orEmfMtJ9XvHkSKqADYsOCOke849joYtuuR?= =?us-ascii?Q?V9V5X5UF4eWacA+agVftVnIvnUoQvfpauzw6tryxwPWX/c0cXrBEXMFugQeO?= =?us-ascii?Q?YChcytPAWyjGR/Jz6Hbq7oB0OZpUIpeBNceOPL8jXUkhyItVSHGGy2M5lSFC?= =?us-ascii?Q?cW114We9m8vPxNXLelLOUh9cLJrX7wEmKgayxW7LT6u0kk8+eFb+jM5YJM/f?= =?us-ascii?Q?a243i/h0DOGhY1npPifxiTEaqCHNcgisHVBlnw1n8ZOtxe8MHv/7sx2u5MwB?= =?us-ascii?Q?gy1e1sn7dkFI8ta6rjGp/4Wr1SKqTHGczSQNUNLKpyEqREEvf7ePoRbF7p8E?= =?us-ascii?Q?LICE24tC66QePBIHtpf3tqIT+0iM9WF?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB2447; 6:csbHCRpBDCp0+AJnKI+JU2zdNcR6hZkPP0n+tzAN85?= =?us-ascii?Q?B/7gpKW0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8fHP1UYJcH+1G5VnpG2aPg08dCQvSfII3ahtNTDLGMu6SchXDu4bnx/hHutAbQVlC/yHnuZMwxLtSChrxzFaIjpg9riq2X9cG/jkFkDnptkYsr7hW9tnba6m6yN23XVtwbdT4og63zJ8fpyC/MKy1fAC4wGSSJAo7ZRzmKS2V1a92Ewyjfu+Taie12mU8HZTWz9rj/xo/J8d+d0nHmcfZuN+UMHkltOd9HAE+P8S1USSmF8v2o8IldAxSaugJJXOEDB6m+hhWwIaAjIr5pid2cHzMQvjb8i5ctGmrELFmY1VzK21MQnbipZ3vqWJQDBWRZbm1J0dMSOO2Z0RTGFbwgwf1ZFf2s2ZyvGumKVXY6WCmkRbHb9TCY5a+7QIM7F1g+da78GCiG5KKfzczpiOdZ7WwjKzJQraukTt7aXyiFTI7zKwjW5wM+ThD1eY3k/IXGGmZscxa96hGpj/mnocCCd5ePTOmYGHnZetxgG6FDhuOv7AjVIBLFQ6ItKhPCapZk46jMuqi+9Rozo/clOXo+QFJ2ANy0Z+rp4MShKjj3kdZ8jtKx9zyMtwzvDGQiXGHO6CVrcai5eilTuIa/SXhOsnWM= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2017 11:43:13.3508 (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: SN1PR07MB2447 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 3a38a1a..545cea9 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"); @@ -142,6 +144,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)); @@ -314,6 +319,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 0ddac91..ec361cb 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 @@ -163,7 +164,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; u8 user_dpm_enabled; @@ -400,6 +402,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 a439e0a..bdce96b 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c @@ -1283,6 +1283,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; @@ -1353,6 +1354,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 (!rdma_protocol_iwarp(&dev->ibdev, 1)) + 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 (!rdma_protocol_iwarp(&dev->ibdev, 1)) + 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) @@ -1703,6 +1731,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: @@ -2235,8 +2267,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; }