diff options
| author | Sean Hefty <sean.hefty@intel.com> | 2005-09-01 12:28:03 -0400 |
|---|---|---|
| committer | Roland Dreier <rolandd@cisco.com> | 2005-09-07 12:48:52 -0400 |
| commit | 0b2b35f68140ceeb1b78ef85680198e63ebc8649 (patch) | |
| tree | 342c13bd8a1e1c071389df8ef9951a723cb4b270 /include/rdma | |
| parent | 1d6801f9dd3ebb054ae685153a01b1a4ec817f46 (diff) | |
[PATCH] IB: Add user-supplied context to userspace CM ABI
- Add user specified context to all uCM events. Users will not retrieve
any events associated with the context after destroying the corresponding
cm_id.
- Provide the ib_cm_init_qp_attr() call to userspace clients of the CM.
This call may be used to set QP attributes properly before modifying the QP.
- Fixes some error handling synchonization and cleanup issues.
- Performs some minor code cleanup.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/rdma')
| -rw-r--r-- | include/rdma/ib_user_cm.h | 72 |
1 files changed, 69 insertions, 3 deletions
diff --git a/include/rdma/ib_user_cm.h b/include/rdma/ib_user_cm.h index 72182d16778b..e4d1654276ad 100644 --- a/include/rdma/ib_user_cm.h +++ b/include/rdma/ib_user_cm.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2005 Topspin Communications. All rights reserved. | 2 | * Copyright (c) 2005 Topspin Communications. All rights reserved. |
| 3 | * Copyright (c) 2005 Intel Corporation. All rights reserved. | ||
| 3 | * | 4 | * |
| 4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
| 5 | * licenses. You may choose to be licensed under the terms of the GNU | 6 | * licenses. You may choose to be licensed under the terms of the GNU |
| @@ -37,7 +38,7 @@ | |||
| 37 | 38 | ||
| 38 | #include <linux/types.h> | 39 | #include <linux/types.h> |
| 39 | 40 | ||
| 40 | #define IB_USER_CM_ABI_VERSION 1 | 41 | #define IB_USER_CM_ABI_VERSION 2 |
| 41 | 42 | ||
| 42 | enum { | 43 | enum { |
| 43 | IB_USER_CM_CMD_CREATE_ID, | 44 | IB_USER_CM_CMD_CREATE_ID, |
| @@ -60,6 +61,7 @@ enum { | |||
| 60 | IB_USER_CM_CMD_SEND_SIDR_REP, | 61 | IB_USER_CM_CMD_SEND_SIDR_REP, |
| 61 | 62 | ||
| 62 | IB_USER_CM_CMD_EVENT, | 63 | IB_USER_CM_CMD_EVENT, |
| 64 | IB_USER_CM_CMD_INIT_QP_ATTR, | ||
| 63 | }; | 65 | }; |
| 64 | /* | 66 | /* |
| 65 | * command ABI structures. | 67 | * command ABI structures. |
| @@ -71,6 +73,7 @@ struct ib_ucm_cmd_hdr { | |||
| 71 | }; | 73 | }; |
| 72 | 74 | ||
| 73 | struct ib_ucm_create_id { | 75 | struct ib_ucm_create_id { |
| 76 | __u64 uid; | ||
| 74 | __u64 response; | 77 | __u64 response; |
| 75 | }; | 78 | }; |
| 76 | 79 | ||
| @@ -79,9 +82,14 @@ struct ib_ucm_create_id_resp { | |||
| 79 | }; | 82 | }; |
| 80 | 83 | ||
| 81 | struct ib_ucm_destroy_id { | 84 | struct ib_ucm_destroy_id { |
| 85 | __u64 response; | ||
| 82 | __u32 id; | 86 | __u32 id; |
| 83 | }; | 87 | }; |
| 84 | 88 | ||
| 89 | struct ib_ucm_destroy_id_resp { | ||
| 90 | __u32 events_reported; | ||
| 91 | }; | ||
| 92 | |||
| 85 | struct ib_ucm_attr_id { | 93 | struct ib_ucm_attr_id { |
| 86 | __u64 response; | 94 | __u64 response; |
| 87 | __u32 id; | 95 | __u32 id; |
| @@ -94,6 +102,64 @@ struct ib_ucm_attr_id_resp { | |||
| 94 | __be32 remote_id; | 102 | __be32 remote_id; |
| 95 | }; | 103 | }; |
| 96 | 104 | ||
| 105 | struct ib_ucm_init_qp_attr { | ||
| 106 | __u64 response; | ||
| 107 | __u32 id; | ||
| 108 | __u32 qp_state; | ||
| 109 | }; | ||
| 110 | |||
| 111 | struct ib_ucm_ah_attr { | ||
| 112 | __u8 grh_dgid[16]; | ||
| 113 | __u32 grh_flow_label; | ||
| 114 | __u16 dlid; | ||
| 115 | __u16 reserved; | ||
| 116 | __u8 grh_sgid_index; | ||
| 117 | __u8 grh_hop_limit; | ||
| 118 | __u8 grh_traffic_class; | ||
| 119 | __u8 sl; | ||
| 120 | __u8 src_path_bits; | ||
| 121 | __u8 static_rate; | ||
| 122 | __u8 is_global; | ||
| 123 | __u8 port_num; | ||
| 124 | }; | ||
| 125 | |||
| 126 | struct ib_ucm_init_qp_attr_resp { | ||
| 127 | __u32 qp_attr_mask; | ||
| 128 | __u32 qp_state; | ||
| 129 | __u32 cur_qp_state; | ||
| 130 | __u32 path_mtu; | ||
| 131 | __u32 path_mig_state; | ||
| 132 | __u32 qkey; | ||
| 133 | __u32 rq_psn; | ||
| 134 | __u32 sq_psn; | ||
| 135 | __u32 dest_qp_num; | ||
| 136 | __u32 qp_access_flags; | ||
| 137 | |||
| 138 | struct ib_ucm_ah_attr ah_attr; | ||
| 139 | struct ib_ucm_ah_attr alt_ah_attr; | ||
| 140 | |||
| 141 | /* ib_qp_cap */ | ||
| 142 | __u32 max_send_wr; | ||
| 143 | __u32 max_recv_wr; | ||
| 144 | __u32 max_send_sge; | ||
| 145 | __u32 max_recv_sge; | ||
| 146 | __u32 max_inline_data; | ||
| 147 | |||
| 148 | __u16 pkey_index; | ||
| 149 | __u16 alt_pkey_index; | ||
| 150 | __u8 en_sqd_async_notify; | ||
| 151 | __u8 sq_draining; | ||
| 152 | __u8 max_rd_atomic; | ||
| 153 | __u8 max_dest_rd_atomic; | ||
| 154 | __u8 min_rnr_timer; | ||
| 155 | __u8 port_num; | ||
| 156 | __u8 timeout; | ||
| 157 | __u8 retry_cnt; | ||
| 158 | __u8 rnr_retry; | ||
| 159 | __u8 alt_port_num; | ||
| 160 | __u8 alt_timeout; | ||
| 161 | }; | ||
| 162 | |||
| 97 | struct ib_ucm_listen { | 163 | struct ib_ucm_listen { |
| 98 | __be64 service_id; | 164 | __be64 service_id; |
| 99 | __be64 service_mask; | 165 | __be64 service_mask; |
| @@ -157,6 +223,7 @@ struct ib_ucm_req { | |||
| 157 | }; | 223 | }; |
| 158 | 224 | ||
| 159 | struct ib_ucm_rep { | 225 | struct ib_ucm_rep { |
| 226 | __u64 uid; | ||
| 160 | __u64 data; | 227 | __u64 data; |
| 161 | __u32 id; | 228 | __u32 id; |
| 162 | __u32 qpn; | 229 | __u32 qpn; |
| @@ -232,7 +299,6 @@ struct ib_ucm_event_get { | |||
| 232 | }; | 299 | }; |
| 233 | 300 | ||
| 234 | struct ib_ucm_req_event_resp { | 301 | struct ib_ucm_req_event_resp { |
| 235 | __u32 listen_id; | ||
| 236 | /* device */ | 302 | /* device */ |
| 237 | /* port */ | 303 | /* port */ |
| 238 | struct ib_ucm_path_rec primary_path; | 304 | struct ib_ucm_path_rec primary_path; |
| @@ -287,7 +353,6 @@ struct ib_ucm_apr_event_resp { | |||
| 287 | }; | 353 | }; |
| 288 | 354 | ||
| 289 | struct ib_ucm_sidr_req_event_resp { | 355 | struct ib_ucm_sidr_req_event_resp { |
| 290 | __u32 listen_id; | ||
| 291 | /* device */ | 356 | /* device */ |
| 292 | /* port */ | 357 | /* port */ |
| 293 | __u16 pkey; | 358 | __u16 pkey; |
| @@ -307,6 +372,7 @@ struct ib_ucm_sidr_rep_event_resp { | |||
| 307 | #define IB_UCM_PRES_ALTERNATE 0x08 | 372 | #define IB_UCM_PRES_ALTERNATE 0x08 |
| 308 | 373 | ||
| 309 | struct ib_ucm_event_resp { | 374 | struct ib_ucm_event_resp { |
| 375 | __u64 uid; | ||
| 310 | __u32 id; | 376 | __u32 id; |
| 311 | __u32 event; | 377 | __u32 event; |
| 312 | __u32 present; | 378 | __u32 present; |
