Update to kernel headers v4.14.

Remove the hiding of the kernel structure binder_fd_array_object. This
structure now matches the structure used in the binder code.

Load the libclang_android.so shared library directly for parsing.
This file changed name in a recent update to the prebuilts.

Test: Compiles arm/arm64/x86/x86_64.
Test: Boots on hikey and boots on a sailfish.
Test: Ran bionic unit tests on hikey and sailfish.
Change-Id: I141a4b93ac3511cd58f4d12bb3c0d4efaa4c2742
diff --git a/libc/kernel/uapi/rdma/ib_user_ioctl_verbs.h b/libc/kernel/uapi/rdma/ib_user_ioctl_verbs.h
new file mode 100644
index 0000000..766fe4c
--- /dev/null
+++ b/libc/kernel/uapi/rdma/ib_user_ioctl_verbs.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   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_IOCTL_VERBS_H
+#define IB_USER_IOCTL_VERBS_H
+#include <rdma/rdma_user_ioctl.h>
+#define UVERBS_UDATA_DRIVER_DATA_NS 1
+#define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT)
+enum uverbs_default_objects {
+  UVERBS_OBJECT_DEVICE,
+  UVERBS_OBJECT_PD,
+  UVERBS_OBJECT_COMP_CHANNEL,
+  UVERBS_OBJECT_CQ,
+  UVERBS_OBJECT_QP,
+  UVERBS_OBJECT_SRQ,
+  UVERBS_OBJECT_AH,
+  UVERBS_OBJECT_MR,
+  UVERBS_OBJECT_MW,
+  UVERBS_OBJECT_FLOW,
+  UVERBS_OBJECT_XRCD,
+  UVERBS_OBJECT_RWQ_IND_TBL,
+  UVERBS_OBJECT_WQ,
+  UVERBS_OBJECT_LAST,
+};
+enum {
+  UVERBS_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG,
+  UVERBS_UHW_OUT,
+};
+enum uverbs_create_cq_cmd_attr_ids {
+  CREATE_CQ_HANDLE,
+  CREATE_CQ_CQE,
+  CREATE_CQ_USER_HANDLE,
+  CREATE_CQ_COMP_CHANNEL,
+  CREATE_CQ_COMP_VECTOR,
+  CREATE_CQ_FLAGS,
+  CREATE_CQ_RESP_CQE,
+};
+enum uverbs_destroy_cq_cmd_attr_ids {
+  DESTROY_CQ_HANDLE,
+  DESTROY_CQ_RESP,
+};
+enum uverbs_actions_cq_ops {
+  UVERBS_CQ_CREATE,
+  UVERBS_CQ_DESTROY,
+};
+#endif
diff --git a/libc/kernel/uapi/rdma/ib_user_verbs.h b/libc/kernel/uapi/rdma/ib_user_verbs.h
index 4feb031..ff3ebcb 100644
--- a/libc/kernel/uapi/rdma/ib_user_verbs.h
+++ b/libc/kernel/uapi/rdma/ib_user_verbs.h
@@ -174,6 +174,14 @@
   __u32 max_rwq_indirection_table_size;
   __u32 reserved;
 };
+struct ib_uverbs_tm_caps {
+  __u32 max_rndv_hdr_size;
+  __u32 max_num_tags;
+  __u32 flags;
+  __u32 max_ops;
+  __u32 max_sge;
+  __u32 reserved;
+};
 struct ib_uverbs_ex_query_device_resp {
   struct ib_uverbs_query_device_resp base;
   __u32 comp_mask;
@@ -185,6 +193,7 @@
   struct ib_uverbs_rss_caps rss_caps;
   __u32 max_wq_type_rq;
   __u32 raw_packet_caps;
+  struct ib_uverbs_tm_caps tm_caps;
 };
 struct ib_uverbs_query_port {
   __u64 response;
@@ -467,7 +476,7 @@
   __u32 comp_mask;
   __u32 create_flags;
   __u32 rwq_ind_tbl_handle;
-  __u32 reserved1;
+  __u32 source_qpn;
 };
 struct ib_uverbs_open_qp {
   __u64 response;
@@ -852,7 +861,7 @@
   __u32 max_wr;
   __u32 max_sge;
   __u32 srq_limit;
-  __u32 reserved;
+  __u32 max_num_tags;
   __u32 xrcd_handle;
   __u32 cq_handle;
   __u64 driver_data[0];
diff --git a/libc/kernel/uapi/rdma/mlx4-abi.h b/libc/kernel/uapi/rdma/mlx4-abi.h
index 232d835..078b386 100644
--- a/libc/kernel/uapi/rdma/mlx4-abi.h
+++ b/libc/kernel/uapi/rdma/mlx4-abi.h
@@ -56,12 +56,49 @@
   __u32 srqn;
   __u32 reserved;
 };
+struct mlx4_ib_create_qp_rss {
+  __u64 rx_hash_fields_mask;
+  __u8 rx_hash_function;
+  __u8 reserved[7];
+  __u8 rx_hash_key[40];
+  __u32 comp_mask;
+  __u32 reserved1;
+};
 struct mlx4_ib_create_qp {
   __u64 buf_addr;
   __u64 db_addr;
   __u8 log_sq_bb_count;
   __u8 log_sq_stride;
   __u8 sq_no_prefetch;
-  __u8 reserved[5];
+  __u8 reserved;
+  __u32 inl_recv_sz;
+};
+struct mlx4_ib_create_wq {
+  __u64 buf_addr;
+  __u64 db_addr;
+  __u8 log_range_size;
+  __u8 reserved[3];
+  __u32 comp_mask;
+};
+struct mlx4_ib_modify_wq {
+  __u32 comp_mask;
+  __u32 reserved;
+};
+struct mlx4_ib_create_rwq_ind_tbl_resp {
+  __u32 response_length;
+  __u32 reserved;
+};
+enum mlx4_ib_rx_hash_function_flags {
+  MLX4_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0,
+};
+enum mlx4_ib_rx_hash_fields {
+  MLX4_IB_RX_HASH_SRC_IPV4 = 1 << 0,
+  MLX4_IB_RX_HASH_DST_IPV4 = 1 << 1,
+  MLX4_IB_RX_HASH_SRC_IPV6 = 1 << 2,
+  MLX4_IB_RX_HASH_DST_IPV6 = 1 << 3,
+  MLX4_IB_RX_HASH_SRC_PORT_TCP = 1 << 4,
+  MLX4_IB_RX_HASH_DST_PORT_TCP = 1 << 5,
+  MLX4_IB_RX_HASH_SRC_PORT_UDP = 1 << 6,
+  MLX4_IB_RX_HASH_DST_PORT_UDP = 1 << 7
 };
 #endif
diff --git a/libc/kernel/uapi/rdma/mlx5-abi.h b/libc/kernel/uapi/rdma/mlx5-abi.h
index 6e76a3d..b51ff4e 100644
--- a/libc/kernel/uapi/rdma/mlx5-abi.h
+++ b/libc/kernel/uapi/rdma/mlx5-abi.h
@@ -112,6 +112,20 @@
   __u32 supported_qpts;
   __u32 reserved;
 };
+enum mlx5_ib_mpw_caps {
+  MPW_RESERVED = 1 << 0,
+  MLX5_IB_ALLOW_MPW = 1 << 1,
+  MLX5_IB_SUPPORT_EMPW = 1 << 2,
+};
+enum mlx5_ib_sw_parsing_offloads {
+  MLX5_IB_SW_PARSING = 1 << 0,
+  MLX5_IB_SW_PARSING_CSUM = 1 << 1,
+  MLX5_IB_SW_PARSING_LSO = 1 << 2,
+};
+struct mlx5_ib_sw_parsing_caps {
+  __u32 sw_parsing_offloads;
+  __u32 supported_qpts;
+};
 struct mlx5_ib_query_device_resp {
   __u32 comp_mask;
   __u32 response_length;
@@ -121,6 +135,7 @@
   struct mlx5_packet_pacing_caps packet_pacing_caps;
   __u32 mlx5_ib_support_multi_pkt_send_wqes;
   __u32 reserved;
+  struct mlx5_ib_sw_parsing_caps sw_parsing_caps;
 };
 struct mlx5_ib_create_cq {
   __u64 buf_addr;
diff --git a/libc/kernel/uapi/rdma/qedr-abi.h b/libc/kernel/uapi/rdma/qedr-abi.h
index 597391f..55af44b 100644
--- a/libc/kernel/uapi/rdma/qedr-abi.h
+++ b/libc/kernel/uapi/rdma/qedr-abi.h
@@ -30,6 +30,9 @@
   __u32 sges_per_recv_wr;
   __u32 sges_per_srq_wr;
   __u32 max_cqes;
+  __u8 dpm_enabled;
+  __u8 wids_enabled;
+  __u16 wid_count;
 };
 struct qedr_alloc_pd_ureq {
   __u64 rsvd1;
diff --git a/libc/kernel/uapi/rdma/rdma_netlink.h b/libc/kernel/uapi/rdma/rdma_netlink.h
index ae261d7..c7bcb6d 100644
--- a/libc/kernel/uapi/rdma/rdma_netlink.h
+++ b/libc/kernel/uapi/rdma/rdma_netlink.h
@@ -24,7 +24,7 @@
   RDMA_NL_IWCM,
   RDMA_NL_RSVD,
   RDMA_NL_LS,
-  RDMA_NL_I40IW,
+  RDMA_NL_NLDEV,
   RDMA_NL_NUM_CLIENTS
 };
 enum {
@@ -170,4 +170,34 @@
 struct rdma_nla_ls_gid {
   __u8 gid[16];
 };
+enum rdma_nldev_command {
+  RDMA_NLDEV_CMD_UNSPEC,
+  RDMA_NLDEV_CMD_GET,
+  RDMA_NLDEV_CMD_SET,
+  RDMA_NLDEV_CMD_NEW,
+  RDMA_NLDEV_CMD_DEL,
+  RDMA_NLDEV_CMD_PORT_GET,
+  RDMA_NLDEV_CMD_PORT_SET,
+  RDMA_NLDEV_CMD_PORT_NEW,
+  RDMA_NLDEV_CMD_PORT_DEL,
+  RDMA_NLDEV_NUM_OPS
+};
+enum rdma_nldev_attr {
+  RDMA_NLDEV_ATTR_UNSPEC,
+  RDMA_NLDEV_ATTR_DEV_INDEX,
+  RDMA_NLDEV_ATTR_DEV_NAME,
+  RDMA_NLDEV_ATTR_PORT_INDEX,
+  RDMA_NLDEV_ATTR_CAP_FLAGS,
+  RDMA_NLDEV_ATTR_FW_VERSION,
+  RDMA_NLDEV_ATTR_NODE_GUID,
+  RDMA_NLDEV_ATTR_SYS_IMAGE_GUID,
+  RDMA_NLDEV_ATTR_SUBNET_PREFIX,
+  RDMA_NLDEV_ATTR_LID,
+  RDMA_NLDEV_ATTR_SM_LID,
+  RDMA_NLDEV_ATTR_LMC,
+  RDMA_NLDEV_ATTR_PORT_STATE,
+  RDMA_NLDEV_ATTR_PORT_PHYS_STATE,
+  RDMA_NLDEV_ATTR_DEV_NODE_TYPE,
+  RDMA_NLDEV_ATTR_MAX
+};
 #endif
diff --git a/libc/kernel/uapi/rdma/rdma_user_ioctl.h b/libc/kernel/uapi/rdma/rdma_user_ioctl.h
index bb65c5d..41c11bc 100644
--- a/libc/kernel/uapi/rdma/rdma_user_ioctl.h
+++ b/libc/kernel/uapi/rdma/rdma_user_ioctl.h
@@ -24,6 +24,28 @@
 #include <rdma/hfi/hfi1_ioctl.h>
 #define RDMA_IOCTL_MAGIC 0x1b
 #define IB_IOCTL_MAGIC RDMA_IOCTL_MAGIC
+#define RDMA_VERBS_IOCTL _IOWR(RDMA_IOCTL_MAGIC, 1, struct ib_uverbs_ioctl_hdr)
+#define UVERBS_ID_NS_MASK 0xF000
+#define UVERBS_ID_NS_SHIFT 12
+enum {
+  UVERBS_ATTR_F_MANDATORY = 1U << 0,
+  UVERBS_ATTR_F_VALID_OUTPUT = 1U << 1,
+};
+struct ib_uverbs_attr {
+  __u16 attr_id;
+  __u16 len;
+  __u16 flags;
+  __u16 reserved;
+  __u64 data;
+};
+struct ib_uverbs_ioctl_hdr {
+  __u16 length;
+  __u16 object_id;
+  __u16 method_id;
+  __u16 num_attrs;
+  __u64 reserved;
+  struct ib_uverbs_attr attrs[0];
+};
 #define IB_USER_MAD_REGISTER_AGENT _IOWR(RDMA_IOCTL_MAGIC, 0x01, struct ib_user_mad_reg_req)
 #define IB_USER_MAD_UNREGISTER_AGENT _IOW(RDMA_IOCTL_MAGIC, 0x02, __u32)
 #define IB_USER_MAD_ENABLE_PKEY _IO(RDMA_IOCTL_MAGIC, 0x03)
diff --git a/libc/kernel/uapi/rdma/vmw_pvrdma-abi.h b/libc/kernel/uapi/rdma/vmw_pvrdma-abi.h
index 3666815..2062366 100644
--- a/libc/kernel/uapi/rdma/vmw_pvrdma-abi.h
+++ b/libc/kernel/uapi/rdma/vmw_pvrdma-abi.h
@@ -92,7 +92,8 @@
   PVRDMA_WC_IP_CSUM_OK = 1 << 3,
   PVRDMA_WC_WITH_SMAC = 1 << 4,
   PVRDMA_WC_WITH_VLAN = 1 << 5,
-  PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_VLAN,
+  PVRDMA_WC_WITH_NETWORK_HDR_TYPE = 1 << 6,
+  PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_NETWORK_HDR_TYPE,
 };
 struct pvrdma_alloc_ucontext_resp {
   __u32 qp_tab_size;
@@ -226,6 +227,7 @@
   __u8 dlid_path_bits;
   __u8 port_num;
   __u8 smac[6];
-  __u8 reserved2[7];
+  __u8 network_hdr_type;
+  __u8 reserved2[6];
 };
 #endif