From patchwork Tue Jan 10 19:15:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9508391 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 0008660231 for ; Tue, 10 Jan 2017 19:16:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7C1227F89 for ; Tue, 10 Jan 2017 19:16:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCA37284EA; Tue, 10 Jan 2017 19:16:14 +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 064EB28553 for ; Tue, 10 Jan 2017 19:16:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941079AbdAJTQK (ORCPT ); Tue, 10 Jan 2017 14:16:10 -0500 Received: from mail-sn1nam02on0071.outbound.protection.outlook.com ([104.47.36.71]:52081 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S940646AbdAJTQC (ORCPT ); Tue, 10 Jan 2017 14:16:02 -0500 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=LaZAuQwWxbpfif0eze1i6jpetucSzkKLW+U6jnwKQMo=; b=IrypCVAgj7a+QyWDfW9JXT5t7sdL+eBDtLv/KCFZbbDF1vc1X1Uog6uM180TXrrGBkahVAGOWn58iYwocFF/YYngzpX5UQqM2sebRfwEzp3EeSQD/JyavegfhUPlGsCzFLNO0otLy2pXCGswj5N5H3cX01fOlzA8mDil38BtVyg= Received: from BLUPR02CA038.namprd02.prod.outlook.com (10.160.23.156) by CO1PR02MB048.namprd02.prod.outlook.com (10.242.163.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Tue, 10 Jan 2017 19:15:58 +0000 Received: from BN1AFFO11FD019.protection.gbl (2a01:111:f400:7c10::162) by BLUPR02CA038.outlook.office365.com (2a01:111:e400:8ad::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10 via Frontend Transport; Tue, 10 Jan 2017 19:15:58 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; 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 BN1AFFO11FD019.mail.protection.outlook.com (10.58.52.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.8 via Frontend Transport; Tue, 10 Jan 2017 19:15:57 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.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 A8.87.01420.2D035785; Tue, 10 Jan 2017 11:06:58 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Tue, 10 Jan 2017 11:15:54 -0800 X-AuditID: 0ac94371-47fff7000001058c-5a-587530d2b1cb Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 1F.48.16817.AE235785; Tue, 10 Jan 2017 11:15:54 -0800 (PST) From: Bart Van Assche To: Doug Ledford CC: , Moni Shoua Subject: [PATCH v2 14/15] IB/rxe: Remove a pointless indirection layer Date: Tue, 10 Jan 2017 11:15:53 -0800 Message-ID: <20170110191554.17359-15-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170110191554.17359-1-bart.vanassche@sandisk.com> References: <20170110191554.17359-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsXCddJ5ke4lg9IIgyOvpSxenv/AavHsUC+L xYb3a9gdmD2eTT/M5PF+31U2j8+b5AKYo7hsUlJzMstSi/TtErgyVr/tYC04E1cxc9IVpgbG t35djJwcEgImElN7pzB1MXJxCAksZZI4eXMNM4SzjVFiyfJz7DBVO5c3s0IkNjJK/H11HyzB JmAk8e39TBYQW0RATWLTq0VgcWYBR4lL0z4xgdjCAm4SW/7tAYuzCKhKtB75xwZi8wo4SKw6 vJIZYoG8xK62i6wgNidQ/MOC+0C9HEDL7CWmrDIG2Ssh8JxFou/gTnaIXkGJkzOfsEDskpA4 +OIF2BwhAXWJk0vmM01gFJqFpGwWkrIFjEyrGMVyM3OKc9NTCwxN9IoT81Iyi7P1kvNzNzFC wrhwB+Pr296HGAU4GJV4eDuelUQIsSaWFVfmHmKU4GBWEuFN1SuNEOJNSaysSi3Kjy8qzUkt PsQozcGiJM57MfpjmJBAemJJanZqakFqEUyWiYNTqoExfsULqxmTrMw8Nj4x8PM4lvZotUnh y2hxfYc+t/TbzqrH71ceLr17bz6DvHyLqvw1/+PLLK6ZPQhLj/+jv7pYROB/7pPN27vWzZgk 6P7nzNufJ9zFPLWv8LzatSLQ9MLCjZzHdHhXSp900zq3irOo8mzi5o+FRdEBtY1pbjwNX7+m HXFctV1CiaU4I9FQi7moOBEA6oDKdF8CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAJMWRmVeSWpSXmKPExsXCtZGTTfeVUWmEQf8kbYuX5z+wWjw71Mti seH9GnYHZo9n0w8zebzfd5XN4/MmuQDmKC6blNSczLLUIn27BK6M1W87WAvOxFXMnHSFqYHx rV8XIyeHhICJxM7lzaxdjFwcQgLrGSW2vz7ADpJgEzCS+PZ+JguILSKgJrHp1SKgOAcHs4Cj xO3zISBhYQE3iS3/9oCVswioSrQe+ccGYvMKOEj8n7ydEWK+vMSutousIDYnUPzDgvtMIGOE BOwlpqwynsDIvYCRYRWjWG5mTnFuemaBoaFecWJeSmZxtl5yfu4mRoifI3cwPp1ofoiRiYNT qoExxoZho8m+9K1WR0w1LSfOdl3F8daJq7esfV6f5yyHhtDKM8xaOV6FXHk8d1dMXiwgXLRv zs1Z3LKRl5Obs/3lVT1KeG68YkgWWLCh8eOE20H8qwMPpX7gi3lvVHpBufVzW4rDVd91d7Zu iTpfpX3ZjUV3J7vDo21ZL3ekfHgQzRAaenfzOxYlluKMREMt5qLiRADoj6f2owEAAA== MIME-Version: 1.0 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)(39860400002)(39410400002)(39850400002)(39450400003)(39840400002)(2980300002)(438002)(189002)(199003)(36756003)(189998001)(69596002)(86362001)(47776003)(2270400002)(356003)(106466001)(76176999)(33646002)(92566002)(50226002)(5003940100001)(575784001)(97736004)(68736007)(2906002)(305945005)(77096006)(8676002)(5660300001)(48376002)(38730400001)(54906002)(110136003)(626004)(81156014)(8936002)(81166006)(6916009)(50986999)(50466002)(2950100002)(1076002)(4326007); DIR:OUT; SFP:1101; SCL:1; SRVR:CO1PR02MB048; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD019; 1:p8BpMzF1xVH/kKQnr0GBIwzz1o7XMZyHoHw+q7gKRQEhsiUydnGMsqgpcxVtOLRfqQiqkCmrA7SPsGJ92M0G2NmZ8gbWBCXl+yEQ9GMKGYXqOqlb98SlQga5IFhdTZMcqVjZp4qnxKtSqTDcTCFVUdW2IyB3pKVRnr8IulnslUrigyT/2YygqJ6Qx+jnhafQeIYg1R+CSnQaB4Qc+/EFoxL74D+UTX4Ix/7NzikXz/T8+QajuhnZ+OMZCZM+QrTQgw/1ZuF/TeBfwDmwLo9li1IXmJ3wVejSgjT9oJoEO+P9yf+5xv73ZB5pAdEe4himBEmsfcy3q3uLfeXFO7m0IrEIWuULhnbwXDOo7DqWO6Md6KkVtV9qJP4FrmO3SXvb27ukGnigm6j2XnfuY0aKuqBU8NxzbcfbI4HkSiupB8W0hj8A4MGzAhV8uTO7ow4oMoGirsPyKCT2AiKl6+5fbcYq5Lx9cqevQOMH9s2GBC9aAQ+Oz8k3UFEObsN92JS+uHoDWqUc+WAS04Nx4pwWFQ== X-MS-Office365-Filtering-Correlation-Id: dc8d46b2-c4d7-451a-4334-08d4398d1bb0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:CO1PR02MB048; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 3:+22uH/QSP3OVNuenqpINwDJEuVHGbWzvTxFdcIM63Jpt4G+KEG/0XlF4fiLQ0ilW8mRuabZTIAJIeW8z8/U2PrpRpicSklyxJ/uu0BTkqHPUJQgHOlLxNG/VO8NIcClQZJ0I1t7HcD+nZFP2M7VOyHGOo1PnpP+/xZgMJ5rp/GsNJ3TA3pfX+kBn2U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nx8fNdap2Kb65i X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 31:vi3PWTYSiInC4fhQLrEjjucHzQMXLKrfjx9SYZWykv9pOBpyQkpi5weBeih1XX1BQ6jsqjBnVK0bM0r/7cJSnf3JMq2G7apecIxpKtgR5DjHTkfgZJrUKIQrEG97jTPv9SSAnuw1Jetm7lgqdFc1WnCMuPp7HoDyBZB5vDSuC8cHzIGwZzKYdvmZN/ry56sukheh8tZoTP52rwpUB0Z0xAQ1ISg9FO9M1HjtaYC2Kt/ZO+5daLxd4ty/+KqnY3Z2a15v/H/0hxc7WAjyDvaDu8IJupXSJRAzfTO/Ub5E07M=; 20:aLFjJX045c8olu+Avu4Tw9LjHO6g7qb4N2J/Ex47mEkPgLNadUH8irg8whVsA+EZ0hcKGrziYIm2BYE3YtvxIY9MRZuCUGNMk6B8p/A549CkQ+J/MSFTnokrRNE3ISWywO94Yq3i1MgGx/ModfYPo7cI/pRcMGeyGxpbREbwAOHbTyWBeXlwW9CDjdrYNx2fbQg26ignQAcWPyZaqPOAVBQxHhYzsfzSmrEZ/AHEZBiHMIfmkhXY+snXJD33E/vmfUGk7aOqoS71RRZMp3pzESPB9I+FOqGNxhM5GTxDyoBilU1wkz4KtK3K2MiHC0adi5rJJUwLOfybzqfhAfp4EFIN5bixyElsDiEdyQcELk36MuQAk+9nStQ3NzjiVR4Su7RF9wQewvxUeODKzguezep9nagzr70JMKnS2nZDV2NTjkL8yIIvz13K0xwEJ0OfpOHl/YTQQB4VpgRqZAI+mc1k5c4OIWyWAu6cdtGQLp6fAfwi9snSLVDRTDAwz9RG X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(56004941905204)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13016025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:CO1PR02MB048; BCL:0; PCL:0; RULEID:; SRVR:CO1PR02MB048; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 4:tkbe3jjM5bnvrtLMZNuidNc9rpg37V7/FqenXY6yL5yXvyfskZ86pvPH2sxpq0rRMkppBf4YfIGhENFSpwX16/ZDO975JxWv2LSw39XXOOid5/T3Hme8p3DTW88KWHHJKpvQSceDhYl/L2ZJygHRDv1zPQmrqSQYZ6p+uDCgzL/BQd9JPwkZZPN/V+IYiCKOcUvHCTVEDa0JWaCp//1+ljRLQgzr81LslN8t9T69kEHJo5yeFf4wd/30C50XB1bGjSkECshWBuhbVH+wovw/xWtx4dKBvDtObQLyODSp3FH7NOKSs3yymwZVkagbqzNISh5bSDnObBffLqEuyazia4VdyzpYP/eGxfUN13x7IlLrvtE7K+UtpABiQgLHcYN7T+gOlwqp4HLNkBg4/ddSwZhJFTQPt3AF00OHqVYU+EnMxgLasVXgLr29mdskXn+TEXTytdgdJY+EVuX55HyUs7Q+lqAPm2L//krKHVpXLAkrxpejbtZN7FqK6qT3vE+eURcM8PzFBaBhdWtoeUKJoMm8djR2pdsZOsq/vm0b2kPVY6EnaPh7Cb4aPNb7qQUxU4K1vrqpDyDyXH94vTs7wN7snlXOQIe8fzJyZgy21sypuUP5vMbzv8pkWOzDvOJ/nxGlSjLlK0Su++SUTRfwrs2qqPudROSRUHH48O7MLAGdicAp/uYmMFgMqD2z2wtfGWpmCsWH2l2AcVZg7MNwcA== X-Forefront-PRVS: 01834E39B7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR02MB048; 23:0UlH7dEet/YE+jjkWUr1ZT5+9V8dqZzVDHbfKv9Eta?= =?us-ascii?Q?Cm1e49v1t5/gBnVBzyrw7+GloWE0yKVIZLhEt4pRtJpxzcYSh62LYSest9dB?= =?us-ascii?Q?UVU4x12wd9DRfUumvfQfXyeXVKgUkWExChtCSwFcFsYKvLSaTbiwmnmgOkOG?= =?us-ascii?Q?pYWRMBVp4yu/VRXia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us-ascii?Q?sR9xbpWNyF0BnE4yjt8e+7rsmGAaqWb8j7ME8biGOvXLOm7ymfb+ciPhvibI?= =?us-ascii?Q?x8LbN3HxwSJmkc0b2jTZkHJTIyRjC1?= X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 6:k1nNAuA1L8lLdzdwypIQ4l1Gg9zxQVcL0hh4GH/yjdyVlQBnSqygIPXYRU+RFH9VdnI8d9toEjKFaUcRsONpmm4LQu6MDaoCIfJN41cQZkPxKEqPt2sau7GQ1I31xJJ9l/pN9/xfPOBkCpnRrmA+vZ3GQ//N8OetKZV52dfieK4R01SxGUEVIlMQnEJjXN1d2YftuXYba9L6KWjH8JR74k9X21BENNRLW0k34oxLZqjdfkclmsIvLacHmNbN6NbutJsBai2w/TPQuSkDvSNJGpwOst14Z7PPusyIg7sUPK95HCQfuvyFxfdrCaPMXIjPJIrjUP7ygoPzBaACbb61UCegI6k4Gn1w8naXduBXVgP55CRVjpCBqVLi5S7f659KOI0YOqw2f/Ce8pK1lVgTXMpN94LXqTnuL6IaNssmYAlcIszGEP8BKBWxE2GlPH3lwLpQZ7qG6tn0Xtm0MjrH3Q==; 5:/WhfeX3QXjfuzRzgwcVk3Xiowby1Fb5uUs4e7TavlWIdmDFdkP5PyGkncmzqw9ReihPrdZnok+C7Mpcy06+gju0sxhK75tG5E4yU7O0GgYYaMOKZh/5EJvZv491L0Fe5QgmebxizwW2PIISdKcvX1iH2igZmurPIjZVXj58+18Y=; 24:+SKcEX4gYJvlYoci+42p21+zIuKIkf350qOwm3+HUb7JFlv2P3lGBdCG6jUIPpxxsmlid716SMIachCeyXkf1r8IGA52ET7EpmT5tmwAvvk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 7:dM/ptKTih5Lc1p7rERqzWsZEkS5QZgRQHnWuOMd8/PUjbG2TJXXVKRbNtgMR5U0lAMfeDnsD0cgsfFfpvmV261VL0OA9LjoCcYeenD5fILfSftJM+6Ucri0KSgzhZ0lUFhX6c+qTH1bF85RWDPNV2vG8dIjqR02rb5525JCfcVeJzSrsWJ5DoV0t3wEieaE2hwzfW+2zmp6+7+RILLxovWf1YMlMk/eB+G2B/XAbQkHoJBAhNAZXB3aNn2txRcO5bH10ErrvHp6VU2VjHpqg3XyjGkXgJAlfFkqOlm6vFQdKBOHg8fk6fi12+0xtbOrJRYK4Keno/wmq3oSYhQASDDkbTw8IdU8nys1kNqOtdavdX4QGTW3Ul/3yPcGIXQLbIDdm28R09jdC7RBlcIRdMGZ/WhDzuuxE+yyVqqJivHe8v0Tbt5nsAvyassEmvHnpiVUmVUmGZvXM8VLUbez7Aw== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2017 19:15:57.9422 (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: CO1PR02MB048 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 Neither rxe->ifc_ops nor any of the function pointers in struct struct rxe_ifc_ops ever change. Hence remove the rxe->ifc_ops indirection mechanism. Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer Cc: Moni Shoua --- drivers/infiniband/sw/rxe/rxe.c | 2 +- drivers/infiniband/sw/rxe/rxe_loc.h | 20 ++++++++++++++-- drivers/infiniband/sw/rxe/rxe_mcast.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_net.c | 43 +++++++++++------------------------ drivers/infiniband/sw/rxe/rxe_req.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_resp.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_verbs.c | 10 ++++---- drivers/infiniband/sw/rxe/rxe_verbs.h | 22 ------------------ 8 files changed, 42 insertions(+), 67 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c index ab6c3c25d7ff..b12dd9b5a89d 100644 --- a/drivers/infiniband/sw/rxe/rxe.c +++ b/drivers/infiniband/sw/rxe/rxe.c @@ -178,7 +178,7 @@ static int rxe_init_ports(struct rxe_dev *rxe) return -ENOMEM; port->pkey_tbl[0] = 0xffff; - port->port_guid = rxe->ifc_ops->port_guid(rxe); + port->port_guid = rxe_port_guid(rxe); spin_lock_init(&port->port_lock); diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h index bdec460f1fce..272337e5e948 100644 --- a/drivers/infiniband/sw/rxe/rxe_loc.h +++ b/drivers/infiniband/sw/rxe/rxe_loc.h @@ -141,6 +141,22 @@ void rxe_mem_cleanup(struct rxe_pool_entry *arg); int advance_dma_data(struct rxe_dma_info *dma, unsigned int length); +/* rxe_net.c */ +int rxe_loopback(struct sk_buff *skb); +int rxe_send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, + struct sk_buff *skb); +__be64 rxe_port_guid(struct rxe_dev *rxe); +struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av, + int paylen, struct rxe_pkt_info *pkt); +int rxe_prepare(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, + struct sk_buff *skb, u32 *crc); +enum rdma_link_layer rxe_link_layer(struct rxe_dev *rxe, unsigned int port_num); +const char *rxe_parent_name(struct rxe_dev *rxe, unsigned int port_num); +struct device *rxe_dma_device(struct rxe_dev *rxe); +__be64 rxe_node_guid(struct rxe_dev *rxe); +int rxe_mcast_add(struct rxe_dev *rxe, union ib_gid *mgid); +int rxe_mcast_delete(struct rxe_dev *rxe, union ib_gid *mgid); + /* rxe_qp.c */ int rxe_qp_chk_init(struct rxe_dev *rxe, struct ib_qp_init_attr *init); @@ -257,9 +273,9 @@ static inline int rxe_xmit_packet(struct rxe_dev *rxe, struct rxe_qp *qp, if (pkt->mask & RXE_LOOPBACK_MASK) { memcpy(SKB_TO_PKT(skb), pkt, sizeof(*pkt)); - err = rxe->ifc_ops->loopback(skb); + err = rxe_loopback(skb); } else { - err = rxe->ifc_ops->send(rxe, pkt, skb); + err = rxe_send(rxe, pkt, skb); } if (err) { diff --git a/drivers/infiniband/sw/rxe/rxe_mcast.c b/drivers/infiniband/sw/rxe/rxe_mcast.c index e0fb6752f90e..522a7942c56c 100644 --- a/drivers/infiniband/sw/rxe/rxe_mcast.c +++ b/drivers/infiniband/sw/rxe/rxe_mcast.c @@ -61,7 +61,7 @@ int rxe_mcast_get_grp(struct rxe_dev *rxe, union ib_gid *mgid, rxe_add_key(grp, mgid); - err = rxe->ifc_ops->mcast_add(rxe, mgid); + err = rxe_mcast_add(rxe, mgid); if (err) goto err2; @@ -186,5 +186,5 @@ void rxe_mc_cleanup(struct rxe_pool_entry *arg) struct rxe_dev *rxe = grp->rxe; rxe_drop_key(grp); - rxe->ifc_ops->mcast_delete(rxe, &grp->mgid); + rxe_mcast_delete(rxe, &grp->mgid); } diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index 151f639abebf..50144c307eb4 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -102,17 +102,17 @@ static __be64 rxe_mac_to_eui64(struct net_device *ndev) return eui64; } -static __be64 node_guid(struct rxe_dev *rxe) +__be64 rxe_node_guid(struct rxe_dev *rxe) { return rxe_mac_to_eui64(rxe->ndev); } -static __be64 port_guid(struct rxe_dev *rxe) +__be64 rxe_port_guid(struct rxe_dev *rxe) { return rxe_mac_to_eui64(rxe->ndev); } -static struct device *dma_device(struct rxe_dev *rxe) +struct device *rxe_dma_device(struct rxe_dev *rxe) { struct net_device *ndev; @@ -124,7 +124,7 @@ static struct device *dma_device(struct rxe_dev *rxe) return ndev->dev.parent; } -static int mcast_add(struct rxe_dev *rxe, union ib_gid *mgid) +int rxe_mcast_add(struct rxe_dev *rxe, union ib_gid *mgid) { int err; unsigned char ll_addr[ETH_ALEN]; @@ -135,7 +135,7 @@ static int mcast_add(struct rxe_dev *rxe, union ib_gid *mgid) return err; } -static int mcast_delete(struct rxe_dev *rxe, union ib_gid *mgid) +int rxe_mcast_delete(struct rxe_dev *rxe, union ib_gid *mgid) { int err; unsigned char ll_addr[ETH_ALEN]; @@ -397,8 +397,8 @@ static int prepare6(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, return 0; } -static int prepare(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, - struct sk_buff *skb, u32 *crc) +int rxe_prepare(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, + struct sk_buff *skb, u32 *crc) { int err = 0; struct rxe_av *av = rxe_get_av(pkt); @@ -424,8 +424,7 @@ static void rxe_skb_tx_dtor(struct sk_buff *skb) rxe_run_task(&qp->req.task, 1); } -static int send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, - struct sk_buff *skb) +int rxe_send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, struct sk_buff *skb) { struct sk_buff *nskb; struct rxe_av *av; @@ -461,7 +460,7 @@ static int send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, return 0; } -static int loopback(struct sk_buff *skb) +int rxe_loopback(struct sk_buff *skb) { return rxe_rcv(skb); } @@ -471,8 +470,8 @@ static inline int addr_same(struct rxe_dev *rxe, struct rxe_av *av) return rxe->port.port_guid == av->grh.dgid.global.interface_id; } -static struct sk_buff *init_packet(struct rxe_dev *rxe, struct rxe_av *av, - int paylen, struct rxe_pkt_info *pkt) +struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av, + int paylen, struct rxe_pkt_info *pkt) { unsigned int hdr_len; struct sk_buff *skb; @@ -511,31 +510,16 @@ static struct sk_buff *init_packet(struct rxe_dev *rxe, struct rxe_av *av, * this is required by rxe_cfg to match rxe devices in * /sys/class/infiniband up with their underlying ethernet devices */ -static char *parent_name(struct rxe_dev *rxe, unsigned int port_num) +const char *rxe_parent_name(struct rxe_dev *rxe, unsigned int port_num) { return rxe->ndev->name; } -static enum rdma_link_layer link_layer(struct rxe_dev *rxe, - unsigned int port_num) +enum rdma_link_layer rxe_link_layer(struct rxe_dev *rxe, unsigned int port_num) { return IB_LINK_LAYER_ETHERNET; } -static struct rxe_ifc_ops ifc_ops = { - .node_guid = node_guid, - .port_guid = port_guid, - .dma_device = dma_device, - .mcast_add = mcast_add, - .mcast_delete = mcast_delete, - .prepare = prepare, - .send = send, - .loopback = loopback, - .init_packet = init_packet, - .parent_name = parent_name, - .link_layer = link_layer, -}; - struct rxe_dev *rxe_net_add(struct net_device *ndev) { int err; @@ -545,7 +529,6 @@ struct rxe_dev *rxe_net_add(struct net_device *ndev) if (!rxe) return NULL; - rxe->ifc_ops = &ifc_ops; rxe->ndev = ndev; err = rxe_add(rxe, ndev->mtu); diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index 512e74326b16..dbfde0dc6ff7 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -404,7 +404,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp, /* init skb */ av = rxe_get_av(pkt); - skb = rxe->ifc_ops->init_packet(rxe, av, paylen, pkt); + skb = rxe_init_packet(rxe, av, paylen, pkt); if (unlikely(!skb)) return NULL; @@ -475,7 +475,7 @@ static int fill_packet(struct rxe_qp *qp, struct rxe_send_wqe *wqe, u32 *p; int err; - err = rxe->ifc_ops->prepare(rxe, pkt, skb, &crc); + err = rxe_prepare(rxe, pkt, skb, &crc); if (err) return err; diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c index 05f374986cea..7bf20ced2078 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c @@ -608,7 +608,7 @@ static struct sk_buff *prepare_ack_packet(struct rxe_qp *qp, pad = (-payload) & 0x3; paylen = rxe_opcode[opcode].length + payload + pad + RXE_ICRC_SIZE; - skb = rxe->ifc_ops->init_packet(rxe, &qp->pri_av, paylen, ack); + skb = rxe_init_packet(rxe, &qp->pri_av, paylen, ack); if (!skb) return NULL; @@ -637,7 +637,7 @@ static struct sk_buff *prepare_ack_packet(struct rxe_qp *qp, if (ack->mask & RXE_ATMACK_MASK) atmack_set_orig(ack, qp->resp.atomic_orig); - err = rxe->ifc_ops->prepare(rxe, ack, skb, &crc); + err = rxe_prepare(rxe, ack, skb, &crc); if (err) { kfree_skb(skb); return NULL; diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index beb7021ff18a..e4de37fb9aab 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -234,7 +234,7 @@ static enum rdma_link_layer rxe_get_link_layer(struct ib_device *dev, { struct rxe_dev *rxe = to_rdev(dev); - return rxe->ifc_ops->link_layer(rxe, port_num); + return rxe_link_layer(rxe, port_num); } static struct ib_ucontext *rxe_alloc_ucontext(struct ib_device *dev, @@ -1209,10 +1209,8 @@ static ssize_t rxe_show_parent(struct device *device, { struct rxe_dev *rxe = container_of(device, struct rxe_dev, ib_dev.dev); - char *name; - name = rxe->ifc_ops->parent_name(rxe, 1); - return snprintf(buf, 16, "%s\n", name); + return snprintf(buf, 16, "%s\n", rxe_parent_name(rxe, 1)); } static DEVICE_ATTR(parent, S_IRUGO, rxe_show_parent, NULL); @@ -1234,9 +1232,9 @@ int rxe_register_device(struct rxe_dev *rxe) dev->node_type = RDMA_NODE_IB_CA; dev->phys_port_cnt = 1; dev->num_comp_vectors = RXE_NUM_COMP_VECTORS; - dev->dma_device = rxe->ifc_ops->dma_device(rxe); + dev->dma_device = rxe_dma_device(rxe); dev->local_dma_lkey = 0; - dev->node_guid = rxe->ifc_ops->node_guid(rxe); + dev->node_guid = rxe_node_guid(rxe); dev->dma_ops = &rxe_dma_mapping_ops; dev->uverbs_abi_ver = RXE_UVERBS_ABI_VERSION; diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h index 536974b69ed9..e100c500ae85 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.h +++ b/drivers/infiniband/sw/rxe/rxe_verbs.h @@ -372,26 +372,6 @@ struct rxe_port { u32 qp_gsi_index; }; -/* callbacks from rdma_rxe to network interface layer */ -struct rxe_ifc_ops { - void (*release)(struct rxe_dev *rxe); - __be64 (*node_guid)(struct rxe_dev *rxe); - __be64 (*port_guid)(struct rxe_dev *rxe); - struct device *(*dma_device)(struct rxe_dev *rxe); - int (*mcast_add)(struct rxe_dev *rxe, union ib_gid *mgid); - int (*mcast_delete)(struct rxe_dev *rxe, union ib_gid *mgid); - int (*prepare)(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, - struct sk_buff *skb, u32 *crc); - int (*send)(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, - struct sk_buff *skb); - int (*loopback)(struct sk_buff *skb); - struct sk_buff *(*init_packet)(struct rxe_dev *rxe, struct rxe_av *av, - int paylen, struct rxe_pkt_info *pkt); - char *(*parent_name)(struct rxe_dev *rxe, unsigned int port_num); - enum rdma_link_layer (*link_layer)(struct rxe_dev *rxe, - unsigned int port_num); -}; - struct rxe_dev { struct ib_device ib_dev; struct ib_device_attr attr; @@ -400,8 +380,6 @@ struct rxe_dev { struct kref ref_cnt; struct mutex usdev_lock; - struct rxe_ifc_ops *ifc_ops; - struct net_device *ndev; int xmit_errors;