Update to kernel headers v5.3.2.

Test: Builds and run unit tests on taimen/cuttlefish.
Change-Id: I6ebd8f179d159ac974555e8edca588083e8081b3
diff --git a/libc/kernel/uapi/rdma/ib_user_cm.h b/libc/kernel/uapi/rdma/ib_user_cm.h
deleted file mode 100644
index 5ba46b8..0000000
--- a/libc/kernel/uapi/rdma/ib_user_cm.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   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 IB_USER_CM_H
-#define IB_USER_CM_H
-#include <linux/types.h>
-#include <rdma/ib_user_sa.h>
-#define IB_USER_CM_ABI_VERSION 5
-enum {
-  IB_USER_CM_CMD_CREATE_ID,
-  IB_USER_CM_CMD_DESTROY_ID,
-  IB_USER_CM_CMD_ATTR_ID,
-  IB_USER_CM_CMD_LISTEN,
-  IB_USER_CM_CMD_NOTIFY,
-  IB_USER_CM_CMD_SEND_REQ,
-  IB_USER_CM_CMD_SEND_REP,
-  IB_USER_CM_CMD_SEND_RTU,
-  IB_USER_CM_CMD_SEND_DREQ,
-  IB_USER_CM_CMD_SEND_DREP,
-  IB_USER_CM_CMD_SEND_REJ,
-  IB_USER_CM_CMD_SEND_MRA,
-  IB_USER_CM_CMD_SEND_LAP,
-  IB_USER_CM_CMD_SEND_APR,
-  IB_USER_CM_CMD_SEND_SIDR_REQ,
-  IB_USER_CM_CMD_SEND_SIDR_REP,
-  IB_USER_CM_CMD_EVENT,
-  IB_USER_CM_CMD_INIT_QP_ATTR,
-};
-struct ib_ucm_cmd_hdr {
-  __u32 cmd;
-  __u16 in;
-  __u16 out;
-};
-struct ib_ucm_create_id {
-  __aligned_u64 uid;
-  __aligned_u64 response;
-};
-struct ib_ucm_create_id_resp {
-  __u32 id;
-};
-struct ib_ucm_destroy_id {
-  __aligned_u64 response;
-  __u32 id;
-  __u32 reserved;
-};
-struct ib_ucm_destroy_id_resp {
-  __u32 events_reported;
-};
-struct ib_ucm_attr_id {
-  __aligned_u64 response;
-  __u32 id;
-  __u32 reserved;
-};
-struct ib_ucm_attr_id_resp {
-  __be64 service_id;
-  __be64 service_mask;
-  __be32 local_id;
-  __be32 remote_id;
-};
-struct ib_ucm_init_qp_attr {
-  __aligned_u64 response;
-  __u32 id;
-  __u32 qp_state;
-};
-struct ib_ucm_listen {
-  __be64 service_id;
-  __be64 service_mask;
-  __u32 id;
-  __u32 reserved;
-};
-struct ib_ucm_notify {
-  __u32 id;
-  __u32 event;
-};
-struct ib_ucm_private_data {
-  __aligned_u64 data;
-  __u32 id;
-  __u8 len;
-  __u8 reserved[3];
-};
-struct ib_ucm_req {
-  __u32 id;
-  __u32 qpn;
-  __u32 qp_type;
-  __u32 psn;
-  __be64 sid;
-  __aligned_u64 data;
-  __aligned_u64 primary_path;
-  __aligned_u64 alternate_path;
-  __u8 len;
-  __u8 peer_to_peer;
-  __u8 responder_resources;
-  __u8 initiator_depth;
-  __u8 remote_cm_response_timeout;
-  __u8 flow_control;
-  __u8 local_cm_response_timeout;
-  __u8 retry_count;
-  __u8 rnr_retry_count;
-  __u8 max_cm_retries;
-  __u8 srq;
-  __u8 reserved[5];
-};
-struct ib_ucm_rep {
-  __aligned_u64 uid;
-  __aligned_u64 data;
-  __u32 id;
-  __u32 qpn;
-  __u32 psn;
-  __u8 len;
-  __u8 responder_resources;
-  __u8 initiator_depth;
-  __u8 target_ack_delay;
-  __u8 failover_accepted;
-  __u8 flow_control;
-  __u8 rnr_retry_count;
-  __u8 srq;
-  __u8 reserved[4];
-};
-struct ib_ucm_info {
-  __u32 id;
-  __u32 status;
-  __aligned_u64 info;
-  __aligned_u64 data;
-  __u8 info_len;
-  __u8 data_len;
-  __u8 reserved[6];
-};
-struct ib_ucm_mra {
-  __aligned_u64 data;
-  __u32 id;
-  __u8 len;
-  __u8 timeout;
-  __u8 reserved[2];
-};
-struct ib_ucm_lap {
-  __aligned_u64 path;
-  __aligned_u64 data;
-  __u32 id;
-  __u8 len;
-  __u8 reserved[3];
-};
-struct ib_ucm_sidr_req {
-  __u32 id;
-  __u32 timeout;
-  __be64 sid;
-  __aligned_u64 data;
-  __aligned_u64 path;
-  __u16 reserved_pkey;
-  __u8 len;
-  __u8 max_cm_retries;
-  __u8 reserved[4];
-};
-struct ib_ucm_sidr_rep {
-  __u32 id;
-  __u32 qpn;
-  __u32 qkey;
-  __u32 status;
-  __aligned_u64 info;
-  __aligned_u64 data;
-  __u8 info_len;
-  __u8 data_len;
-  __u8 reserved[6];
-};
-struct ib_ucm_event_get {
-  __aligned_u64 response;
-  __aligned_u64 data;
-  __aligned_u64 info;
-  __u8 data_len;
-  __u8 info_len;
-  __u8 reserved[6];
-};
-struct ib_ucm_req_event_resp {
-  struct ib_user_path_rec primary_path;
-  struct ib_user_path_rec alternate_path;
-  __be64 remote_ca_guid;
-  __u32 remote_qkey;
-  __u32 remote_qpn;
-  __u32 qp_type;
-  __u32 starting_psn;
-  __u8 responder_resources;
-  __u8 initiator_depth;
-  __u8 local_cm_response_timeout;
-  __u8 flow_control;
-  __u8 remote_cm_response_timeout;
-  __u8 retry_count;
-  __u8 rnr_retry_count;
-  __u8 srq;
-  __u8 port;
-  __u8 reserved[7];
-};
-struct ib_ucm_rep_event_resp {
-  __be64 remote_ca_guid;
-  __u32 remote_qkey;
-  __u32 remote_qpn;
-  __u32 starting_psn;
-  __u8 responder_resources;
-  __u8 initiator_depth;
-  __u8 target_ack_delay;
-  __u8 failover_accepted;
-  __u8 flow_control;
-  __u8 rnr_retry_count;
-  __u8 srq;
-  __u8 reserved[5];
-};
-struct ib_ucm_rej_event_resp {
-  __u32 reason;
-};
-struct ib_ucm_mra_event_resp {
-  __u8 timeout;
-  __u8 reserved[3];
-};
-struct ib_ucm_lap_event_resp {
-  struct ib_user_path_rec path;
-};
-struct ib_ucm_apr_event_resp {
-  __u32 status;
-};
-struct ib_ucm_sidr_req_event_resp {
-  __u16 pkey;
-  __u8 port;
-  __u8 reserved;
-};
-struct ib_ucm_sidr_rep_event_resp {
-  __u32 status;
-  __u32 qkey;
-  __u32 qpn;
-};
-#define IB_UCM_PRES_DATA 0x01
-#define IB_UCM_PRES_INFO 0x02
-#define IB_UCM_PRES_PRIMARY 0x04
-#define IB_UCM_PRES_ALTERNATE 0x08
-struct ib_ucm_event_resp {
-  __aligned_u64 uid;
-  __u32 id;
-  __u32 event;
-  __u32 present;
-  __u32 reserved;
-  union {
-    struct ib_ucm_req_event_resp req_resp;
-    struct ib_ucm_rep_event_resp rep_resp;
-    struct ib_ucm_rej_event_resp rej_resp;
-    struct ib_ucm_mra_event_resp mra_resp;
-    struct ib_ucm_lap_event_resp lap_resp;
-    struct ib_ucm_apr_event_resp apr_resp;
-    struct ib_ucm_sidr_req_event_resp sidr_req_resp;
-    struct ib_ucm_sidr_rep_event_resp sidr_rep_resp;
-    __u32 send_status;
-  } u;
-};
-#endif
diff --git a/libc/kernel/uapi/rdma/mlx5_user_ioctl_cmds.h b/libc/kernel/uapi/rdma/mlx5_user_ioctl_cmds.h
index 66bd666..dcd281a 100644
--- a/libc/kernel/uapi/rdma/mlx5_user_ioctl_cmds.h
+++ b/libc/kernel/uapi/rdma/mlx5_user_ioctl_cmds.h
@@ -32,6 +32,7 @@
   MLX5_IB_METHOD_DEVX_OTHER = (1U << UVERBS_ID_NS_SHIFT),
   MLX5_IB_METHOD_DEVX_QUERY_UAR,
   MLX5_IB_METHOD_DEVX_QUERY_EQN,
+  MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT,
 };
 enum mlx5_ib_devx_other_attrs {
   MLX5_IB_ATTR_DEVX_OTHER_CMD_IN = (1U << UVERBS_ID_NS_SHIFT),
@@ -66,6 +67,13 @@
   MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_WR_ID,
   MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_OUT_LEN,
 };
+enum mlx5_ib_devx_subscribe_event_attrs {
+  MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+  MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_OBJ_HANDLE,
+  MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_TYPE_NUM_LIST,
+  MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_NUM,
+  MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_COOKIE,
+};
 enum mlx5_ib_devx_query_eqn_attrs {
   MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC = (1U << UVERBS_ID_NS_SHIFT),
   MLX5_IB_ATTR_DEVX_QUERY_EQN_DEV_EQN,
@@ -94,15 +102,23 @@
 enum mlx5_ib_devx_async_cmd_fd_alloc_attrs {
   MLX5_IB_ATTR_DEVX_ASYNC_CMD_FD_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
 };
+enum mlx5_ib_devx_async_event_fd_alloc_attrs {
+  MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+  MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_FLAGS,
+};
 enum mlx5_ib_devx_async_cmd_fd_methods {
   MLX5_IB_METHOD_DEVX_ASYNC_CMD_FD_ALLOC = (1U << UVERBS_ID_NS_SHIFT),
 };
+enum mlx5_ib_devx_async_event_fd_methods {
+  MLX5_IB_METHOD_DEVX_ASYNC_EVENT_FD_ALLOC = (1U << UVERBS_ID_NS_SHIFT),
+};
 enum mlx5_ib_objects {
   MLX5_IB_OBJECT_DEVX = (1U << UVERBS_ID_NS_SHIFT),
   MLX5_IB_OBJECT_DEVX_OBJ,
   MLX5_IB_OBJECT_DEVX_UMEM,
   MLX5_IB_OBJECT_FLOW_MATCHER,
   MLX5_IB_OBJECT_DEVX_ASYNC_CMD_FD,
+  MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD,
 };
 enum mlx5_ib_flow_matcher_create_attrs {
   MLX5_IB_ATTR_FLOW_MATCHER_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
diff --git a/libc/kernel/uapi/rdma/mlx5_user_ioctl_verbs.h b/libc/kernel/uapi/rdma/mlx5_user_ioctl_verbs.h
index a75368d..64bc843 100644
--- a/libc/kernel/uapi/rdma/mlx5_user_ioctl_verbs.h
+++ b/libc/kernel/uapi/rdma/mlx5_user_ioctl_verbs.h
@@ -42,4 +42,11 @@
   MLX5_IB_UAPI_DM_TYPE_STEERING_SW_ICM,
   MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_SW_ICM,
 };
+enum mlx5_ib_uapi_devx_create_event_channel_flags {
+  MLX5_IB_UAPI_DEVX_CR_EV_CH_FLAGS_OMIT_DATA = 1 << 0,
+};
+struct mlx5_ib_uapi_devx_async_event_hdr {
+  __aligned_u64 cookie;
+  __u8 out_data[];
+};
 #endif
diff --git a/libc/kernel/uapi/rdma/rdma_netlink.h b/libc/kernel/uapi/rdma/rdma_netlink.h
index bbb1822..ed585cf 100644
--- a/libc/kernel/uapi/rdma/rdma_netlink.h
+++ b/libc/kernel/uapi/rdma/rdma_netlink.h
@@ -136,6 +136,15 @@
   IWPM_NLA_HELLO_MAX
 };
 enum {
+  RDMA_NODE_IB_CA = 1,
+  RDMA_NODE_IB_SWITCH,
+  RDMA_NODE_IB_ROUTER,
+  RDMA_NODE_RNIC,
+  RDMA_NODE_USNIC,
+  RDMA_NODE_USNIC_UDP,
+  RDMA_NODE_UNSPECIFIED,
+};
+enum {
   RDMA_NL_LS_OP_RESOLVE = 0,
   RDMA_NL_LS_OP_SET_TIMEOUT,
   RDMA_NL_LS_OP_IP_RESOLVE,
@@ -191,11 +200,12 @@
   RDMA_NLDEV_CMD_RES_CQ_GET,
   RDMA_NLDEV_CMD_RES_MR_GET,
   RDMA_NLDEV_CMD_RES_PD_GET,
+  RDMA_NLDEV_CMD_GET_CHARDEV,
+  RDMA_NLDEV_CMD_STAT_SET,
+  RDMA_NLDEV_CMD_STAT_GET,
+  RDMA_NLDEV_CMD_STAT_DEL,
   RDMA_NLDEV_NUM_OPS
 };
-enum {
-  RDMA_NLDEV_ATTR_ENTRY_STRLEN = 16,
-};
 enum rdma_nldev_print_type {
   RDMA_NLDEV_PRINT_TYPE_UNSPEC,
   RDMA_NLDEV_PRINT_TYPE_HEX,
@@ -271,6 +281,31 @@
   RDMA_NLDEV_SYS_ATTR_NETNS_MODE,
   RDMA_NLDEV_ATTR_DEV_PROTOCOL,
   RDMA_NLDEV_NET_NS_FD,
+  RDMA_NLDEV_ATTR_CHARDEV_TYPE,
+  RDMA_NLDEV_ATTR_CHARDEV_NAME,
+  RDMA_NLDEV_ATTR_CHARDEV_ABI,
+  RDMA_NLDEV_ATTR_CHARDEV,
+  RDMA_NLDEV_ATTR_UVERBS_DRIVER_ID,
+  RDMA_NLDEV_ATTR_STAT_MODE,
+  RDMA_NLDEV_ATTR_STAT_RES,
+  RDMA_NLDEV_ATTR_STAT_AUTO_MODE_MASK,
+  RDMA_NLDEV_ATTR_STAT_COUNTER,
+  RDMA_NLDEV_ATTR_STAT_COUNTER_ENTRY,
+  RDMA_NLDEV_ATTR_STAT_COUNTER_ID,
+  RDMA_NLDEV_ATTR_STAT_HWCOUNTERS,
+  RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY,
+  RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_NAME,
+  RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_VALUE,
+  RDMA_NLDEV_ATTR_DEV_DIM,
   RDMA_NLDEV_ATTR_MAX
 };
+enum rdma_nl_counter_mode {
+  RDMA_COUNTER_MODE_NONE,
+  RDMA_COUNTER_MODE_AUTO,
+  RDMA_COUNTER_MODE_MANUAL,
+  RDMA_COUNTER_MODE_MAX,
+};
+enum rdma_nl_counter_mask {
+  RDMA_COUNTER_MASK_QP_TYPE = 1,
+};
 #endif
diff --git a/libc/kernel/uapi/rdma/rdma_user_ioctl_cmds.h b/libc/kernel/uapi/rdma/rdma_user_ioctl_cmds.h
index 2692e3a..b779bc8 100644
--- a/libc/kernel/uapi/rdma/rdma_user_ioctl_cmds.h
+++ b/libc/kernel/uapi/rdma/rdma_user_ioctl_cmds.h
@@ -71,5 +71,6 @@
   RDMA_DRIVER_HFI1,
   RDMA_DRIVER_QIB,
   RDMA_DRIVER_EFA,
+  RDMA_DRIVER_SIW,
 };
 #endif
diff --git a/libc/kernel/uapi/rdma/rvt-abi.h b/libc/kernel/uapi/rdma/rvt-abi.h
new file mode 100644
index 0000000..49632ee
--- /dev/null
+++ b/libc/kernel/uapi/rdma/rvt-abi.h
@@ -0,0 +1,47 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   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 RVT_ABI_USER_H
+#define RVT_ABI_USER_H
+#include <linux/types.h>
+#include <rdma/ib_user_verbs.h>
+#ifndef RDMA_ATOMIC_UAPI
+#define RDMA_ATOMIC_UAPI(_type,_name) struct { _type val; } _name
+#endif
+struct rvt_wqe_sge {
+  __aligned_u64 addr;
+  __u32 length;
+  __u32 lkey;
+};
+struct rvt_cq_wc {
+  RDMA_ATOMIC_UAPI(__u32, head);
+  RDMA_ATOMIC_UAPI(__u32, tail);
+  struct ib_uverbs_wc uqueue[];
+};
+struct rvt_rwqe {
+  __u64 wr_id;
+  __u8 num_sge;
+  __u8 padding[7];
+  struct rvt_wqe_sge sg_list[];
+};
+struct rvt_rwq {
+  RDMA_ATOMIC_UAPI(__u32, head);
+  RDMA_ATOMIC_UAPI(__u32, tail);
+  struct rvt_rwqe wq[];
+};
+#endif
diff --git a/libc/kernel/uapi/rdma/siw-abi.h b/libc/kernel/uapi/rdma/siw-abi.h
new file mode 100644
index 0000000..e2363a1
--- /dev/null
+++ b/libc/kernel/uapi/rdma/siw-abi.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   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 _SIW_USER_H
+#define _SIW_USER_H
+#include <linux/types.h>
+#define SIW_NODE_DESC_COMMON "Software iWARP stack"
+#define SIW_ABI_VERSION 1
+#define SIW_MAX_SGE 6
+#define SIW_UOBJ_MAX_KEY 0x08FFFF
+#define SIW_INVAL_UOBJ_KEY (SIW_UOBJ_MAX_KEY + 1)
+struct siw_uresp_create_cq {
+  __u32 cq_id;
+  __u32 num_cqe;
+  __aligned_u64 cq_key;
+};
+struct siw_uresp_create_qp {
+  __u32 qp_id;
+  __u32 num_sqe;
+  __u32 num_rqe;
+  __u32 pad;
+  __aligned_u64 sq_key;
+  __aligned_u64 rq_key;
+};
+struct siw_ureq_reg_mr {
+  __u8 stag_key;
+  __u8 reserved[3];
+  __u32 pad;
+};
+struct siw_uresp_reg_mr {
+  __u32 stag;
+  __u32 pad;
+};
+struct siw_uresp_create_srq {
+  __u32 num_rqe;
+  __u32 pad;
+  __aligned_u64 srq_key;
+};
+struct siw_uresp_alloc_ctx {
+  __u32 dev_id;
+  __u32 pad;
+};
+enum siw_opcode {
+  SIW_OP_WRITE,
+  SIW_OP_READ,
+  SIW_OP_READ_LOCAL_INV,
+  SIW_OP_SEND,
+  SIW_OP_SEND_WITH_IMM,
+  SIW_OP_SEND_REMOTE_INV,
+  SIW_OP_FETCH_AND_ADD,
+  SIW_OP_COMP_AND_SWAP,
+  SIW_OP_RECEIVE,
+  SIW_OP_READ_RESPONSE,
+  SIW_OP_INVAL_STAG,
+  SIW_OP_REG_MR,
+  SIW_NUM_OPCODES
+};
+struct siw_sge {
+  __aligned_u64 laddr;
+  __u32 length;
+  __u32 lkey;
+};
+#define SIW_MAX_INLINE (sizeof(struct siw_sge) * (SIW_MAX_SGE - 1))
+#if SIW_MAX_SGE < 2
+#error "SIW_MAX_SGE must be at least 2"
+#endif
+enum siw_wqe_flags {
+  SIW_WQE_VALID = 1,
+  SIW_WQE_INLINE = (1 << 1),
+  SIW_WQE_SIGNALLED = (1 << 2),
+  SIW_WQE_SOLICITED = (1 << 3),
+  SIW_WQE_READ_FENCE = (1 << 4),
+  SIW_WQE_REM_INVAL = (1 << 5),
+  SIW_WQE_COMPLETED = (1 << 6)
+};
+struct siw_sqe {
+  __aligned_u64 id;
+  __u16 flags;
+  __u8 num_sge;
+  __u8 opcode;
+  __u32 rkey;
+  union {
+    __aligned_u64 raddr;
+    __aligned_u64 base_mr;
+  };
+  union {
+    struct siw_sge sge[SIW_MAX_SGE];
+    __aligned_u64 access;
+  };
+};
+struct siw_rqe {
+  __aligned_u64 id;
+  __u16 flags;
+  __u8 num_sge;
+  __u8 opcode;
+  __u32 unused;
+  struct siw_sge sge[SIW_MAX_SGE];
+};
+enum siw_notify_flags {
+  SIW_NOTIFY_NOT = (0),
+  SIW_NOTIFY_SOLICITED = (1 << 0),
+  SIW_NOTIFY_NEXT_COMPLETION = (1 << 1),
+  SIW_NOTIFY_MISSED_EVENTS = (1 << 2),
+  SIW_NOTIFY_ALL = SIW_NOTIFY_SOLICITED | SIW_NOTIFY_NEXT_COMPLETION | SIW_NOTIFY_MISSED_EVENTS
+};
+enum siw_wc_status {
+  SIW_WC_SUCCESS,
+  SIW_WC_LOC_LEN_ERR,
+  SIW_WC_LOC_PROT_ERR,
+  SIW_WC_LOC_QP_OP_ERR,
+  SIW_WC_WR_FLUSH_ERR,
+  SIW_WC_BAD_RESP_ERR,
+  SIW_WC_LOC_ACCESS_ERR,
+  SIW_WC_REM_ACCESS_ERR,
+  SIW_WC_REM_INV_REQ_ERR,
+  SIW_WC_GENERAL_ERR,
+  SIW_NUM_WC_STATUS
+};
+struct siw_cqe {
+  __aligned_u64 id;
+  __u8 flags;
+  __u8 opcode;
+  __u16 status;
+  __u32 bytes;
+  union {
+    __aligned_u64 imm_data;
+    __u32 inval_stag;
+  };
+  union {
+    struct ib_qp * base_qp;
+    __aligned_u64 qp_id;
+  };
+};
+struct siw_cq_ctrl {
+  __u32 flags;
+  __u32 pad;
+};
+#endif