summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/cma_priv.h
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-11-13 00:45:24 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-11-22 11:57:33 -0700
commiteeb8df87e4e71eae6dfb9cf518b2812c61f87c43 (patch)
tree428d8c179210c11bbf44a8998cf525282aaecbf1 /drivers/infiniband/core/cma_priv.h
parenta140692a52d2e12ba6a76dd042d556348e8bb55a (diff)
downloadlinux-eeb8df87e4e71eae6dfb9cf518b2812c61f87c43.tar.gz
linux-eeb8df87e4e71eae6dfb9cf518b2812c61f87c43.tar.bz2
linux-eeb8df87e4e71eae6dfb9cf518b2812c61f87c43.zip
RDMA/cma: Move cma module specific functions to cma_priv.h
Currently several rdma_cm module specific functions are declared in core_priv.h file. Now that we have cma_priv.h file specific to rdma_cm kernel module, move them from core_priv.h to cma_priv.h Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/cma_priv.h')
-rw-r--r--drivers/infiniband/core/cma_priv.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cma_priv.h b/drivers/infiniband/core/cma_priv.h
index 194cfe78c447..cf47c69436a7 100644
--- a/drivers/infiniband/core/cma_priv.h
+++ b/drivers/infiniband/core/cma_priv.h
@@ -94,4 +94,32 @@ struct rdma_id_private {
*/
struct rdma_restrack_entry res;
};
+
+#if IS_ENABLED(CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS)
+int cma_configfs_init(void);
+void cma_configfs_exit(void);
+#else
+static inline int cma_configfs_init(void)
+{
+ return 0;
+}
+
+static inline void cma_configfs_exit(void)
+{
+}
+#endif
+
+void cma_ref_dev(struct cma_device *dev);
+void cma_deref_dev(struct cma_device *dev);
+typedef bool (*cma_device_filter)(struct ib_device *, void *);
+struct cma_device *cma_enum_devices_by_ibdev(cma_device_filter filter,
+ void *cookie);
+int cma_get_default_gid_type(struct cma_device *dev, unsigned int port);
+int cma_set_default_gid_type(struct cma_device *dev, unsigned int port,
+ enum ib_gid_type default_gid_type);
+int cma_get_default_roce_tos(struct cma_device *dev, unsigned int port);
+int cma_set_default_roce_tos(struct cma_device *dev, unsigned int port,
+ u8 default_roce_tos);
+struct ib_device *cma_get_ib_dev(struct cma_device *dev);
+
#endif /* _CMA_PRIV_H */