2 * Copyright (c) 2005-2006 Intel Corporation. All rights reserved.
4 * 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 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33 #ifndef RDMA_USER_CM_H
34 #define RDMA_USER_CM_H
36 #include <linux/types.h>
37 #include <linux/in6.h>
38 #include <rdma/ib_user_verbs.h>
39 #include <rdma/ib_user_sa.h>
41 #define RDMA_USER_CM_ABI_VERSION 3
43 #define RDMA_MAX_PRIVATE_DATA 256
46 RDMA_USER_CM_CMD_CREATE_ID,
47 RDMA_USER_CM_CMD_DESTROY_ID,
48 RDMA_USER_CM_CMD_BIND_ADDR,
49 RDMA_USER_CM_CMD_RESOLVE_ADDR,
50 RDMA_USER_CM_CMD_RESOLVE_ROUTE,
51 RDMA_USER_CM_CMD_QUERY_ROUTE,
52 RDMA_USER_CM_CMD_CONNECT,
53 RDMA_USER_CM_CMD_LISTEN,
54 RDMA_USER_CM_CMD_ACCEPT,
55 RDMA_USER_CM_CMD_REJECT,
56 RDMA_USER_CM_CMD_DISCONNECT,
57 RDMA_USER_CM_CMD_INIT_QP_ATTR,
58 RDMA_USER_CM_CMD_GET_EVENT,
59 RDMA_USER_CM_CMD_GET_OPTION,
60 RDMA_USER_CM_CMD_SET_OPTION,
61 RDMA_USER_CM_CMD_NOTIFY
65 * command ABI structures.
67 struct rdma_ucm_cmd_hdr {
73 struct rdma_ucm_create_id {
80 struct rdma_ucm_create_id_resp {
84 struct rdma_ucm_destroy_id {
90 struct rdma_ucm_destroy_id_resp {
91 __u32 events_reported;
94 struct rdma_ucm_bind_addr {
96 struct sockaddr_in6 addr;
100 struct rdma_ucm_resolve_addr {
101 struct sockaddr_in6 src_addr;
102 struct sockaddr_in6 dst_addr;
107 struct rdma_ucm_resolve_route {
112 struct rdma_ucm_query_route {
118 struct rdma_ucm_query_route_resp {
120 struct ib_user_path_rec ib_route[2];
121 struct sockaddr_in6 src_addr;
122 struct sockaddr_in6 dst_addr;
128 struct rdma_ucm_conn_param {
131 __u8 private_data[RDMA_MAX_PRIVATE_DATA];
132 __u8 private_data_len;
134 __u8 responder_resources;
135 __u8 initiator_depth;
138 __u8 rnr_retry_count;
142 struct rdma_ucm_ud_param {
145 struct ib_uverbs_ah_attr ah_attr;
146 __u8 private_data[RDMA_MAX_PRIVATE_DATA];
147 __u8 private_data_len;
151 struct rdma_ucm_connect {
152 struct rdma_ucm_conn_param conn_param;
157 struct rdma_ucm_listen {
162 struct rdma_ucm_accept {
164 struct rdma_ucm_conn_param conn_param;
169 struct rdma_ucm_reject {
171 __u8 private_data_len;
173 __u8 private_data[RDMA_MAX_PRIVATE_DATA];
176 struct rdma_ucm_disconnect {
180 struct rdma_ucm_init_qp_attr {
186 struct rdma_ucm_notify {
191 struct rdma_ucm_get_event {
195 struct rdma_ucm_event_resp {
201 struct rdma_ucm_conn_param conn;
202 struct rdma_ucm_ud_param ud;
206 #endif /* RDMA_USER_CM_H */