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]
Date:   Tue,  9 Oct 2018 19:28:03 +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 04/18] RDMA/cxgb4: Initialize ib_device_ops struct

Initialize ib_device_ops with the supported operations.

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

diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c
index 416f8d1af610..66bf1aae4021 100644
--- a/drivers/infiniband/hw/cxgb4/provider.c
+++ b/drivers/infiniband/hw/cxgb4/provider.c
@@ -527,6 +527,44 @@ static int fill_res_entry(struct sk_buff *msg, struct rdma_restrack_entry *res)
 		c4iw_restrack_funcs[res->type](msg, res) : 0;
 }
 
+static struct ib_device_ops c4iw_dev_ops = {
+	.query_device		= c4iw_query_device,
+	.query_port		= c4iw_query_port,
+	.query_pkey		= c4iw_query_pkey,
+	.query_gid		= c4iw_query_gid,
+	.alloc_ucontext		= c4iw_alloc_ucontext,
+	.dealloc_ucontext	= c4iw_dealloc_ucontext,
+	.mmap			= c4iw_mmap,
+	.alloc_pd		= c4iw_allocate_pd,
+	.dealloc_pd		= c4iw_deallocate_pd,
+	.create_qp		= c4iw_create_qp,
+	.modify_qp		= c4iw_ib_modify_qp,
+	.query_qp		= c4iw_ib_query_qp,
+	.destroy_qp		= c4iw_destroy_qp,
+	.create_srq		= c4iw_create_srq,
+	.modify_srq		= c4iw_modify_srq,
+	.destroy_srq		= c4iw_destroy_srq,
+	.create_cq		= c4iw_create_cq,
+	.destroy_cq		= c4iw_destroy_cq,
+	.poll_cq		= c4iw_poll_cq,
+	.get_dma_mr		= c4iw_get_dma_mr,
+	.reg_user_mr		= c4iw_reg_user_mr,
+	.dereg_mr		= c4iw_dereg_mr,
+	.alloc_mw		= c4iw_alloc_mw,
+	.dealloc_mw		= c4iw_dealloc_mw,
+	.alloc_mr		= c4iw_alloc_mr,
+	.map_mr_sg		= c4iw_map_mr_sg,
+	.req_notify_cq		= c4iw_arm_cq,
+	.post_send		= c4iw_post_send,
+	.post_recv		= c4iw_post_receive,
+	.post_srq_recv		= c4iw_post_srq_recv,
+	.alloc_hw_stats		= c4iw_alloc_stats,
+	.get_hw_stats		= c4iw_get_mib,
+	.get_port_immutable	= c4iw_port_immutable,
+	.get_dev_fw_str		= get_dev_fw_str,
+	.get_netdev		= get_netdev,
+};
+
 void c4iw_register_device(struct work_struct *work)
 {
 	int ret;
@@ -626,6 +664,7 @@ void c4iw_register_device(struct work_struct *work)
 	       sizeof(dev->ibdev.iwcm->ifname));
 
 	dev->ibdev.driver_id = RDMA_DRIVER_CXGB4;
+	ib_set_device_ops(&dev->ibdev, &c4iw_dev_ops);
 	ret = ib_register_device(&dev->ibdev, "cxgb4_%d", NULL);
 	if (ret)
 		goto err_kfree_iwcm;
-- 
2.14.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ