From patchwork Mon Jan 2 10:43:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9493349 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 F36B660414 for ; Mon, 2 Jan 2017 10:44:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0898720008 for ; Mon, 2 Jan 2017 10:44:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0DF726212; Mon, 2 Jan 2017 10:44:11 +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 1266B20008 for ; Mon, 2 Jan 2017 10:44:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755303AbdABKoJ (ORCPT ); Mon, 2 Jan 2017 05:44:09 -0500 Received: from mail-by2nam01on0040.outbound.protection.outlook.com ([104.47.34.40]:27360 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751208AbdABKoH (ORCPT ); Mon, 2 Jan 2017 05:44:07 -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=Snvp58j7Wj6d+mPjXr24d+NAAJJt5D7uE4eLimvRoMg=; b=lYK8+zUpQTAJdOh9Xth14vcUolHs3L/98PfIyW8h+KHtGJs454LbpUk09XjyXt812UdohzTbjjViLIRDeQMwdKDkAzaZcYIy3gLnPGtV4SAeNwhQPluivGHoP9od6h9WiYUemGC0P/JzDu7H8si2PNFuGrluxgofHvj64E9WUmE= Received: from BLUPR02CA032.namprd02.prod.outlook.com (10.160.23.150) by BLUPR02MB390.namprd02.prod.outlook.com (10.141.78.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Mon, 2 Jan 2017 10:44:04 +0000 Received: from BL2FFO11FD027.protection.gbl (2a01:111:f400:7c09::186) by BLUPR02CA032.outlook.office365.com (2a01:111:e400:8ad::22) 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; Mon, 2 Jan 2017 10:44:04 +0000 Authentication-Results: spf=pass (sender IP is 74.221.232.55) smtp.mailfrom=sandisk.com; dell.com; dkim=none (message not signed) header.d=none;dell.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 74.221.232.55 as permitted sender) receiver=protection.outlook.com; client-ip=74.221.232.55; helo=sacsmgep15.sandisk.com; Received: from sacsmgep15.sandisk.com (74.221.232.55) by BL2FFO11FD027.mail.protection.outlook.com (10.173.161.106) 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; Mon, 2 Jan 2017 10:44:03 +0000 X-AuditID: ac1c2134-3ffe798000000abf-b7-586a3a38b8af Received: from SACHUBIP01.sdcorp.global.sandisk.com (Unknown_Domain [172.28.1.254]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 8A.53.02751.83A3A685; Mon, 2 Jan 2017 03:32:08 -0800 (PST) Received: from SACCASIP04.sdcorp.global.sandisk.com (10.181.10.113) by SACHUBIP01.sdcorp.global.sandisk.com (10.181.10.103) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 2 Jan 2017 02:43:59 -0800 Received: from ULS-OP-MBXIP03.sdcorp.global.sandisk.com ([fe80::f9ec:1e1b:1439:62d8]) by SACCASIP04.sdcorp.global.sandisk.com ([::1]) with mapi id 14.03.0319.002; Mon, 2 Jan 2017 02:43:58 -0800 From: Bart Van Assche To: "dledford@redhat.com" CC: "andrew.boyer@dell.com" , "monis@mellanox.com" , "linux-rdma@vger.kernel.org" Subject: [PATCH 14/15] IB/rxe: Remove a pointless indirection layer Thread-Topic: [PATCH 14/15] IB/rxe: Remove a pointless indirection layer Thread-Index: AQHSZOUevvLRDt4vIE+pfJO2zodY0g== Date: Mon, 2 Jan 2017 10:43:57 +0000 Message-ID: <1483353755.3592.40.camel@sandisk.com> References: <1483353316.3592.14.camel@sandisk.com> In-Reply-To: <1483353316.3592.14.camel@sandisk.com> Accept-Language: nl-NL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.28.1.254] Content-ID: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsWyRobxn66FVVaEwYW3UhbX2vexWrw8/4HV 4tmhXhaLDe/XsDuweEyaOYPZ49n0w0we7/ddZfP4vEkugCWKyyYlNSezLLVI3y6BK+Pc0VuM BUuaGSsmbPrK2MD4pb6LkZNDQsBE4t/BL4xdjFwcQgJLmCRWbljIBuGcY5RY2zuZBcI5yijx fkM7K0gLm4CRxOwJe1hAbBEBfYlDq1eCtTMLzGWUWH9nKTtIQljAWeLh8h6oIg+JmdfamSBs PYlTU26CxVkEVCQubTnPCGLzAg098aYNzBYCsk92PgOzOQWMJY5PPw5Uz8HBKCAr0fKaGyTM LCAucevJfCaIFwQkluw5zwxhi0q8fPyPFcJWkPi84h8bSCuzgKbE+l36EK1WEm//72WEsBUl pnQ/ZIe4QFDi5MwnLBAXqEucvLOWeQKjxCwk22YhTJqFZNIsJJNmIZm0gJF1FaNYcWJycW56 aoGhqV5xYl5KZnG2XnJ+7iZGcMQqmuxg7NjofohRgINRiYf3RFpmhBBrYllxZe4hRgkOZiUR 3hb1rAgh3pTEyqrUovz4otKc1OJDjNIcLErivPdv7g4VEkhPLEnNTk0tSC2CyTJxcEo1MBbc 8W0uOMhX1q384bOktqbr5UMXN7154P5iavflsx8uNq9+XPxWI2aBiv/+uhzJ9Svf6AQ0bH/9 cYLTFYE/BbwWqi4pedlqq+yaJHIffpubHHgpueZK/eLb173vrv+9mlPAYNEd6borm5ZtWnfl yzeZ1JWHef5viZ60eVnbac/wkI15Nx1Vdn9XYinOSDTUYi4qTgQAymmnntQCAAA= X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:74.221.232.55; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39850400002)(39840400002)(39410400002)(39860400002)(39450400003)(2980300002)(438002)(189002)(199003)(76176999)(2900100001)(54906002)(50986999)(4326007)(54356999)(47776003)(50466002)(110136003)(92566002)(8666007)(5660300001)(2950100002)(33646002)(23676002)(103116003)(575784001)(6916009)(626004)(68736007)(102836003)(86362001)(3846002)(6116002)(2501003)(5250100002)(81166006)(5640700003)(69596002)(8936002)(106466001)(2351001)(36756003)(106116001)(38730400001)(7736002)(8676002)(2270400002)(356003)(2906002)(97736004)(81156014)(189998001)(305945005)(1730700003)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB390; H:sacsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD027; 1:7mXwzZXYDcFW3HAvcLQAcURny1XCENcPorj5WCDyvWSeL3apMJUS7q7oiK8cGkNQj+/v74KNdhZi5JCs1PPn9Z5zdWqHYdoFWEPMqgO+Bp+e0LszSY5hFp0G5KJZfIUatKAYn+sMztjzA/d0Ly02/85O9BwpSeIxQyndUQtdPUOl2RSreblk7C7L1tRQETyGCi9V1umjB+RgeVPSlvbOUMksUJsUMsmzW+voB7PSJxrmtTsxe3BZ9CrjC/4hrx4B4D9ROcQw2yZ+Dg5AL/p5ZRR2x5pdebmFAVnWpZK4GHyEpx9nDeI+LHo0HTeTrZjrCuvHSIrtl9QmVTlvs3/eyCxZwSplRb0qJMETvnegx5eK6Igim6VKZiPIs4rVLfk7HXCFmHgfhVHCLwx9cItOIQB/ZjFBwf6bzVDhyOxZgVDeRUU6awifxhgYVROPj/rKU2vSACjEXbaWtNhLaIKR0K6ZzpELCnLYogsTkCZF9/WsOfoAdCn2SVTJCm8k18+RUkXF/33xL06rHH/Sm2MBlw6A30hr1J2QDFQ6KnjZ2FOuwldqpdrTg3vGIkj1lz5twrLkXAlxFUu6Jvs4ZrSgoVDD35rN8xy8ShNBhQ8czZs= X-MS-Office365-Filtering-Correlation-Id: f270493c-b55d-4002-504a-08d432fc4548 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BLUPR02MB390; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB390; 3:2jWkyYX6X1W27NPKV0eCWC0ISSl8pJq0yLat6lFV0KKmZI9Y05NWX3G4LWzW1/CrfafE0RUKIVHOKWv37CXiyfozDtjRcxz5RZTd+tL5FN47uWRdD7oL2/OafLHHHsHgcCWpGlMJCb0uZ83kvIEVJaNclYGeSmgt6YYYCYe/ILzkxOnyaRxCQkazpU+CVKexcintaYpUCZk/dLp71YhWN6v/JNYUBClibdIyfTmH+/vd+FG0dCBk+nNHMDQEPDcIb1gb6yy6AyqpFy61Z3tq22K3hrdluXGpLTrSncUvM21c8ZWklifqGm7duJEl7xiTsI/h4q5ZlOdAGidJ+7K35wtudBCoigqCGZDN6ZI7/nf0BPm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IHWAPPH7CdD9VwHvBNMoqyg2dWthvMxsX+s7lY/F3WP8tWHrtA3o1KwsCv62WPZZZkbxbHkRsfkAQOk4RoA9qcUyEFVBjCqgsHOo7XwNxYjLuIFe6MdYpacxE8H1iNZJaLR6cn0K1GziXmMkSsy7MuzDti024N5eEPjxQGswB+lWi0=; 20:Y0I2hzZEAT5bnKzNGqyWU5EI/gRwXdypguvv97dSSuu94aEXBp0gBVRrth8e5CNeHXNRfxkTPphtDOupf8FYD6wqsYw+i6u4xrBZhRO6nIYfpLU5ybGsL/+OxwEMuQOggklXgdZYgdxNhBn24e9NHYXPOfwdLyVF6aJJzk/JkYOM3+o4KCODh935NoIeMVM8zV7+2S32DrkGJyuDyNJ4fxSh/JlkWkLNOwkK7esPIr83FeF5NHaRIqTPgzrWTEQ2aCJR0j+sD7l+JQLgVClzdd2hh9zrI4A92qy0L4S01W9ISGqDjIHZgi6uRblNhj5g/rzUDOJOiQABArp6Z0LaPo1kLIFCzjU3PRUeNUbPylw91ra5pm9B/76XxD9AftlFejoKjkRpvP+7HY+ylATSYIlpSiECRAynbKaP15Wil7uYZh86NxdpfWU4qSMGLJjzLuO6E6f7LKhBYlbISxZDT/QrExyI6EiQIJ+ZGeq4bfxQI7QkM/VV+lYJ+9x+BRle 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)(13024025)(13023025)(13015025)(13017025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:BLUPR02MB390; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB390; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB390; 4:2g/lTNQkhx6D97VB8zNp/lsTxDbhyagGgugD/OsmXIXkfp2PxRPbl8DaeEZI1JBCkmvtQWhWzkz+hWrOauCXJ/7b94V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xww3l/I1uQ== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2017 10:44:03.5980 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[74.221.232.55]; Helo=[sacsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB390 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 Cc: Moni Shoua Cc: Andrew Boyer ---  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(-) --  2.11.0 Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer 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 1bba4a734e73..522a4e4a21ce 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;