2 * Copyright (c) 2005 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Intel Corporation. All rights reserved.
5 * This software is available to you under a choice of one of two
6 * licenses. You may choose to be licensed under the terms of the GNU
7 * General Public License (GPL) Version 2, available from the file
8 * COPYING in the main directory of this source tree, or the
9 * OpenIB.org BSD license below:
11 * Redistribution and use in source and binary forms, with or
12 * without modification, are permitted provided that the following
15 * - Redistributions of source code must retain the above
16 * copyright notice, this list of conditions and the following
19 * - Redistributions in binary form must reproduce the above
20 * copyright notice, this list of conditions and the following
21 * disclaimer in the documentation and/or other materials
22 * provided with the distribution.
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39 #include <infiniband/types.h>
40 #include <infiniband/sa.h>
41 #include <infiniband/marshall.h>
44 * This file must be kept in sync with the kernel's version of ib_user_cm.h
47 #define IB_USER_CM_MIN_ABI_VERSION 4
48 #define IB_USER_CM_MAX_ABI_VERSION 5
51 IB_USER_CM_CMD_CREATE_ID,
52 IB_USER_CM_CMD_DESTROY_ID,
53 IB_USER_CM_CMD_ATTR_ID,
55 IB_USER_CM_CMD_LISTEN,
56 IB_USER_CM_CMD_NOTIFY,
57 IB_USER_CM_CMD_ESTABLISH = IB_USER_CM_CMD_NOTIFY, /* ABI 4 support */
59 IB_USER_CM_CMD_SEND_REQ,
60 IB_USER_CM_CMD_SEND_REP,
61 IB_USER_CM_CMD_SEND_RTU,
62 IB_USER_CM_CMD_SEND_DREQ,
63 IB_USER_CM_CMD_SEND_DREP,
64 IB_USER_CM_CMD_SEND_REJ,
65 IB_USER_CM_CMD_SEND_MRA,
66 IB_USER_CM_CMD_SEND_LAP,
67 IB_USER_CM_CMD_SEND_APR,
68 IB_USER_CM_CMD_SEND_SIDR_REQ,
69 IB_USER_CM_CMD_SEND_SIDR_REP,
72 IB_USER_CM_CMD_INIT_QP_ATTR,
75 * command ABI structures.
77 struct cm_abi_cmd_hdr {
83 struct cm_abi_create_id {
88 struct cm_abi_create_id_resp {
92 struct cm_abi_destroy_id {
98 struct cm_abi_destroy_id_resp {
99 __u32 events_reported;
102 struct cm_abi_attr_id {
108 struct cm_abi_attr_id_resp {
115 struct cm_abi_init_qp_attr {
121 struct cm_abi_listen {
128 struct cm_abi_establish { /* ABI 4 support */
132 struct cm_abi_notify {
137 struct cm_abi_private_data {
152 __u64 alternate_path;
155 __u8 responder_resources;
156 __u8 initiator_depth;
157 __u8 remote_cm_response_timeout;
159 __u8 local_cm_response_timeout;
161 __u8 rnr_retry_count;
174 __u8 responder_resources;
175 __u8 initiator_depth;
176 __u8 target_ack_delay;
177 __u8 failover_accepted;
179 __u8 rnr_retry_count;
210 struct cm_abi_sidr_req {
222 struct cm_abi_sidr_rep {
234 * event notification ABI structures.
236 struct cm_abi_event_get {
245 struct cm_abi_req_event_resp {
246 struct ibv_kern_path_rec primary_path;
247 struct ibv_kern_path_rec alternate_path;
248 __u64 remote_ca_guid;
253 __u8 responder_resources;
254 __u8 initiator_depth;
255 __u8 local_cm_response_timeout;
257 __u8 remote_cm_response_timeout;
259 __u8 rnr_retry_count;
265 struct cm_abi_rep_event_resp {
266 __u64 remote_ca_guid;
270 __u8 responder_resources;
271 __u8 initiator_depth;
272 __u8 target_ack_delay;
273 __u8 failover_accepted;
275 __u8 rnr_retry_count;
280 struct cm_abi_rej_event_resp {
282 /* ari in cm_abi_event_get info field. */
285 struct cm_abi_mra_event_resp {
290 struct cm_abi_lap_event_resp {
291 struct ibv_kern_path_rec path;
294 struct cm_abi_apr_event_resp {
296 /* apr info in cm_abi_event_get info field. */
299 struct cm_abi_sidr_req_event_resp {
305 struct cm_abi_sidr_rep_event_resp {
309 /* info in cm_abi_event_get info field. */
312 #define CM_ABI_PRES_DATA 0x01
313 #define CM_ABI_PRES_INFO 0x02
314 #define CM_ABI_PRES_PRIMARY 0x04
315 #define CM_ABI_PRES_ALTERNATE 0x08
317 struct cm_abi_event_resp {
324 struct cm_abi_req_event_resp req_resp;
325 struct cm_abi_rep_event_resp rep_resp;
326 struct cm_abi_rej_event_resp rej_resp;
327 struct cm_abi_mra_event_resp mra_resp;
328 struct cm_abi_lap_event_resp lap_resp;
329 struct cm_abi_apr_event_resp apr_resp;
331 struct cm_abi_sidr_req_event_resp sidr_req_resp;
332 struct cm_abi_sidr_rep_event_resp sidr_rep_resp;
338 #endif /* CM_ABI_H */