forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/infiniband/core/cma_priv.h
....@@ -66,7 +66,7 @@
6666 struct mutex qp_mutex;
6767
6868 struct completion comp;
69
- atomic_t refcount;
69
+ refcount_t refcount;
7070 struct mutex handler_mutex;
7171
7272 int backlog;
....@@ -84,14 +84,45 @@
8484 u32 options;
8585 u8 srq;
8686 u8 tos;
87
- bool tos_set;
87
+ u8 tos_set:1;
88
+ u8 timeout_set:1;
8889 u8 reuseaddr;
8990 u8 afonly;
91
+ u8 timeout;
9092 enum ib_gid_type gid_type;
9193
9294 /*
9395 * Internal to RDMA/core, don't use in the drivers
9496 */
9597 struct rdma_restrack_entry res;
98
+ struct rdma_ucm_ece ece;
9699 };
100
+
101
+#if IS_ENABLED(CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS)
102
+int cma_configfs_init(void);
103
+void cma_configfs_exit(void);
104
+#else
105
+static inline int cma_configfs_init(void)
106
+{
107
+ return 0;
108
+}
109
+
110
+static inline void cma_configfs_exit(void)
111
+{
112
+}
113
+#endif
114
+
115
+void cma_dev_get(struct cma_device *dev);
116
+void cma_dev_put(struct cma_device *dev);
117
+typedef bool (*cma_device_filter)(struct ib_device *, void *);
118
+struct cma_device *cma_enum_devices_by_ibdev(cma_device_filter filter,
119
+ void *cookie);
120
+int cma_get_default_gid_type(struct cma_device *dev, unsigned int port);
121
+int cma_set_default_gid_type(struct cma_device *dev, unsigned int port,
122
+ enum ib_gid_type default_gid_type);
123
+int cma_get_default_roce_tos(struct cma_device *dev, unsigned int port);
124
+int cma_set_default_roce_tos(struct cma_device *dev, unsigned int port,
125
+ u8 default_roce_tos);
126
+struct ib_device *cma_get_ib_dev(struct cma_device *dev);
127
+
97128 #endif /* _CMA_PRIV_H */