1 #ifndef _UAPI_RDMA_NETLINK_H
2 #define _UAPI_RDMA_NETLINK_H
4 #include <linux/types.h>
10 RDMA_NL_LS
, /* RDMA Local Services */
22 #define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10)
23 #define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1))
24 #define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op)
27 RDMA_NL_RDMA_CM_ID_STATS
= 0,
28 RDMA_NL_RDMA_CM_NUM_OPS
32 RDMA_NL_RDMA_CM_ATTR_SRC_ADDR
= 1,
33 RDMA_NL_RDMA_CM_ATTR_DST_ADDR
,
34 RDMA_NL_RDMA_CM_NUM_ATTR
,
37 /* iwarp port mapper op-codes */
39 RDMA_NL_IWPM_REG_PID
= 0,
40 RDMA_NL_IWPM_ADD_MAPPING
,
41 RDMA_NL_IWPM_QUERY_MAPPING
,
42 RDMA_NL_IWPM_REMOVE_MAPPING
,
43 RDMA_NL_IWPM_REMOTE_INFO
,
44 RDMA_NL_IWPM_HANDLE_ERR
,
46 RDMA_NL_IWPM_MAPINFO_NUM
,
50 struct rdma_cm_id_stats
{
62 IWPM_NLA_REG_PID_UNSPEC
= 0,
65 IWPM_NLA_REG_IBDEV_NAME
,
66 IWPM_NLA_REG_ULIB_NAME
,
71 IWPM_NLA_RREG_PID_UNSPEC
= 0,
72 IWPM_NLA_RREG_PID_SEQ
,
73 IWPM_NLA_RREG_IBDEV_NAME
,
74 IWPM_NLA_RREG_ULIB_NAME
,
75 IWPM_NLA_RREG_ULIB_VER
,
76 IWPM_NLA_RREG_PID_ERR
,
82 IWPM_NLA_MANAGE_MAPPING_UNSPEC
= 0,
83 IWPM_NLA_MANAGE_MAPPING_SEQ
,
85 IWPM_NLA_MANAGE_MAPPED_LOC_ADDR
,
86 IWPM_NLA_RMANAGE_MAPPING_ERR
,
87 IWPM_NLA_RMANAGE_MAPPING_MAX
90 #define IWPM_NLA_MANAGE_MAPPING_MAX 3
91 #define IWPM_NLA_QUERY_MAPPING_MAX 4
92 #define IWPM_NLA_MAPINFO_SEND_MAX 3
95 IWPM_NLA_QUERY_MAPPING_UNSPEC
= 0,
96 IWPM_NLA_QUERY_MAPPING_SEQ
,
97 IWPM_NLA_QUERY_LOCAL_ADDR
,
98 IWPM_NLA_QUERY_REMOTE_ADDR
,
99 IWPM_NLA_RQUERY_MAPPED_LOC_ADDR
,
100 IWPM_NLA_RQUERY_MAPPED_REM_ADDR
,
101 IWPM_NLA_RQUERY_MAPPING_ERR
,
102 IWPM_NLA_RQUERY_MAPPING_MAX
106 IWPM_NLA_MAPINFO_REQ_UNSPEC
= 0,
107 IWPM_NLA_MAPINFO_ULIB_NAME
,
108 IWPM_NLA_MAPINFO_ULIB_VER
,
109 IWPM_NLA_MAPINFO_REQ_MAX
113 IWPM_NLA_MAPINFO_UNSPEC
= 0,
114 IWPM_NLA_MAPINFO_LOCAL_ADDR
,
115 IWPM_NLA_MAPINFO_MAPPED_ADDR
,
120 IWPM_NLA_MAPINFO_NUM_UNSPEC
= 0,
121 IWPM_NLA_MAPINFO_SEQ
,
122 IWPM_NLA_MAPINFO_SEND_NUM
,
123 IWPM_NLA_MAPINFO_ACK_NUM
,
124 IWPM_NLA_MAPINFO_NUM_MAX
128 IWPM_NLA_ERR_UNSPEC
= 0,
135 * Local service operations:
136 * RESOLVE - The client requests the local service to resolve a path.
137 * SET_TIMEOUT - The local service requests the client to set the timeout.
138 * IP_RESOLVE - The client requests the local service to resolve an IP to GID.
141 RDMA_NL_LS_OP_RESOLVE
= 0,
142 RDMA_NL_LS_OP_SET_TIMEOUT
,
143 RDMA_NL_LS_OP_IP_RESOLVE
,
147 /* Local service netlink message flags */
148 #define RDMA_NL_LS_F_ERR 0x0100 /* Failed response */
151 * Local service resolve operation family header.
152 * The layout for the resolve operation:
159 * Local service path use:
160 * Specify how the path(s) will be used.
161 * ALL - For connected CM operation (6 pathrecords)
162 * UNIDIRECTIONAL - For unidirectional UD (1 pathrecord)
163 * GMP - For miscellaneous GMP like operation (at least 1 reversible
167 LS_RESOLVE_PATH_USE_ALL
= 0,
168 LS_RESOLVE_PATH_USE_UNIDIRECTIONAL
,
169 LS_RESOLVE_PATH_USE_GMP
,
170 LS_RESOLVE_PATH_USE_MAX
173 #define LS_DEVICE_NAME_MAX 64
175 struct rdma_ls_resolve_header
{
176 __u8 device_name
[LS_DEVICE_NAME_MAX
];
181 struct rdma_ls_ip_resolve_header
{
185 /* Local service attribute type */
186 #define RDMA_NLA_F_MANDATORY (1 << 13)
187 #define RDMA_NLA_TYPE_MASK (~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | \
188 RDMA_NLA_F_MANDATORY))
191 * Local service attributes:
192 * Attr Name Size Byte order
193 * -----------------------------------------------------
194 * PATH_RECORD struct ib_path_rec_data
206 LS_NLA_TYPE_UNSPEC
= 0,
207 LS_NLA_TYPE_PATH_RECORD
,
209 LS_NLA_TYPE_SERVICE_ID
,
214 LS_NLA_TYPE_QOS_CLASS
,
220 /* Local service DGID/SGID attribute: big endian */
221 struct rdma_nla_ls_gid
{
225 #endif /* _UAPI_RDMA_NETLINK_H */