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-4-kamalheib1@gmail.com>
Date:   Tue,  9 Oct 2018 19:28:02 +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 03/18] RDMA/cxgb3: Initialize ib_device_ops struct

Initialize ib_device_ops with the supported operations.

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

diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index 39530cc15f95..4fe13dd1ef7d 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -1313,6 +1313,39 @@ static void get_dev_fw_ver_str(struct ib_device *ibdev, char *str)
 	snprintf(str, IB_FW_VERSION_NAME_MAX, "%s", info.fw_version);
 }
 
+static struct ib_device_ops iwch_dev_ops = {
+	.query_device		= iwch_query_device,
+	.query_port		= iwch_query_port,
+	.query_pkey		= iwch_query_pkey,
+	.query_gid		= iwch_query_gid,
+	.alloc_ucontext		= iwch_alloc_ucontext,
+	.dealloc_ucontext	= iwch_dealloc_ucontext,
+	.mmap			= iwch_mmap,
+	.alloc_pd		= iwch_allocate_pd,
+	.dealloc_pd		= iwch_deallocate_pd,
+	.create_qp		= iwch_create_qp,
+	.modify_qp		= iwch_ib_modify_qp,
+	.destroy_qp		= iwch_destroy_qp,
+	.create_cq		= iwch_create_cq,
+	.destroy_cq		= iwch_destroy_cq,
+	.resize_cq		= iwch_resize_cq,
+	.poll_cq		= iwch_poll_cq,
+	.get_dma_mr		= iwch_get_dma_mr,
+	.reg_user_mr		= iwch_reg_user_mr,
+	.dereg_mr		= iwch_dereg_mr,
+	.alloc_mw		= iwch_alloc_mw,
+	.dealloc_mw		= iwch_dealloc_mw,
+	.alloc_mr		= iwch_alloc_mr,
+	.map_mr_sg		= iwch_map_mr_sg,
+	.req_notify_cq		= iwch_arm_cq,
+	.post_send		= iwch_post_send,
+	.post_recv		= iwch_post_receive,
+	.alloc_hw_stats		= iwch_alloc_stats,
+	.get_hw_stats		= iwch_get_mib,
+	.get_port_immutable	= iwch_port_immutable,
+	.get_dev_fw_str		= get_dev_fw_ver_str,
+};
+
 int iwch_register_device(struct iwch_dev *dev)
 {
 	int ret;
@@ -1401,6 +1434,7 @@ int iwch_register_device(struct iwch_dev *dev)
 	       sizeof(dev->ibdev.iwcm->ifname));
 
 	dev->ibdev.driver_id = RDMA_DRIVER_CXGB3;
+	ib_set_device_ops(&dev->ibdev, &iwch_dev_ops);
 	ret = ib_register_device(&dev->ibdev, "cxgb3_%d", NULL);
 	if (ret)
 		goto bail1;
-- 
2.14.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ