From patchwork Tue Jan 10 19:08:21 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: 9508365 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 CCDA960231 for ; Tue, 10 Jan 2017 19:12:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEC0928595 for ; Tue, 10 Jan 2017 19:12:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B13ED28553; Tue, 10 Jan 2017 19:12:31 +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 CABA828553 for ; Tue, 10 Jan 2017 19:12:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936871AbdAJTKX (ORCPT ); Tue, 10 Jan 2017 14:10:23 -0500 Received: from mail-sn1nam02on0077.outbound.protection.outlook.com ([104.47.36.77]:13088 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1765913AbdAJTIf (ORCPT ); Tue, 10 Jan 2017 14:08:35 -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=hi3SsTsXIsiPyCbiD1HmK6g36k0OrB7ZANP9r09XmKv1gz/eFJrMORr2p87DnbGws9mio/nprpCkUqUCUJtFjxyLMo4E8nFaVxn+IWsAE097qGHVrC/I1sGbfIi5ChtZ56tP2hZNZDbJKwBhmm+2b6o+MOL7O+yEvf0s0/V6Ae0= Received: from BN6PR02CA0032.namprd02.prod.outlook.com (10.173.146.146) 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:08:31 +0000 Received: from BN1BFFO11OLC001.protection.gbl (2a01:111:f400:7c10::1:101) by BN6PR02CA0032.outlook.office365.com (2603:10b6:404:5f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12 via Frontend Transport; Tue, 10 Jan 2017 19:08:32 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) 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.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BN1BFFO11OLC001.mail.protection.outlook.com (10.58.145.12) 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:08:30 +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.A9.65426.98E25785; Tue, 10 Jan 2017 10:57:14 -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:08:24 -0800 X-AuditID: 0ac94369-b62949800001ff92-ce-58752e892bc0 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 6A.38.16817.82135785; Tue, 10 Jan 2017 11:08:24 -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:08:21 -0800 Message-ID: <20170110190822.16953-15-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170110190822.16953-14-bart.vanassche@sandisk.com> References: <20170110190822.16953-1-bart.vanassche@sandisk.com> <20170110190822.16953-2-bart.vanassche@sandisk.com> <20170110190822.16953-3-bart.vanassche@sandisk.com> <20170110190822.16953-4-bart.vanassche@sandisk.com> <20170110190822.16953-5-bart.vanassche@sandisk.com> <20170110190822.16953-6-bart.vanassche@sandisk.com> <20170110190822.16953-7-bart.vanassche@sandisk.com> <20170110190822.16953-8-bart.vanassche@sandisk.com> <20170110190822.16953-9-bart.vanassche@sandisk.com> <20170110190822.16953-10-bart.vanassche@sandisk.com> <20170110190822.16953-11-bart.vanassche@sandisk.com> <20170110190822.16953-12-bart.vanassche@sandisk.com> <20170110190822.16953-13-bart.vanassche@sandisk.com> <20170110190822.16953-14-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsXCddJ5kW6XXmmEwb5DHBYvz39gtXh2qJfF YsP7NewOzB7Pph9m8ni/7yqbx+dNcgHMUVw2Kak5mWWpRfp2CVwZq992sBaciauYOekKUwPj W78uRk4OCQETiQd/FrB0MXJxCAksZZKYt28iI4SzjVFizq6X7F2MHGBVnfccIOIbGSXObJ7N CtLNJmAk8e39TBYQW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yjAQAA MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; 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)(93886004)(2270400002)(356003)(106466001)(76176999)(33646002)(92566002)(50226002)(5003940100001)(575784001)(97736004)(68736007)(2906002)(305945005)(77096006)(8676002)(5660300001)(48376002)(38730400001)(54906002)(110136003)(6666003)(626004)(81156014)(8936002)(81166006)(6916009)(50986999)(50466002)(2950100002)(1076002)(4326007); DIR:OUT; SFP:1101; SCL:1; SRVR:CO1PR02MB048; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11OLC001; 1:zWBulVhCv2ucsV6FirpLUn4IvyTLGRczdsSIjMaSFl4Bw42K8tBn0yXPxpzJW56Jz2zsiTWoYCfdnu0glnB+sXRch6NrUapYfsuIBFRNR7vEG/xkOivsG0ey1N0d3P7sALhIETzlETMOdNOiE3yjBscIgaLxr9xs38HL6PUE7xIe6jqowuTmNLdv9Wl+vKPj+Lsg4n8TTieX4SzP+CFLrC8PR4T+zTPbJPAIddyMSy10U/NTbVLu+Raf5UypMqfvjQLkAn3WDx+rqoxMuQgLfp0/VgpcLOZ/mKik2rMHw5J6m/kFDEp/PQwBwZo9H45MZNre/t5HinxhCeUqQSuAPjHUQ0a6ReMJc3APwImafT0+ZMSKn1QtUMajhJqr82B35o0JJKMR8dFdhnmgXgasGtRrv1SJ//yboPxBq+9mObRzkSP5o7H2VqEliZNw1niH+YU7glGiFt6OpafVws0OZ0WL2o//9gzez16BLWPkAZE= X-MS-Office365-Filtering-Correlation-Id: a4dc4156-b43c-435e-4913-08d4398c1162 X-Microsoft-Antispam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eIgrOOJvPH1qHopEeihdUoak617acNWfMt3IezjbjTroCkBFJlFs0DFullPnrwbR7+ZhtIVpAM+pl2LknnHXv2yQJyuQv+zZwUxK47c6MJDYdZWEAN8DfApJefTLCeTn05mlXo3fX25/5shwxHjJYfo5WJOcpxRSGYuXisnrXiVqJsYK8yzghF5mR4UyGibnLsJFsfU4dA8mkoojJRW6/S5sHUXxhb8SmRrmti8Gs6WM14LEIdDF5xg=; 20:PEtmpGi2AAoV6b6qdPAZ3PgDNP/jq8bwcAg71HK+BO+X0t3jCWRdiZN735UO0sY7tgRUesTNoDxm6tukkfxZNiItGz+U5MTdVlspQT0MPpkaBHI9g6BVDxSlny1oTKO12PtqDWUVeX+iWi+OZQIt61yLrWUn8aqwbBKfTPueDcBLIxWCDsjSKgYa6s9AZFeE4aD+0omJPjNq175LPom3lJSBlZCzrzOCCFhmdo6GfxJD4OKI0+4hc3xviHm2925cm404noUg/oFR3IcCoxeuRz6RTPyouw7acZEwkIdlrDb8KLxJKDSIQPH58GiIaYoqpLvIbIt8Ot9ZP4Eddd3ZeMMBgrenrAab3SAzXIzDl7NGBGMD1xOLSTOD9awdadMh/ISeV2/BzW6a1xq0wvwAFZbLs6GruOIedDYuNu5+v0qCIF6NHG0aHWbfFs9dnlcKC/xt4bkyOKEvEhkq6ax+ycgms1epz1DKgjTVMrUIK7vMfvYpfE4LbAtJZeciR755 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:uga4gUwYzcfZrps47S3r8vTOBJsG5mK1LejyAPCqWvX+l5pq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7Xo1c+cdb59P1CdILJqqwjehVXTZT0vKBNoxtU7RMpY?= =?us-ascii?Q?DP4/HEf6gfxNU=3D?= X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 6:OpihVOkHV/Achdn4XWgXacnrIV1z54Xh5bQGGfIZ2TZI+OeZcQXBuXuKkCrVEjVEyaTXpJA6iY05yNbHRCz21I+QpIqwcx7l9KMw8lbXyAnmYSglM/041dHHD4ddSV7R5otaPs/+08mj36LBYL31dHpWixBmMKnjSaWJo2eLXNrRBHRdtW/1pIENU6zAAvARWoeRJW2PGABL/vkL+Ew27KacMoSZpCYebxx1/3rPm8sZ8wuOSWJAltsuYLN3X+EqPyJj7DEyv6u7tcUBzhZkYsy29PjtCE6JIrLtdvqRQLrBo+cbOkiwEqZmNVepkHuMl8mcO1ZRsCZ2iR2UhgXWXMLGeN9jB+v6pDH8EQD3Ha+zSjzRLvVnFtTRXIQHLl0QFimr1UVzwXiJGnyawW2uilyuCT/8SZ1pCLxBgFRHDouG+A7cHV83xciQfEA6EIKOnI4M4UWH68bNSpB7K80JvQ==; 5:TscrCeHvF5bsBQAdqb1UF6PmOzw1AVqCKZZQkW0nQT6H3HvO3poW+yKzn104Evz31SbMgqYxKwVAbUNNfkgFJoui2bd0q/RI4CeP4pi63/s8acKDIPg1qj0JMS0DLZKOAPTi01rM6+bYapuTLp9mMPLvuGmyBBQjU/n6VWSvpjM=; 24:4pii/r3+4jg/U5v/H415IXD74aOe3aTTFkRVbbF3pYEG1gw+7gIJYS8P9Yjh7cFPQHUGQqJHZNpOL7cKSYr6SczdIgFTKZjasYGnI0u2CT4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB048; 7:6VGU/IqFeIyAruG3lAv4aYwOlN97T0EVNs8hGpQxnb7Pxwx6xp9WYlm0kgzvzR50pSWleVCAeHfzr2XphMrs7NPzmeBKKJeCNnn7UGCM9FCtJPxzFc/exa1fJk01nvvI7YCK2Qp8aUS8QMfUxjDRpA69twzbnj8gVXOGN1Xkj9gNq/6NGfYzpCybMQaa2of+4gdcZYRz553z+TqalVGkz+wixWMOLvTi3G85Ef1BIKnjlXNosMDZWWR8laNfPQ+zjmzTskro3iQc8itRDCOB9QbYBLiRFv2itM/dsZk9Eav/DDQTY5QTe7+Jcl+OjONL5Uxh4MmdRrAwPe3gDtnZ1EUBjd/tvQG/ihXSgdd5q+bN44OM70KdHRoUgiFLwxgJKqSxX7JkRayTjv4vKYU2+vkYfotTPWKn99MnjX6/YtBX8V9q9Kmwpud8Wv8oxtGrI4uaNzluz5NtCPr4xIVEgA== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2017 19:08:30.9233 (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.21]; Helo=[milsmgep15.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;