lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181009162817.4635-6-kamalheib1@gmail.com>
Date:   Tue,  9 Oct 2018 19:28:04 +0300
From:   Kamal Heib <kamalheib1@...il.com>
To:     Doug Ledford <dledford@...hat.com>, Jason Gunthorpe <jgg@...pe.ca>
Cc:     linux-kernel@...r.kernel.org, kamalheib1@...il.com
Subject: [PATCH rdma-next 05/18] RDMA/hfi1: Initialize ib_device_ops struct

Initialize ib_device_ops with the supported operations.

Signed-off-by: Kamal Heib <kamalheib1@...il.com>
---
 drivers/infiniband/hw/hfi1/verbs.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c
index bc7f00ba1988..c63f331dbf7a 100644
--- a/drivers/infiniband/hw/hfi1/verbs.c
+++ b/drivers/infiniband/hw/hfi1/verbs.c
@@ -1610,6 +1610,15 @@ static int get_hw_stats(struct ib_device *ibdev, struct rdma_hw_stats *stats,
 	return count;
 }
 
+static struct ib_device_ops hfi1_dev_ops = {
+	.modify_device		= modify_device,
+	.alloc_hw_stats		= alloc_hw_stats,
+	.get_hw_stats		= get_hw_stats,
+	.alloc_rdma_netdev	= hfi1_vnic_alloc_rn,
+	.process_mad		= hfi1_process_mad,
+	.get_dev_fw_str		= hfi1_get_dev_fw_str,
+};
+
 /**
  * hfi1_register_ib_device - register our device with the infiniband core
  * @dd: the device data structure
@@ -1662,6 +1671,8 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd)
 	ibdev->process_mad = hfi1_process_mad;
 	ibdev->get_dev_fw_str = hfi1_get_dev_fw_str;
 
+	ib_set_device_ops(ibdev, &hfi1_dev_ops);
+
 	strlcpy(ibdev->node_desc, init_utsname()->nodename,
 		sizeof(ibdev->node_desc));
 
-- 
2.14.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ