hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
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,46 @@
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;
92
+ u8 used_resolve_ip;
9093 enum ib_gid_type gid_type;
9194
9295 /*
9396 * Internal to RDMA/core, don't use in the drivers
9497 */
9598 struct rdma_restrack_entry res;
99
+ struct rdma_ucm_ece ece;
96100 };
101
+
102
+#if IS_ENABLED(CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS)
103
+int cma_configfs_init(void);
104
+void cma_configfs_exit(void);
105
+#else
106
+static inline int cma_configfs_init(void)
107
+{
108
+ return 0;
109
+}
110
+
111
+static inline void cma_configfs_exit(void)
112
+{
113
+}
114
+#endif
115
+
116
+void cma_dev_get(struct cma_device *dev);
117
+void cma_dev_put(struct cma_device *dev);
118
+typedef bool (*cma_device_filter)(struct ib_device *, void *);
119
+struct cma_device *cma_enum_devices_by_ibdev(cma_device_filter filter,
120
+ void *cookie);
121
+int cma_get_default_gid_type(struct cma_device *dev, unsigned int port);
122
+int cma_set_default_gid_type(struct cma_device *dev, unsigned int port,
123
+ enum ib_gid_type default_gid_type);
124
+int cma_get_default_roce_tos(struct cma_device *dev, unsigned int port);
125
+int cma_set_default_roce_tos(struct cma_device *dev, unsigned int port,
126
+ u8 default_roce_tos);
127
+struct ib_device *cma_get_ib_dev(struct cma_device *dev);
128
+
97129 #endif /* _CMA_PRIV_H */