|
67 | 67 | RDMA_USER_CM_CMD_QUERY, |
68 | 68 | RDMA_USER_CM_CMD_BIND, |
69 | 69 | RDMA_USER_CM_CMD_RESOLVE_ADDR, |
70 | | - RDMA_USER_CM_CMD_JOIN_MCAST |
| 70 | + RDMA_USER_CM_CMD_JOIN_MCAST, |
| 71 | + RDMA_USER_CM_CMD_RESOLVE_IB_SERVICE |
71 | 72 | }; |
72 | 73 |
|
73 | 74 | /* See IBTA Annex A11, servies ID bytes 4 & 5 */ |
@@ -147,7 +148,8 @@ struct rdma_ucm_resolve_route { |
147 | 148 | enum { |
148 | 149 | RDMA_USER_CM_QUERY_ADDR, |
149 | 150 | RDMA_USER_CM_QUERY_PATH, |
150 | | - RDMA_USER_CM_QUERY_GID |
| 151 | + RDMA_USER_CM_QUERY_GID, |
| 152 | + RDMA_USER_CM_QUERY_IB_SERVICE |
151 | 153 | }; |
152 | 154 |
|
153 | 155 | struct rdma_ucm_query { |
@@ -187,6 +189,11 @@ struct rdma_ucm_query_path_resp { |
187 | 189 | struct ib_path_rec_data path_data[]; |
188 | 190 | }; |
189 | 191 |
|
| 192 | +struct rdma_ucm_query_ib_service_resp { |
| 193 | + __u32 num_service_recs; |
| 194 | + struct ib_user_service_rec recs[]; |
| 195 | +}; |
| 196 | + |
190 | 197 | struct rdma_ucm_conn_param { |
191 | 198 | __u32 qp_num; |
192 | 199 | __u32 qkey; |
@@ -338,4 +345,21 @@ struct rdma_ucm_migrate_resp { |
338 | 345 | __u32 events_reported; |
339 | 346 | }; |
340 | 347 |
|
| 348 | +enum { |
| 349 | + RDMA_USER_CM_IB_SERVICE_FLAG_ID = 1 << 0, |
| 350 | + RDMA_USER_CM_IB_SERVICE_FLAG_NAME = 1 << 1, |
| 351 | +}; |
| 352 | + |
| 353 | +#define RDMA_USER_CM_IB_SERVICE_NAME_SIZE 64 |
| 354 | +struct rdma_ucm_ib_service { |
| 355 | + __u64 service_id; |
| 356 | + __u8 service_name[RDMA_USER_CM_IB_SERVICE_NAME_SIZE]; |
| 357 | + __u32 flags; |
| 358 | + __u32 reserved; |
| 359 | +}; |
| 360 | + |
| 361 | +struct rdma_ucm_resolve_ib_service { |
| 362 | + __u32 id; |
| 363 | + struct rdma_ucm_ib_service ibs; |
| 364 | +}; |
341 | 365 | #endif /* RDMA_USER_CM_H */ |
0 commit comments