public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kamal Heib <kamalheib1@gmail.com>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@ziepe.ca>
Cc: linux-kernel@vger.kernel.org, kamalheib1@gmail.com
Subject: [PATCH rdma-next 07/18] RDMA/i40iw: Initialize ib_device_ops struct
Date: Tue,  9 Oct 2018 19:28:06 +0300	[thread overview]
Message-ID: <20181009162817.4635-8-kamalheib1@gmail.com> (raw)
In-Reply-To: <20181009162817.4635-1-kamalheib1@gmail.com>

Initialize ib_device_ops with the supported operations.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
---
 drivers/infiniband/hw/i40iw/i40iw_verbs.c | 35 +++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
index cb2aef874ca8..7841e609d81a 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
@@ -2737,6 +2737,40 @@ static const struct cpumask *i40iw_get_vector_affinity(struct ib_device *ibdev,
 	return irq_get_affinity_mask(msix_vec->irq);
 }
 
+static struct ib_device_ops i40iw_dev_ops = {
+	.query_port		= i40iw_query_port,
+	.query_pkey		= i40iw_query_pkey,
+	.query_gid		= i40iw_query_gid,
+	.alloc_ucontext		= i40iw_alloc_ucontext,
+	.dealloc_ucontext	= i40iw_dealloc_ucontext,
+	.mmap			= i40iw_mmap,
+	.alloc_pd		= i40iw_alloc_pd,
+	.dealloc_pd		= i40iw_dealloc_pd,
+	.create_qp		= i40iw_create_qp,
+	.modify_qp		= i40iw_modify_qp,
+	.query_qp		= i40iw_query_qp,
+	.destroy_qp		= i40iw_destroy_qp,
+	.create_cq		= i40iw_create_cq,
+	.destroy_cq		= i40iw_destroy_cq,
+	.get_dma_mr		= i40iw_get_dma_mr,
+	.reg_user_mr		= i40iw_reg_user_mr,
+	.dereg_mr		= i40iw_dereg_mr,
+	.alloc_hw_stats		= i40iw_alloc_hw_stats,
+	.get_hw_stats		= i40iw_get_hw_stats,
+	.query_device		= i40iw_query_device,
+	.drain_sq		= i40iw_drain_sq,
+	.drain_rq		= i40iw_drain_rq,
+	.alloc_mr		= i40iw_alloc_mr,
+	.map_mr_sg		= i40iw_map_mr_sg,
+	.get_port_immutable	= i40iw_port_immutable,
+	.get_dev_fw_str		= i40iw_get_dev_fw_str,
+	.poll_cq		= i40iw_poll_cq,
+	.req_notify_cq		= i40iw_req_notify_cq,
+	.post_send		= i40iw_post_send,
+	.post_recv		= i40iw_post_recv,
+	.get_vector_affinity	= i40iw_get_vector_affinity,
+};
+
 /**
  * i40iw_init_rdma_device - initialization of iwarp device
  * @iwdev: iwarp device
@@ -2830,6 +2864,7 @@ static struct i40iw_ib_device *i40iw_init_rdma_device(struct i40iw_device *iwdev
 	iwibdev->ibdev.post_send = i40iw_post_send;
 	iwibdev->ibdev.post_recv = i40iw_post_recv;
 	iwibdev->ibdev.get_vector_affinity = i40iw_get_vector_affinity;
+	ib_set_device_ops(&iwibdev->ibdev, &i40iw_dev_ops);
 
 	return iwibdev;
 }
-- 
2.14.4


  parent reply	other threads:[~2018-10-09 16:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 16:27 [PATCH rdma-next 00/18] RDMA: Add support for ib_device_ops Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 01/18] RDMA/core: Introduce ib_device_ops Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 02/18] RDMA/bnxt_re: Initialize ib_device_ops struct Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 03/18] RDMA/cxgb3: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 04/18] RDMA/cxgb4: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 05/18] RDMA/hfi1: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 06/18] RDMA/hns: " Kamal Heib
2018-10-09 16:28 ` Kamal Heib [this message]
2018-10-09 16:28 ` [PATCH rdma-next 08/18] RDMA/mlx4: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 09/18] RDMA/mlx5: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 10/18] RDMA/mthca: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 11/18] RDMA/nes: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 12/18] RDMA/ocrdma: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 13/18] RDMA/qedr: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 14/18] RDMA/qib: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 15/18] RDMA/usnic: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 16/18] RDMA/vmw_pvrdma: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 17/18] RDMA/rxe: " Kamal Heib
2018-10-09 16:28 ` [PATCH rdma-next 18/18] RDMA: Start use ib_device_ops Kamal Heib
2018-10-09 18:31 ` [PATCH rdma-next 00/18] RDMA: Add support for ib_device_ops Doug Ledford
2018-10-09 18:44   ` Kamal Heib
     [not found]     ` <CALEgSQuQyA9JiqaLfC5Un=foTeDHQG6EFJSCqBLTevD1KKKBhA@mail.gmail.com>
2018-10-09 19:01       ` Doug Ledford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181009162817.4635-8-kamalheib1@gmail.com \
    --to=kamalheib1@gmail.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox