2013-10-17 01:09:24 +02:00
|
|
|
/****************************************************************************
|
|
|
|
****************************************************************************
|
|
|
|
***
|
|
|
|
*** This header was automatically generated from a Linux kernel header
|
|
|
|
*** of the same name, to make information necessary for userspace to
|
|
|
|
*** call into the kernel available to libc. It contains only constants,
|
|
|
|
*** structures, and macros generated from the original header, and thus,
|
|
|
|
*** contains no copyrightable information.
|
|
|
|
***
|
|
|
|
*** To edit the content of this header, modify the corresponding
|
|
|
|
*** source file (e.g. under external/kernel-headers/original/) then
|
|
|
|
*** run bionic/libc/kernel/tools/update_all.py
|
|
|
|
***
|
|
|
|
*** Any manual change here will be lost the next time this script will
|
|
|
|
*** be run. You've been warned!
|
|
|
|
***
|
|
|
|
****************************************************************************
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef RDMA_USER_CM_H
|
|
|
|
#define RDMA_USER_CM_H
|
|
|
|
#include <linux/types.h>
|
2014-09-18 22:14:58 +02:00
|
|
|
#include <linux/socket.h>
|
|
|
|
#include <linux/in6.h>
|
2013-10-17 01:09:24 +02:00
|
|
|
#include <rdma/ib_user_verbs.h>
|
|
|
|
#include <rdma/ib_user_sa.h>
|
|
|
|
#define RDMA_USER_CM_ABI_VERSION 4
|
2014-09-18 22:14:58 +02:00
|
|
|
#define RDMA_MAX_PRIVATE_DATA 256
|
2013-10-17 01:09:24 +02:00
|
|
|
enum {
|
2015-01-28 19:07:51 +01:00
|
|
|
RDMA_USER_CM_CMD_CREATE_ID,
|
|
|
|
RDMA_USER_CM_CMD_DESTROY_ID,
|
|
|
|
RDMA_USER_CM_CMD_BIND_IP,
|
|
|
|
RDMA_USER_CM_CMD_RESOLVE_IP,
|
|
|
|
RDMA_USER_CM_CMD_RESOLVE_ROUTE,
|
|
|
|
RDMA_USER_CM_CMD_QUERY_ROUTE,
|
|
|
|
RDMA_USER_CM_CMD_CONNECT,
|
|
|
|
RDMA_USER_CM_CMD_LISTEN,
|
|
|
|
RDMA_USER_CM_CMD_ACCEPT,
|
|
|
|
RDMA_USER_CM_CMD_REJECT,
|
|
|
|
RDMA_USER_CM_CMD_DISCONNECT,
|
|
|
|
RDMA_USER_CM_CMD_INIT_QP_ATTR,
|
|
|
|
RDMA_USER_CM_CMD_GET_EVENT,
|
|
|
|
RDMA_USER_CM_CMD_GET_OPTION,
|
|
|
|
RDMA_USER_CM_CMD_SET_OPTION,
|
|
|
|
RDMA_USER_CM_CMD_NOTIFY,
|
|
|
|
RDMA_USER_CM_CMD_JOIN_IP_MCAST,
|
|
|
|
RDMA_USER_CM_CMD_LEAVE_MCAST,
|
|
|
|
RDMA_USER_CM_CMD_MIGRATE_ID,
|
|
|
|
RDMA_USER_CM_CMD_QUERY,
|
|
|
|
RDMA_USER_CM_CMD_BIND,
|
|
|
|
RDMA_USER_CM_CMD_RESOLVE_ADDR,
|
|
|
|
RDMA_USER_CM_CMD_JOIN_MCAST
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
2018-06-27 23:12:29 +02:00
|
|
|
enum rdma_ucm_port_space {
|
|
|
|
RDMA_PS_IPOIB = 0x0002,
|
|
|
|
RDMA_PS_IB = 0x013F,
|
|
|
|
RDMA_PS_TCP = 0x0106,
|
|
|
|
RDMA_PS_UDP = 0x0111,
|
|
|
|
};
|
2013-10-17 01:09:24 +02:00
|
|
|
struct rdma_ucm_cmd_hdr {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 cmd;
|
|
|
|
__u16 in;
|
|
|
|
__u16 out;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_create_id {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 uid;
|
|
|
|
__aligned_u64 response;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u16 ps;
|
|
|
|
__u8 qp_type;
|
|
|
|
__u8 reserved[5];
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_create_id_resp {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
2014-09-18 22:14:58 +02:00
|
|
|
};
|
2013-10-17 01:09:24 +02:00
|
|
|
struct rdma_ucm_destroy_id {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 response;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u32 reserved;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_destroy_id_resp {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 events_reported;
|
2014-09-18 22:14:58 +02:00
|
|
|
};
|
2014-07-10 00:33:25 +02:00
|
|
|
struct rdma_ucm_bind_ip {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 response;
|
2015-01-28 19:07:51 +01:00
|
|
|
struct sockaddr_in6 addr;
|
|
|
|
__u32 id;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
2014-07-10 00:33:25 +02:00
|
|
|
struct rdma_ucm_bind {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u16 addr_size;
|
|
|
|
__u16 reserved;
|
2017-08-31 01:10:24 +02:00
|
|
|
struct sockaddr_storage addr;
|
2014-07-10 00:33:25 +02:00
|
|
|
};
|
2014-09-18 22:14:58 +02:00
|
|
|
struct rdma_ucm_resolve_ip {
|
2015-01-28 19:07:51 +01:00
|
|
|
struct sockaddr_in6 src_addr;
|
|
|
|
struct sockaddr_in6 dst_addr;
|
|
|
|
__u32 id;
|
|
|
|
__u32 timeout_ms;
|
2014-07-10 00:33:25 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_resolve_addr {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u32 timeout_ms;
|
|
|
|
__u16 src_size;
|
|
|
|
__u16 dst_size;
|
|
|
|
__u32 reserved;
|
2017-08-31 01:10:24 +02:00
|
|
|
struct sockaddr_storage src_addr;
|
|
|
|
struct sockaddr_storage dst_addr;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_resolve_route {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u32 timeout_ms;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
2014-07-10 00:33:25 +02:00
|
|
|
enum {
|
2015-01-28 19:07:51 +01:00
|
|
|
RDMA_USER_CM_QUERY_ADDR,
|
|
|
|
RDMA_USER_CM_QUERY_PATH,
|
|
|
|
RDMA_USER_CM_QUERY_GID
|
2014-07-10 00:33:25 +02:00
|
|
|
};
|
2014-09-18 22:14:58 +02:00
|
|
|
struct rdma_ucm_query {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 response;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u32 option;
|
2014-09-18 22:14:58 +02:00
|
|
|
};
|
2013-10-17 01:09:24 +02:00
|
|
|
struct rdma_ucm_query_route_resp {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 node_guid;
|
2015-01-28 19:07:51 +01:00
|
|
|
struct ib_user_path_rec ib_route[2];
|
|
|
|
struct sockaddr_in6 src_addr;
|
|
|
|
struct sockaddr_in6 dst_addr;
|
|
|
|
__u32 num_paths;
|
|
|
|
__u8 port_num;
|
|
|
|
__u8 reserved[3];
|
2020-08-03 20:53:55 +02:00
|
|
|
__u32 ibdev_index;
|
|
|
|
__u32 reserved1;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
2014-07-10 00:33:25 +02:00
|
|
|
struct rdma_ucm_query_addr_resp {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 node_guid;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u8 port_num;
|
|
|
|
__u8 reserved;
|
|
|
|
__u16 pkey;
|
|
|
|
__u16 src_size;
|
|
|
|
__u16 dst_size;
|
2017-08-31 01:10:24 +02:00
|
|
|
struct sockaddr_storage src_addr;
|
|
|
|
struct sockaddr_storage dst_addr;
|
2020-08-03 20:53:55 +02:00
|
|
|
__u32 ibdev_index;
|
|
|
|
__u32 reserved1;
|
2014-07-10 00:33:25 +02:00
|
|
|
};
|
2014-09-18 22:14:58 +02:00
|
|
|
struct rdma_ucm_query_path_resp {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 num_paths;
|
|
|
|
__u32 reserved;
|
|
|
|
struct ib_path_rec_data path_data[0];
|
2014-09-18 22:14:58 +02:00
|
|
|
};
|
2014-07-10 00:33:25 +02:00
|
|
|
struct rdma_ucm_conn_param {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 qp_num;
|
|
|
|
__u32 qkey;
|
|
|
|
__u8 private_data[RDMA_MAX_PRIVATE_DATA];
|
|
|
|
__u8 private_data_len;
|
|
|
|
__u8 srq;
|
|
|
|
__u8 responder_resources;
|
|
|
|
__u8 initiator_depth;
|
|
|
|
__u8 flow_control;
|
|
|
|
__u8 retry_count;
|
|
|
|
__u8 rnr_retry_count;
|
|
|
|
__u8 valid;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_ud_param {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 qp_num;
|
|
|
|
__u32 qkey;
|
|
|
|
struct ib_uverbs_ah_attr ah_attr;
|
|
|
|
__u8 private_data[RDMA_MAX_PRIVATE_DATA];
|
|
|
|
__u8 private_data_len;
|
|
|
|
__u8 reserved[7];
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
2020-08-03 20:53:55 +02:00
|
|
|
struct rdma_ucm_ece {
|
|
|
|
__u32 vendor_id;
|
|
|
|
__u32 attr_mod;
|
|
|
|
};
|
2013-10-17 01:09:24 +02:00
|
|
|
struct rdma_ucm_connect {
|
2015-01-28 19:07:51 +01:00
|
|
|
struct rdma_ucm_conn_param conn_param;
|
|
|
|
__u32 id;
|
|
|
|
__u32 reserved;
|
2020-08-03 20:53:55 +02:00
|
|
|
struct rdma_ucm_ece ece;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_listen {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u32 backlog;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_accept {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 uid;
|
2015-01-28 19:07:51 +01:00
|
|
|
struct rdma_ucm_conn_param conn_param;
|
|
|
|
__u32 id;
|
|
|
|
__u32 reserved;
|
2020-08-03 20:53:55 +02:00
|
|
|
struct rdma_ucm_ece ece;
|
2014-09-18 22:14:58 +02:00
|
|
|
};
|
2013-10-17 01:09:24 +02:00
|
|
|
struct rdma_ucm_reject {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u8 private_data_len;
|
2020-08-03 20:53:55 +02:00
|
|
|
__u8 reason;
|
|
|
|
__u8 reserved[2];
|
2015-01-28 19:07:51 +01:00
|
|
|
__u8 private_data[RDMA_MAX_PRIVATE_DATA];
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_disconnect {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_init_qp_attr {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 response;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u32 qp_state;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
struct rdma_ucm_notify {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u32 event;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
2014-07-10 00:33:25 +02:00
|
|
|
struct rdma_ucm_join_ip_mcast {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 response;
|
|
|
|
__aligned_u64 uid;
|
2015-01-28 19:07:51 +01:00
|
|
|
struct sockaddr_in6 addr;
|
|
|
|
__u32 id;
|
2014-09-18 22:14:58 +02:00
|
|
|
};
|
2016-12-12 23:55:36 +01:00
|
|
|
enum {
|
|
|
|
RDMA_MC_JOIN_FLAG_FULLMEMBER,
|
|
|
|
RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER,
|
|
|
|
RDMA_MC_JOIN_FLAG_RESERVED,
|
|
|
|
};
|
2014-07-10 00:33:25 +02:00
|
|
|
struct rdma_ucm_join_mcast {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 response;
|
|
|
|
__aligned_u64 uid;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u16 addr_size;
|
2016-12-12 23:55:36 +01:00
|
|
|
__u16 join_flags;
|
2017-08-31 01:10:24 +02:00
|
|
|
struct sockaddr_storage addr;
|
2014-09-18 22:14:58 +02:00
|
|
|
};
|
2013-10-17 01:09:24 +02:00
|
|
|
struct rdma_ucm_get_event {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 response;
|
2016-12-12 23:55:36 +01:00
|
|
|
};
|
2014-09-18 22:14:58 +02:00
|
|
|
struct rdma_ucm_event_resp {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 uid;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
2016-12-12 23:55:36 +01:00
|
|
|
__u32 event;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 status;
|
|
|
|
union {
|
|
|
|
struct rdma_ucm_conn_param conn;
|
2016-12-12 23:55:36 +01:00
|
|
|
struct rdma_ucm_ud_param ud;
|
2015-01-28 19:07:51 +01:00
|
|
|
} param;
|
2018-06-27 23:12:29 +02:00
|
|
|
__u32 reserved;
|
2020-08-03 20:53:55 +02:00
|
|
|
struct rdma_ucm_ece ece;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
enum {
|
2016-12-12 23:55:36 +01:00
|
|
|
RDMA_OPTION_ID = 0,
|
2015-01-28 19:07:51 +01:00
|
|
|
RDMA_OPTION_IB = 1
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
|
|
|
enum {
|
2016-12-12 23:55:36 +01:00
|
|
|
RDMA_OPTION_ID_TOS = 0,
|
2015-01-28 19:07:51 +01:00
|
|
|
RDMA_OPTION_ID_REUSEADDR = 1,
|
|
|
|
RDMA_OPTION_ID_AFONLY = 2,
|
2019-05-20 21:58:13 +02:00
|
|
|
RDMA_OPTION_ID_ACK_TIMEOUT = 3
|
|
|
|
};
|
|
|
|
enum {
|
2015-01-28 19:07:51 +01:00
|
|
|
RDMA_OPTION_IB_PATH = 1
|
2016-12-12 23:55:36 +01:00
|
|
|
};
|
2014-09-18 22:14:58 +02:00
|
|
|
struct rdma_ucm_set_option {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 optval;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
2016-12-12 23:55:36 +01:00
|
|
|
__u32 level;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 optname;
|
|
|
|
__u32 optlen;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
2016-12-12 23:55:36 +01:00
|
|
|
struct rdma_ucm_migrate_id {
|
2018-06-27 23:12:29 +02:00
|
|
|
__aligned_u64 response;
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 id;
|
|
|
|
__u32 fd;
|
2016-12-12 23:55:36 +01:00
|
|
|
};
|
2014-09-18 22:14:58 +02:00
|
|
|
struct rdma_ucm_migrate_resp {
|
2015-01-28 19:07:51 +01:00
|
|
|
__u32 events_reported;
|
2013-10-17 01:09:24 +02:00
|
|
|
};
|
2016-12-12 23:55:36 +01:00
|
|
|
#endif
|