1 #ifndef _UAPI_RDMA_NETLINK_H
2 #define _UAPI_RDMA_NETLINK_H
4 #include <linux/types.h>
10 RDMA_NL_LS
, /* RDMA Local Services */
21 #define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10)
22 #define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1))
23 #define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op)
26 RDMA_NL_RDMA_CM_ID_STATS
= 0,
27 RDMA_NL_RDMA_CM_NUM_OPS
31 RDMA_NL_RDMA_CM_ATTR_SRC_ADDR
= 1,
32 RDMA_NL_RDMA_CM_ATTR_DST_ADDR
,
33 RDMA_NL_RDMA_CM_NUM_ATTR
,
36 /* iwarp port mapper op-codes */
38 RDMA_NL_IWPM_REG_PID
= 0,
39 RDMA_NL_IWPM_ADD_MAPPING
,
40 RDMA_NL_IWPM_QUERY_MAPPING
,
41 RDMA_NL_IWPM_REMOVE_MAPPING
,
42 RDMA_NL_IWPM_REMOTE_INFO
,
43 RDMA_NL_IWPM_HANDLE_ERR
,
45 RDMA_NL_IWPM_MAPINFO_NUM
,
49 struct rdma_cm_id_stats
{
61 IWPM_NLA_REG_PID_UNSPEC
= 0,
64 IWPM_NLA_REG_IBDEV_NAME
,
65 IWPM_NLA_REG_ULIB_NAME
,
70 IWPM_NLA_RREG_PID_UNSPEC
= 0,
71 IWPM_NLA_RREG_PID_SEQ
,
72 IWPM_NLA_RREG_IBDEV_NAME
,
73 IWPM_NLA_RREG_ULIB_NAME
,
74 IWPM_NLA_RREG_ULIB_VER
,
75 IWPM_NLA_RREG_PID_ERR
,
81 IWPM_NLA_MANAGE_MAPPING_UNSPEC
= 0,
82 IWPM_NLA_MANAGE_MAPPING_SEQ
,
84 IWPM_NLA_MANAGE_MAPPED_LOC_ADDR
,
85 IWPM_NLA_RMANAGE_MAPPING_ERR
,
86 IWPM_NLA_RMANAGE_MAPPING_MAX
89 #define IWPM_NLA_MANAGE_MAPPING_MAX 3
90 #define IWPM_NLA_QUERY_MAPPING_MAX 4
91 #define IWPM_NLA_MAPINFO_SEND_MAX 3
94 IWPM_NLA_QUERY_MAPPING_UNSPEC
= 0,
95 IWPM_NLA_QUERY_MAPPING_SEQ
,
96 IWPM_NLA_QUERY_LOCAL_ADDR
,
97 IWPM_NLA_QUERY_REMOTE_ADDR
,
98 IWPM_NLA_RQUERY_MAPPED_LOC_ADDR
,
99 IWPM_NLA_RQUERY_MAPPED_REM_ADDR
,
100 IWPM_NLA_RQUERY_MAPPING_ERR
,
101 IWPM_NLA_RQUERY_MAPPING_MAX
105 IWPM_NLA_MAPINFO_REQ_UNSPEC
= 0,
106 IWPM_NLA_MAPINFO_ULIB_NAME
,
107 IWPM_NLA_MAPINFO_ULIB_VER
,
108 IWPM_NLA_MAPINFO_REQ_MAX
112 IWPM_NLA_MAPINFO_UNSPEC
= 0,
113 IWPM_NLA_MAPINFO_LOCAL_ADDR
,
114 IWPM_NLA_MAPINFO_MAPPED_ADDR
,
119 IWPM_NLA_MAPINFO_NUM_UNSPEC
= 0,
120 IWPM_NLA_MAPINFO_SEQ
,
121 IWPM_NLA_MAPINFO_SEND_NUM
,
122 IWPM_NLA_MAPINFO_ACK_NUM
,
123 IWPM_NLA_MAPINFO_NUM_MAX
127 IWPM_NLA_ERR_UNSPEC
= 0,
134 * Local service operations:
135 * RESOLVE - The client requests the local service to resolve a path.
136 * SET_TIMEOUT - The local service requests the client to set the timeout.
139 RDMA_NL_LS_OP_RESOLVE
= 0,
140 RDMA_NL_LS_OP_SET_TIMEOUT
,
144 /* Local service netlink message flags */
145 #define RDMA_NL_LS_F_ERR 0x0100 /* Failed response */
148 * Local service resolve operation family header.
149 * The layout for the resolve operation:
156 * Local service path use:
157 * Specify how the path(s) will be used.
158 * ALL - For connected CM operation (6 pathrecords)
159 * UNIDIRECTIONAL - For unidirectional UD (1 pathrecord)
160 * GMP - For miscellaneous GMP like operation (at least 1 reversible
164 LS_RESOLVE_PATH_USE_ALL
= 0,
165 LS_RESOLVE_PATH_USE_UNIDIRECTIONAL
,
166 LS_RESOLVE_PATH_USE_GMP
,
167 LS_RESOLVE_PATH_USE_MAX
170 #define LS_DEVICE_NAME_MAX 64
172 struct rdma_ls_resolve_header
{
173 __u8 device_name
[LS_DEVICE_NAME_MAX
];
178 /* Local service attribute type */
179 #define RDMA_NLA_F_MANDATORY (1 << 13)
180 #define RDMA_NLA_TYPE_MASK (~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | \
181 RDMA_NLA_F_MANDATORY))
184 * Local service attributes:
185 * Attr Name Size Byte order
186 * -----------------------------------------------------
187 * PATH_RECORD struct ib_path_rec_data
197 LS_NLA_TYPE_UNSPEC
= 0,
198 LS_NLA_TYPE_PATH_RECORD
,
200 LS_NLA_TYPE_SERVICE_ID
,
205 LS_NLA_TYPE_QOS_CLASS
,
209 /* Local service DGID/SGID attribute: big endian */
210 struct rdma_nla_ls_gid
{
214 #endif /* _UAPI_RDMA_NETLINK_H */