summaryrefslogtreecommitdiffstats
path: root/include/rdma/rdma_vt.h
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2016-01-06 19:02:52 +0100
committerDoug Ledford <dledford@redhat.com>2016-03-11 02:37:11 +0100
commitaec5778775ac03ee6cfd6480adbbf6b05513d77b (patch)
treea5ad1f53c61b582de0130839f7c45d7be0c2ddff /include/rdma/rdma_vt.h
parentIB/rdmavt: Add queue pair data structure to rdmavt (diff)
downloadlinux-aec5778775ac03ee6cfd6480adbbf6b05513d77b.tar.xz
linux-aec5778775ac03ee6cfd6480adbbf6b05513d77b.zip
IB/rdmavt: Move driver helper functions to a common structure
Drivers are going to need to provide multiple functions for rdmavt to call in to. We already have one, so go ahead and push this into a data structure designated for driver supplied functions. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/rdma_vt.h')
-rw-r--r--include/rdma/rdma_vt.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h
index 9baa7f04e8d0..e0beedc6110e 100644
--- a/include/rdma/rdma_vt.h
+++ b/include/rdma/rdma_vt.h
@@ -383,6 +383,19 @@ struct rvt_driver_params {
*/
};
+/*
+ * Functions that drivers are required to support
+ */
+struct rvt_driver_provided {
+ /*
+ * The work to create port files in /sys/class Infiniband is different
+ * depending on the driver. This should not be extracted away and
+ * instead drivers are responsible for setting the correct callback for
+ * this.
+ */
+ int (*port_callback)(struct ib_device *, u8, struct kobject *);
+};
+
/* Protection domain */
struct rvt_pd {
struct ib_pd ibpd;
@@ -407,13 +420,8 @@ struct rvt_dev_info {
/* PKey Table goes here */
- /*
- * The work to create port files in /sys/class Infiniband is different
- * depending on the driver. This should not be extracted away and
- * instead drivers are responsible for setting the correct callback for
- * this.
- */
- int (*port_callback)(struct ib_device *, u8, struct kobject *);
+ /* Driver specific helper functions */
+ struct rvt_driver_provided driver_f;
/* Internal use */
int n_pds_allocated;