diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-09-26 16:53:25 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-10-17 18:20:25 -0400 |
commit | 6b73597e7062118c0549c2702bfb7d273518c906 (patch) | |
tree | 6034aae7493b32d75d1c8818a801b09b77979acd /include | |
parent | 33033b797225553e48ca68d8d8dc5e64ec22e02b (diff) |
[IB] uverbs: ABI-breaking fixes for userspace verbs
Introduce new userspace verbs ABI version 3. This eliminates some
unneeded commands, and adds support for user-created completion
channels. This cleans up problems with file leaks on error paths, and
also makes sure that file descriptors are always installed into the
correct process.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/rdma/ib_user_verbs.h | 58 |
1 files changed, 14 insertions, 44 deletions
diff --git a/include/rdma/ib_user_verbs.h b/include/rdma/ib_user_verbs.h index fd85725391a4..0532b78200ca 100644 --- a/include/rdma/ib_user_verbs.h +++ b/include/rdma/ib_user_verbs.h | |||
@@ -42,15 +42,12 @@ | |||
42 | * Increment this value if any changes that break userspace ABI | 42 | * Increment this value if any changes that break userspace ABI |
43 | * compatibility are made. | 43 | * compatibility are made. |
44 | */ | 44 | */ |
45 | #define IB_USER_VERBS_ABI_VERSION 2 | 45 | #define IB_USER_VERBS_ABI_VERSION 3 |
46 | 46 | ||
47 | enum { | 47 | enum { |
48 | IB_USER_VERBS_CMD_QUERY_PARAMS, | ||
49 | IB_USER_VERBS_CMD_GET_CONTEXT, | 48 | IB_USER_VERBS_CMD_GET_CONTEXT, |
50 | IB_USER_VERBS_CMD_QUERY_DEVICE, | 49 | IB_USER_VERBS_CMD_QUERY_DEVICE, |
51 | IB_USER_VERBS_CMD_QUERY_PORT, | 50 | IB_USER_VERBS_CMD_QUERY_PORT, |
52 | IB_USER_VERBS_CMD_QUERY_GID, | ||
53 | IB_USER_VERBS_CMD_QUERY_PKEY, | ||
54 | IB_USER_VERBS_CMD_ALLOC_PD, | 51 | IB_USER_VERBS_CMD_ALLOC_PD, |
55 | IB_USER_VERBS_CMD_DEALLOC_PD, | 52 | IB_USER_VERBS_CMD_DEALLOC_PD, |
56 | IB_USER_VERBS_CMD_CREATE_AH, | 53 | IB_USER_VERBS_CMD_CREATE_AH, |
@@ -65,6 +62,7 @@ enum { | |||
65 | IB_USER_VERBS_CMD_ALLOC_MW, | 62 | IB_USER_VERBS_CMD_ALLOC_MW, |
66 | IB_USER_VERBS_CMD_BIND_MW, | 63 | IB_USER_VERBS_CMD_BIND_MW, |
67 | IB_USER_VERBS_CMD_DEALLOC_MW, | 64 | IB_USER_VERBS_CMD_DEALLOC_MW, |
65 | IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL, | ||
68 | IB_USER_VERBS_CMD_CREATE_CQ, | 66 | IB_USER_VERBS_CMD_CREATE_CQ, |
69 | IB_USER_VERBS_CMD_RESIZE_CQ, | 67 | IB_USER_VERBS_CMD_RESIZE_CQ, |
70 | IB_USER_VERBS_CMD_DESTROY_CQ, | 68 | IB_USER_VERBS_CMD_DESTROY_CQ, |
@@ -118,27 +116,14 @@ struct ib_uverbs_cmd_hdr { | |||
118 | __u16 out_words; | 116 | __u16 out_words; |
119 | }; | 117 | }; |
120 | 118 | ||
121 | /* | ||
122 | * No driver_data for "query params" command, since this is intended | ||
123 | * to be a core function with no possible device dependence. | ||
124 | */ | ||
125 | struct ib_uverbs_query_params { | ||
126 | __u64 response; | ||
127 | }; | ||
128 | |||
129 | struct ib_uverbs_query_params_resp { | ||
130 | __u32 num_cq_events; | ||
131 | }; | ||
132 | |||
133 | struct ib_uverbs_get_context { | 119 | struct ib_uverbs_get_context { |
134 | __u64 response; | 120 | __u64 response; |
135 | __u64 cq_fd_tab; | ||
136 | __u64 driver_data[0]; | 121 | __u64 driver_data[0]; |
137 | }; | 122 | }; |
138 | 123 | ||
139 | struct ib_uverbs_get_context_resp { | 124 | struct ib_uverbs_get_context_resp { |
140 | __u32 async_fd; | 125 | __u32 async_fd; |
141 | __u32 reserved; | 126 | __u32 num_comp_vectors; |
142 | }; | 127 | }; |
143 | 128 | ||
144 | struct ib_uverbs_query_device { | 129 | struct ib_uverbs_query_device { |
@@ -220,31 +205,6 @@ struct ib_uverbs_query_port_resp { | |||
220 | __u8 reserved[3]; | 205 | __u8 reserved[3]; |
221 | }; | 206 | }; |
222 | 207 | ||
223 | struct ib_uverbs_query_gid { | ||
224 | __u64 response; | ||
225 | __u8 port_num; | ||
226 | __u8 index; | ||
227 | __u8 reserved[6]; | ||
228 | __u64 driver_data[0]; | ||
229 | }; | ||
230 | |||
231 | struct ib_uverbs_query_gid_resp { | ||
232 | __u8 gid[16]; | ||
233 | }; | ||
234 | |||
235 | struct ib_uverbs_query_pkey { | ||
236 | __u64 response; | ||
237 | __u8 port_num; | ||
238 | __u8 index; | ||
239 | __u8 reserved[6]; | ||
240 | __u64 driver_data[0]; | ||
241 | }; | ||
242 | |||
243 | struct ib_uverbs_query_pkey_resp { | ||
244 | __u16 pkey; | ||
245 | __u16 reserved; | ||
246 | }; | ||
247 | |||
248 | struct ib_uverbs_alloc_pd { | 208 | struct ib_uverbs_alloc_pd { |
249 | __u64 response; | 209 | __u64 response; |
250 | __u64 driver_data[0]; | 210 | __u64 driver_data[0]; |
@@ -278,11 +238,21 @@ struct ib_uverbs_dereg_mr { | |||
278 | __u32 mr_handle; | 238 | __u32 mr_handle; |
279 | }; | 239 | }; |
280 | 240 | ||
241 | struct ib_uverbs_create_comp_channel { | ||
242 | __u64 response; | ||
243 | }; | ||
244 | |||
245 | struct ib_uverbs_create_comp_channel_resp { | ||
246 | __u32 fd; | ||
247 | }; | ||
248 | |||
281 | struct ib_uverbs_create_cq { | 249 | struct ib_uverbs_create_cq { |
282 | __u64 response; | 250 | __u64 response; |
283 | __u64 user_handle; | 251 | __u64 user_handle; |
284 | __u32 cqe; | 252 | __u32 cqe; |
285 | __u32 event_handler; | 253 | __u32 comp_vector; |
254 | __s32 comp_channel; | ||
255 | __u32 reserved; | ||
286 | __u64 driver_data[0]; | 256 | __u64 driver_data[0]; |
287 | }; | 257 | }; |
288 | 258 | ||