All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core 00/17] Use the kernel ABI header instead of kern-abi.h
@ 2018-01-11 22:13 Jason Gunthorpe
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

This substantially eliminates most of kern-abi.h. All that remains are the
structs that have been modified by appending the header.

Much of the hard work was done via an automatic script.

I've been threatening to do this for some time, but forthcoming work on the
kabi has now made it timely.

This is a github pull request:

https://github.com/linux-rdma/rdma-core/pull/282

Jason Gunthorpe (17):
  Update rdma/ib_user_verbs.h
  verbs: Include rdma/ib_user_verbs.h in kern-abi.h
  verbs: Delete extended command definitions from kern-abi.h
  verbs: Remove unused structs
  verbs: Remove kernel ABI v2 compat cruft
  verbs: Add missing endian annotations to kern-abi.h
  verbs: Use kernel uapi names for identical structs
  verbs: Use kernel uapi header for ibv_cq_moderation_caps_resp
  verbs: Use kernel uapi header for ibv_query_device_resp_ex
  verbs: Use kernel uapi header for ibv_kern_wc and ibv_poll_cq_resp
  verbs: Use kernel uapi header for ibv_create_ah_resp
  verbs: Use kernel uapi header for ibv_kern_send_wr
  verbs: Use kernel uapi header for
    IBV_CREATE_QP_EX_KERNEL_MASK_IND_TABLE
  verbs: Use kernel uapi header for flow steering types
  verbs: Use kernel uapi header for ibv_modify_qp_common
  verb: Use kernel uapi header in struct ex_hdr
  verbs: Tidy up the remaining structs in kern-abi.h

 buildlib/RDMA_LinuxHeaders.cmake            |    2 +-
 buildlib/fixup-include/rdma-ib_user_verbs.h | 1176 +++++++++++++++++++++++++++
 libibcm/cm.c                                |    2 +-
 libibverbs/cmd.c                            |  157 ++--
 libibverbs/device.c                         |    2 +-
 libibverbs/driver.h                         |   40 +-
 libibverbs/ibverbs.h                        |   44 +-
 libibverbs/kern-abi.h                       |  971 ++--------------------
 libibverbs/marshall.c                       |    4 +-
 libibverbs/marshall.h                       |    4 +-
 libibverbs/verbs.c                          |   37 +-
 librdmacm/cma.c                             |    2 +-
 librdmacm/rdma_cma_abi.h                    |    2 +-
 providers/bnxt_re/bnxt_re-abi.h             |   10 +-
 providers/bnxt_re/verbs.c                   |    2 +-
 providers/cxgb3/iwch-abi.h                  |   12 +-
 providers/cxgb4/cxgb4-abi.h                 |   10 +-
 providers/cxgb4/verbs.c                     |    4 +-
 providers/hfi1verbs/hfi-abi.h               |   10 +-
 providers/hfi1verbs/hfiverbs.c              |    2 +-
 providers/hfi1verbs/verbs.c                 |   14 +-
 providers/hns/hns_roce_u_abi.h              |    6 +-
 providers/hns/hns_roce_u_verbs.c            |    6 +-
 providers/i40iw/i40iw-abi.h                 |    8 +-
 providers/i40iw/i40iw_uverbs.c              |    6 +-
 providers/ipathverbs/ipath-abi.h            |   10 +-
 providers/ipathverbs/ipathverbs.c           |    2 +-
 providers/ipathverbs/verbs.c                |   14 +-
 providers/mlx4/mlx4-abi.h                   |   16 +-
 providers/mlx4/verbs.c                      |   18 +-
 providers/mlx5/mlx5-abi.h                   |   22 +-
 providers/mlx5/verbs.c                      |   10 +-
 providers/mthca/mthca-abi.h                 |    8 +-
 providers/mthca/verbs.c                     |    6 +-
 providers/nes/nes-abi.h                     |    8 +-
 providers/nes/nes_uverbs.c                  |    6 +-
 providers/ocrdma/ocrdma_abi.h               |   12 +-
 providers/ocrdma/ocrdma_verbs.c             |    4 +-
 providers/qedr/qelr_abi.h                   |   10 +-
 providers/rxe/rxe-abi.h                     |   10 +-
 providers/rxe/rxe.c                         |   16 +-
 providers/vmw_pvrdma/pvrdma-abi-fix.h       |    8 +-
 providers/vmw_pvrdma/qp.c                   |    4 +-
 providers/vmw_pvrdma/verbs.c                |    2 +-
 44 files changed, 1504 insertions(+), 1215 deletions(-)
 create mode 100644 buildlib/fixup-include/rdma-ib_user_verbs.h

-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 01/17] Update rdma/ib_user_verbs.h
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
@ 2018-01-11 22:13   ` Jason Gunthorpe
       [not found]     ` <20180111221340.965-2-jgg-uk2M96/98Pc@public.gmane.org>
  2018-01-11 22:13   ` [PATCH rdma-core 02/17] verbs: Include rdma/ib_user_verbs.h in kern-abi.h Jason Gunthorpe
                     ` (16 subsequent siblings)
  17 siblings, 1 reply; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

To let us use definitions from the latest kernel headers in followup
patches.

>From v4.15-rc7

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 buildlib/RDMA_LinuxHeaders.cmake            |    2 +-
 buildlib/fixup-include/rdma-ib_user_verbs.h | 1176 +++++++++++++++++++++++++++
 2 files changed, 1177 insertions(+), 1 deletion(-)
 create mode 100644 buildlib/fixup-include/rdma-ib_user_verbs.h

diff --git a/buildlib/RDMA_LinuxHeaders.cmake b/buildlib/RDMA_LinuxHeaders.cmake
index ea60b9b55844ea..aa2a89a53d0c2d 100644
--- a/buildlib/RDMA_LinuxHeaders.cmake
+++ b/buildlib/RDMA_LinuxHeaders.cmake
@@ -86,7 +86,7 @@ function(rdma_report_missing_kheaders)
 endfunction()
 
 # This list is topologically sorted
-rdma_check_kheader("rdma/ib_user_verbs.h" "${DEFAULT_TEST}" NO_SHIM OPTIONAL)
+rdma_check_kheader("rdma/ib_user_verbs.h" "int main(int argc,const char *argv[]) { return IB_USER_VERBS_EX_CMD_MODIFY_CQ; }")
 rdma_check_kheader("rdma/ib_user_sa.h" "${DEFAULT_TEST}" NO_SHIM)
 rdma_check_kheader("rdma/ib_user_cm.h" "${DEFAULT_TEST}" NO_SHIM)
 rdma_check_kheader("rdma/hfi/hfi1_ioctl.h" "${DEFAULT_TEST}" NO_SHIM OPTIONAL)
diff --git a/buildlib/fixup-include/rdma-ib_user_verbs.h b/buildlib/fixup-include/rdma-ib_user_verbs.h
new file mode 100644
index 00000000000000..7e11bb8651b641
--- /dev/null
+++ b/buildlib/fixup-include/rdma-ib_user_verbs.h
@@ -0,0 +1,1176 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2005, 2006 Cisco Systems.  All rights reserved.
+ * Copyright (c) 2005 PathScale, Inc.  All rights reserved.
+ * Copyright (c) 2006 Mellanox Technologies.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef IB_USER_VERBS_H
+#define IB_USER_VERBS_H
+
+#include <linux/types.h>
+
+/*
+ * Increment this value if any changes that break userspace ABI
+ * compatibility are made.
+ */
+#define IB_USER_VERBS_ABI_VERSION	6
+#define IB_USER_VERBS_CMD_THRESHOLD    50
+
+enum {
+	IB_USER_VERBS_CMD_GET_CONTEXT,
+	IB_USER_VERBS_CMD_QUERY_DEVICE,
+	IB_USER_VERBS_CMD_QUERY_PORT,
+	IB_USER_VERBS_CMD_ALLOC_PD,
+	IB_USER_VERBS_CMD_DEALLOC_PD,
+	IB_USER_VERBS_CMD_CREATE_AH,
+	IB_USER_VERBS_CMD_MODIFY_AH,
+	IB_USER_VERBS_CMD_QUERY_AH,
+	IB_USER_VERBS_CMD_DESTROY_AH,
+	IB_USER_VERBS_CMD_REG_MR,
+	IB_USER_VERBS_CMD_REG_SMR,
+	IB_USER_VERBS_CMD_REREG_MR,
+	IB_USER_VERBS_CMD_QUERY_MR,
+	IB_USER_VERBS_CMD_DEREG_MR,
+	IB_USER_VERBS_CMD_ALLOC_MW,
+	IB_USER_VERBS_CMD_BIND_MW,
+	IB_USER_VERBS_CMD_DEALLOC_MW,
+	IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
+	IB_USER_VERBS_CMD_CREATE_CQ,
+	IB_USER_VERBS_CMD_RESIZE_CQ,
+	IB_USER_VERBS_CMD_DESTROY_CQ,
+	IB_USER_VERBS_CMD_POLL_CQ,
+	IB_USER_VERBS_CMD_PEEK_CQ,
+	IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
+	IB_USER_VERBS_CMD_CREATE_QP,
+	IB_USER_VERBS_CMD_QUERY_QP,
+	IB_USER_VERBS_CMD_MODIFY_QP,
+	IB_USER_VERBS_CMD_DESTROY_QP,
+	IB_USER_VERBS_CMD_POST_SEND,
+	IB_USER_VERBS_CMD_POST_RECV,
+	IB_USER_VERBS_CMD_ATTACH_MCAST,
+	IB_USER_VERBS_CMD_DETACH_MCAST,
+	IB_USER_VERBS_CMD_CREATE_SRQ,
+	IB_USER_VERBS_CMD_MODIFY_SRQ,
+	IB_USER_VERBS_CMD_QUERY_SRQ,
+	IB_USER_VERBS_CMD_DESTROY_SRQ,
+	IB_USER_VERBS_CMD_POST_SRQ_RECV,
+	IB_USER_VERBS_CMD_OPEN_XRCD,
+	IB_USER_VERBS_CMD_CLOSE_XRCD,
+	IB_USER_VERBS_CMD_CREATE_XSRQ,
+	IB_USER_VERBS_CMD_OPEN_QP,
+};
+
+enum {
+	IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
+	IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,
+	IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP,
+	IB_USER_VERBS_EX_CMD_MODIFY_QP = IB_USER_VERBS_CMD_MODIFY_QP,
+	IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
+	IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
+	IB_USER_VERBS_EX_CMD_CREATE_WQ,
+	IB_USER_VERBS_EX_CMD_MODIFY_WQ,
+	IB_USER_VERBS_EX_CMD_DESTROY_WQ,
+	IB_USER_VERBS_EX_CMD_CREATE_RWQ_IND_TBL,
+	IB_USER_VERBS_EX_CMD_DESTROY_RWQ_IND_TBL,
+	IB_USER_VERBS_EX_CMD_MODIFY_CQ
+};
+
+/*
+ * Make sure that all structs defined in this file remain laid out so
+ * that they pack the same way on 32-bit and 64-bit architectures (to
+ * avoid incompatibility between 32-bit userspace and 64-bit kernels).
+ * Specifically:
+ *  - Do not use pointer types -- pass pointers in __u64 instead.
+ *  - Make sure that any structure larger than 4 bytes is padded to a
+ *    multiple of 8 bytes.  Otherwise the structure size will be
+ *    different between 32-bit and 64-bit architectures.
+ */
+
+struct ib_uverbs_async_event_desc {
+	__u64 element;
+	__u32 event_type;	/* enum ib_event_type */
+	__u32 reserved;
+};
+
+struct ib_uverbs_comp_event_desc {
+	__u64 cq_handle;
+};
+
+struct ib_uverbs_cq_moderation_caps {
+	__u16     max_cq_moderation_count;
+	__u16     max_cq_moderation_period;
+	__u32     reserved;
+};
+
+/*
+ * All commands from userspace should start with a __u32 command field
+ * followed by __u16 in_words and out_words fields (which give the
+ * length of the command block and response buffer if any in 32-bit
+ * words).  The kernel driver will read these fields first and read
+ * the rest of the command struct based on these value.
+ */
+
+#define IB_USER_VERBS_CMD_COMMAND_MASK 0xff
+#define IB_USER_VERBS_CMD_FLAGS_MASK 0xff000000u
+#define IB_USER_VERBS_CMD_FLAGS_SHIFT 24
+
+#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80
+
+struct ib_uverbs_cmd_hdr {
+	__u32 command;
+	__u16 in_words;
+	__u16 out_words;
+};
+
+struct ib_uverbs_ex_cmd_hdr {
+	__u64 response;
+	__u16 provider_in_words;
+	__u16 provider_out_words;
+	__u32 cmd_hdr_reserved;
+};
+
+struct ib_uverbs_get_context {
+	__u64 response;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_get_context_resp {
+	__u32 async_fd;
+	__u32 num_comp_vectors;
+};
+
+struct ib_uverbs_query_device {
+	__u64 response;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_query_device_resp {
+	__u64 fw_ver;
+	__be64 node_guid;
+	__be64 sys_image_guid;
+	__u64 max_mr_size;
+	__u64 page_size_cap;
+	__u32 vendor_id;
+	__u32 vendor_part_id;
+	__u32 hw_ver;
+	__u32 max_qp;
+	__u32 max_qp_wr;
+	__u32 device_cap_flags;
+	__u32 max_sge;
+	__u32 max_sge_rd;
+	__u32 max_cq;
+	__u32 max_cqe;
+	__u32 max_mr;
+	__u32 max_pd;
+	__u32 max_qp_rd_atom;
+	__u32 max_ee_rd_atom;
+	__u32 max_res_rd_atom;
+	__u32 max_qp_init_rd_atom;
+	__u32 max_ee_init_rd_atom;
+	__u32 atomic_cap;
+	__u32 max_ee;
+	__u32 max_rdd;
+	__u32 max_mw;
+	__u32 max_raw_ipv6_qp;
+	__u32 max_raw_ethy_qp;
+	__u32 max_mcast_grp;
+	__u32 max_mcast_qp_attach;
+	__u32 max_total_mcast_qp_attach;
+	__u32 max_ah;
+	__u32 max_fmr;
+	__u32 max_map_per_fmr;
+	__u32 max_srq;
+	__u32 max_srq_wr;
+	__u32 max_srq_sge;
+	__u16 max_pkeys;
+	__u8  local_ca_ack_delay;
+	__u8  phys_port_cnt;
+	__u8  reserved[4];
+};
+
+struct ib_uverbs_ex_query_device {
+	__u32 comp_mask;
+	__u32 reserved;
+};
+
+struct ib_uverbs_odp_caps {
+	__u64 general_caps;
+	struct {
+		__u32 rc_odp_caps;
+		__u32 uc_odp_caps;
+		__u32 ud_odp_caps;
+	} per_transport_caps;
+	__u32 reserved;
+};
+
+struct ib_uverbs_rss_caps {
+	/* Corresponding bit will be set if qp type from
+	 * 'enum ib_qp_type' is supported, e.g.
+	 * supported_qpts |= 1 << IB_QPT_UD
+	 */
+	__u32 supported_qpts;
+	__u32 max_rwq_indirection_tables;
+	__u32 max_rwq_indirection_table_size;
+	__u32 reserved;
+};
+
+struct ib_uverbs_tm_caps {
+	/* Max size of rendezvous request message */
+	__u32 max_rndv_hdr_size;
+	/* Max number of entries in tag matching list */
+	__u32 max_num_tags;
+	/* TM flags */
+	__u32 flags;
+	/* Max number of outstanding list operations */
+	__u32 max_ops;
+	/* Max number of SGE in tag matching entry */
+	__u32 max_sge;
+	__u32 reserved;
+};
+
+struct ib_uverbs_ex_query_device_resp {
+	struct ib_uverbs_query_device_resp base;
+	__u32 comp_mask;
+	__u32 response_length;
+	struct ib_uverbs_odp_caps odp_caps;
+	__u64 timestamp_mask;
+	__u64 hca_core_clock; /* in KHZ */
+	__u64 device_cap_flags_ex;
+	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_cq_moderation_caps cq_moderation_caps;
+};
+
+struct ib_uverbs_query_port {
+	__u64 response;
+	__u8  port_num;
+	__u8  reserved[7];
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_query_port_resp {
+	__u32 port_cap_flags;
+	__u32 max_msg_sz;
+	__u32 bad_pkey_cntr;
+	__u32 qkey_viol_cntr;
+	__u32 gid_tbl_len;
+	__u16 pkey_tbl_len;
+	__u16 lid;
+	__u16 sm_lid;
+	__u8  state;
+	__u8  max_mtu;
+	__u8  active_mtu;
+	__u8  lmc;
+	__u8  max_vl_num;
+	__u8  sm_sl;
+	__u8  subnet_timeout;
+	__u8  init_type_reply;
+	__u8  active_width;
+	__u8  active_speed;
+	__u8  phys_state;
+	__u8  link_layer;
+	__u8  reserved[2];
+};
+
+struct ib_uverbs_alloc_pd {
+	__u64 response;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_alloc_pd_resp {
+	__u32 pd_handle;
+};
+
+struct ib_uverbs_dealloc_pd {
+	__u32 pd_handle;
+};
+
+struct ib_uverbs_open_xrcd {
+	__u64 response;
+	__u32 fd;
+	__u32 oflags;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_open_xrcd_resp {
+	__u32 xrcd_handle;
+};
+
+struct ib_uverbs_close_xrcd {
+	__u32 xrcd_handle;
+};
+
+struct ib_uverbs_reg_mr {
+	__u64 response;
+	__u64 start;
+	__u64 length;
+	__u64 hca_va;
+	__u32 pd_handle;
+	__u32 access_flags;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_reg_mr_resp {
+	__u32 mr_handle;
+	__u32 lkey;
+	__u32 rkey;
+};
+
+struct ib_uverbs_rereg_mr {
+	__u64 response;
+	__u32 mr_handle;
+	__u32 flags;
+	__u64 start;
+	__u64 length;
+	__u64 hca_va;
+	__u32 pd_handle;
+	__u32 access_flags;
+};
+
+struct ib_uverbs_rereg_mr_resp {
+	__u32 lkey;
+	__u32 rkey;
+};
+
+struct ib_uverbs_dereg_mr {
+	__u32 mr_handle;
+};
+
+struct ib_uverbs_alloc_mw {
+	__u64 response;
+	__u32 pd_handle;
+	__u8  mw_type;
+	__u8  reserved[3];
+};
+
+struct ib_uverbs_alloc_mw_resp {
+	__u32 mw_handle;
+	__u32 rkey;
+};
+
+struct ib_uverbs_dealloc_mw {
+	__u32 mw_handle;
+};
+
+struct ib_uverbs_create_comp_channel {
+	__u64 response;
+};
+
+struct ib_uverbs_create_comp_channel_resp {
+	__u32 fd;
+};
+
+struct ib_uverbs_create_cq {
+	__u64 response;
+	__u64 user_handle;
+	__u32 cqe;
+	__u32 comp_vector;
+	__s32 comp_channel;
+	__u32 reserved;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_ex_create_cq {
+	__u64 user_handle;
+	__u32 cqe;
+	__u32 comp_vector;
+	__s32 comp_channel;
+	__u32 comp_mask;
+	__u32 flags;
+	__u32 reserved;
+};
+
+struct ib_uverbs_create_cq_resp {
+	__u32 cq_handle;
+	__u32 cqe;
+};
+
+struct ib_uverbs_ex_create_cq_resp {
+	struct ib_uverbs_create_cq_resp base;
+	__u32 comp_mask;
+	__u32 response_length;
+};
+
+struct ib_uverbs_resize_cq {
+	__u64 response;
+	__u32 cq_handle;
+	__u32 cqe;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_resize_cq_resp {
+	__u32 cqe;
+	__u32 reserved;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_poll_cq {
+	__u64 response;
+	__u32 cq_handle;
+	__u32 ne;
+};
+
+struct ib_uverbs_wc {
+	__u64 wr_id;
+	__u32 status;
+	__u32 opcode;
+	__u32 vendor_err;
+	__u32 byte_len;
+	union {
+		__u32 imm_data;
+		__u32 invalidate_rkey;
+	} ex;
+	__u32 qp_num;
+	__u32 src_qp;
+	__u32 wc_flags;
+	__u16 pkey_index;
+	__u16 slid;
+	__u8 sl;
+	__u8 dlid_path_bits;
+	__u8 port_num;
+	__u8 reserved;
+};
+
+struct ib_uverbs_poll_cq_resp {
+	__u32 count;
+	__u32 reserved;
+	struct ib_uverbs_wc wc[0];
+};
+
+struct ib_uverbs_req_notify_cq {
+	__u32 cq_handle;
+	__u32 solicited_only;
+};
+
+struct ib_uverbs_destroy_cq {
+	__u64 response;
+	__u32 cq_handle;
+	__u32 reserved;
+};
+
+struct ib_uverbs_destroy_cq_resp {
+	__u32 comp_events_reported;
+	__u32 async_events_reported;
+};
+
+struct ib_uverbs_global_route {
+	__u8  dgid[16];
+	__u32 flow_label;
+	__u8  sgid_index;
+	__u8  hop_limit;
+	__u8  traffic_class;
+	__u8  reserved;
+};
+
+struct ib_uverbs_ah_attr {
+	struct ib_uverbs_global_route grh;
+	__u16 dlid;
+	__u8  sl;
+	__u8  src_path_bits;
+	__u8  static_rate;
+	__u8  is_global;
+	__u8  port_num;
+	__u8  reserved;
+};
+
+struct ib_uverbs_qp_attr {
+	__u32	qp_attr_mask;
+	__u32	qp_state;
+	__u32	cur_qp_state;
+	__u32	path_mtu;
+	__u32	path_mig_state;
+	__u32	qkey;
+	__u32	rq_psn;
+	__u32	sq_psn;
+	__u32	dest_qp_num;
+	__u32	qp_access_flags;
+
+	struct ib_uverbs_ah_attr ah_attr;
+	struct ib_uverbs_ah_attr alt_ah_attr;
+
+	/* ib_qp_cap */
+	__u32	max_send_wr;
+	__u32	max_recv_wr;
+	__u32	max_send_sge;
+	__u32	max_recv_sge;
+	__u32	max_inline_data;
+
+	__u16	pkey_index;
+	__u16	alt_pkey_index;
+	__u8	en_sqd_async_notify;
+	__u8	sq_draining;
+	__u8	max_rd_atomic;
+	__u8	max_dest_rd_atomic;
+	__u8	min_rnr_timer;
+	__u8	port_num;
+	__u8	timeout;
+	__u8	retry_cnt;
+	__u8	rnr_retry;
+	__u8	alt_port_num;
+	__u8	alt_timeout;
+	__u8	reserved[5];
+};
+
+struct ib_uverbs_create_qp {
+	__u64 response;
+	__u64 user_handle;
+	__u32 pd_handle;
+	__u32 send_cq_handle;
+	__u32 recv_cq_handle;
+	__u32 srq_handle;
+	__u32 max_send_wr;
+	__u32 max_recv_wr;
+	__u32 max_send_sge;
+	__u32 max_recv_sge;
+	__u32 max_inline_data;
+	__u8  sq_sig_all;
+	__u8  qp_type;
+	__u8  is_srq;
+	__u8  reserved;
+	__u64 driver_data[0];
+};
+
+enum ib_uverbs_create_qp_mask {
+	IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1UL << 0,
+};
+
+enum {
+	IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
+};
+
+enum {
+	/*
+	 * This value is equal to IB_QP_DEST_QPN.
+	 */
+	IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20,
+};
+
+enum {
+	/*
+	 * This value is equal to IB_QP_RATE_LIMIT.
+	 */
+	IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25,
+};
+
+struct ib_uverbs_ex_create_qp {
+	__u64 user_handle;
+	__u32 pd_handle;
+	__u32 send_cq_handle;
+	__u32 recv_cq_handle;
+	__u32 srq_handle;
+	__u32 max_send_wr;
+	__u32 max_recv_wr;
+	__u32 max_send_sge;
+	__u32 max_recv_sge;
+	__u32 max_inline_data;
+	__u8  sq_sig_all;
+	__u8  qp_type;
+	__u8  is_srq;
+	__u8 reserved;
+	__u32 comp_mask;
+	__u32 create_flags;
+	__u32 rwq_ind_tbl_handle;
+	__u32  source_qpn;
+};
+
+struct ib_uverbs_open_qp {
+	__u64 response;
+	__u64 user_handle;
+	__u32 pd_handle;
+	__u32 qpn;
+	__u8  qp_type;
+	__u8  reserved[7];
+	__u64 driver_data[0];
+};
+
+/* also used for open response */
+struct ib_uverbs_create_qp_resp {
+	__u32 qp_handle;
+	__u32 qpn;
+	__u32 max_send_wr;
+	__u32 max_recv_wr;
+	__u32 max_send_sge;
+	__u32 max_recv_sge;
+	__u32 max_inline_data;
+	__u32 reserved;
+};
+
+struct ib_uverbs_ex_create_qp_resp {
+	struct ib_uverbs_create_qp_resp base;
+	__u32 comp_mask;
+	__u32 response_length;
+};
+
+/*
+ * This struct needs to remain a multiple of 8 bytes to keep the
+ * alignment of the modify QP parameters.
+ */
+struct ib_uverbs_qp_dest {
+	__u8  dgid[16];
+	__u32 flow_label;
+	__u16 dlid;
+	__u16 reserved;
+	__u8  sgid_index;
+	__u8  hop_limit;
+	__u8  traffic_class;
+	__u8  sl;
+	__u8  src_path_bits;
+	__u8  static_rate;
+	__u8  is_global;
+	__u8  port_num;
+};
+
+struct ib_uverbs_query_qp {
+	__u64 response;
+	__u32 qp_handle;
+	__u32 attr_mask;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_query_qp_resp {
+	struct ib_uverbs_qp_dest dest;
+	struct ib_uverbs_qp_dest alt_dest;
+	__u32 max_send_wr;
+	__u32 max_recv_wr;
+	__u32 max_send_sge;
+	__u32 max_recv_sge;
+	__u32 max_inline_data;
+	__u32 qkey;
+	__u32 rq_psn;
+	__u32 sq_psn;
+	__u32 dest_qp_num;
+	__u32 qp_access_flags;
+	__u16 pkey_index;
+	__u16 alt_pkey_index;
+	__u8  qp_state;
+	__u8  cur_qp_state;
+	__u8  path_mtu;
+	__u8  path_mig_state;
+	__u8  sq_draining;
+	__u8  max_rd_atomic;
+	__u8  max_dest_rd_atomic;
+	__u8  min_rnr_timer;
+	__u8  port_num;
+	__u8  timeout;
+	__u8  retry_cnt;
+	__u8  rnr_retry;
+	__u8  alt_port_num;
+	__u8  alt_timeout;
+	__u8  sq_sig_all;
+	__u8  reserved[5];
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_modify_qp {
+	struct ib_uverbs_qp_dest dest;
+	struct ib_uverbs_qp_dest alt_dest;
+	__u32 qp_handle;
+	__u32 attr_mask;
+	__u32 qkey;
+	__u32 rq_psn;
+	__u32 sq_psn;
+	__u32 dest_qp_num;
+	__u32 qp_access_flags;
+	__u16 pkey_index;
+	__u16 alt_pkey_index;
+	__u8  qp_state;
+	__u8  cur_qp_state;
+	__u8  path_mtu;
+	__u8  path_mig_state;
+	__u8  en_sqd_async_notify;
+	__u8  max_rd_atomic;
+	__u8  max_dest_rd_atomic;
+	__u8  min_rnr_timer;
+	__u8  port_num;
+	__u8  timeout;
+	__u8  retry_cnt;
+	__u8  rnr_retry;
+	__u8  alt_port_num;
+	__u8  alt_timeout;
+	__u8  reserved[2];
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_ex_modify_qp {
+	struct ib_uverbs_modify_qp base;
+	__u32	rate_limit;
+	__u32	reserved;
+};
+
+struct ib_uverbs_modify_qp_resp {
+};
+
+struct ib_uverbs_ex_modify_qp_resp {
+	__u32  comp_mask;
+	__u32  response_length;
+};
+
+struct ib_uverbs_destroy_qp {
+	__u64 response;
+	__u32 qp_handle;
+	__u32 reserved;
+};
+
+struct ib_uverbs_destroy_qp_resp {
+	__u32 events_reported;
+};
+
+/*
+ * The ib_uverbs_sge structure isn't used anywhere, since we assume
+ * the ib_sge structure is packed the same way on 32-bit and 64-bit
+ * architectures in both kernel and user space.  It's just here to
+ * document the ABI.
+ */
+struct ib_uverbs_sge {
+	__u64 addr;
+	__u32 length;
+	__u32 lkey;
+};
+
+struct ib_uverbs_send_wr {
+	__u64 wr_id;
+	__u32 num_sge;
+	__u32 opcode;
+	__u32 send_flags;
+	union {
+		__u32 imm_data;
+		__u32 invalidate_rkey;
+	} ex;
+	union {
+		struct {
+			__u64 remote_addr;
+			__u32 rkey;
+			__u32 reserved;
+		} rdma;
+		struct {
+			__u64 remote_addr;
+			__u64 compare_add;
+			__u64 swap;
+			__u32 rkey;
+			__u32 reserved;
+		} atomic;
+		struct {
+			__u32 ah;
+			__u32 remote_qpn;
+			__u32 remote_qkey;
+			__u32 reserved;
+		} ud;
+	} wr;
+};
+
+struct ib_uverbs_post_send {
+	__u64 response;
+	__u32 qp_handle;
+	__u32 wr_count;
+	__u32 sge_count;
+	__u32 wqe_size;
+	struct ib_uverbs_send_wr send_wr[0];
+};
+
+struct ib_uverbs_post_send_resp {
+	__u32 bad_wr;
+};
+
+struct ib_uverbs_recv_wr {
+	__u64 wr_id;
+	__u32 num_sge;
+	__u32 reserved;
+};
+
+struct ib_uverbs_post_recv {
+	__u64 response;
+	__u32 qp_handle;
+	__u32 wr_count;
+	__u32 sge_count;
+	__u32 wqe_size;
+	struct ib_uverbs_recv_wr recv_wr[0];
+};
+
+struct ib_uverbs_post_recv_resp {
+	__u32 bad_wr;
+};
+
+struct ib_uverbs_post_srq_recv {
+	__u64 response;
+	__u32 srq_handle;
+	__u32 wr_count;
+	__u32 sge_count;
+	__u32 wqe_size;
+	struct ib_uverbs_recv_wr recv[0];
+};
+
+struct ib_uverbs_post_srq_recv_resp {
+	__u32 bad_wr;
+};
+
+struct ib_uverbs_create_ah {
+	__u64 response;
+	__u64 user_handle;
+	__u32 pd_handle;
+	__u32 reserved;
+	struct ib_uverbs_ah_attr attr;
+};
+
+struct ib_uverbs_create_ah_resp {
+	__u32 ah_handle;
+};
+
+struct ib_uverbs_destroy_ah {
+	__u32 ah_handle;
+};
+
+struct ib_uverbs_attach_mcast {
+	__u8  gid[16];
+	__u32 qp_handle;
+	__u16 mlid;
+	__u16 reserved;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_detach_mcast {
+	__u8  gid[16];
+	__u32 qp_handle;
+	__u16 mlid;
+	__u16 reserved;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_flow_spec_hdr {
+	__u32 type;
+	__u16 size;
+	__u16 reserved;
+	/* followed by flow_spec */
+	__u64 flow_spec_data[0];
+};
+
+struct ib_uverbs_flow_eth_filter {
+	__u8  dst_mac[6];
+	__u8  src_mac[6];
+	__be16 ether_type;
+	__be16 vlan_tag;
+};
+
+struct ib_uverbs_flow_spec_eth {
+	union {
+		struct ib_uverbs_flow_spec_hdr hdr;
+		struct {
+			__u32 type;
+			__u16 size;
+			__u16 reserved;
+		};
+	};
+	struct ib_uverbs_flow_eth_filter val;
+	struct ib_uverbs_flow_eth_filter mask;
+};
+
+struct ib_uverbs_flow_ipv4_filter {
+	__be32 src_ip;
+	__be32 dst_ip;
+	__u8	proto;
+	__u8	tos;
+	__u8	ttl;
+	__u8	flags;
+};
+
+struct ib_uverbs_flow_spec_ipv4 {
+	union {
+		struct ib_uverbs_flow_spec_hdr hdr;
+		struct {
+			__u32 type;
+			__u16 size;
+			__u16 reserved;
+		};
+	};
+	struct ib_uverbs_flow_ipv4_filter val;
+	struct ib_uverbs_flow_ipv4_filter mask;
+};
+
+struct ib_uverbs_flow_tcp_udp_filter {
+	__be16 dst_port;
+	__be16 src_port;
+};
+
+struct ib_uverbs_flow_spec_tcp_udp {
+	union {
+		struct ib_uverbs_flow_spec_hdr hdr;
+		struct {
+			__u32 type;
+			__u16 size;
+			__u16 reserved;
+		};
+	};
+	struct ib_uverbs_flow_tcp_udp_filter val;
+	struct ib_uverbs_flow_tcp_udp_filter mask;
+};
+
+struct ib_uverbs_flow_ipv6_filter {
+	__u8    src_ip[16];
+	__u8    dst_ip[16];
+	__be32	flow_label;
+	__u8	next_hdr;
+	__u8	traffic_class;
+	__u8	hop_limit;
+	__u8	reserved;
+};
+
+struct ib_uverbs_flow_spec_ipv6 {
+	union {
+		struct ib_uverbs_flow_spec_hdr hdr;
+		struct {
+			__u32 type;
+			__u16 size;
+			__u16 reserved;
+		};
+	};
+	struct ib_uverbs_flow_ipv6_filter val;
+	struct ib_uverbs_flow_ipv6_filter mask;
+};
+
+struct ib_uverbs_flow_spec_action_tag {
+	union {
+		struct ib_uverbs_flow_spec_hdr hdr;
+		struct {
+			__u32 type;
+			__u16 size;
+			__u16 reserved;
+		};
+	};
+	__u32			      tag_id;
+	__u32			      reserved1;
+};
+
+struct ib_uverbs_flow_spec_action_drop {
+	union {
+		struct ib_uverbs_flow_spec_hdr hdr;
+		struct {
+			__u32 type;
+			__u16 size;
+			__u16 reserved;
+		};
+	};
+};
+
+struct ib_uverbs_flow_tunnel_filter {
+	__be32 tunnel_id;
+};
+
+struct ib_uverbs_flow_spec_tunnel {
+	union {
+		struct ib_uverbs_flow_spec_hdr hdr;
+		struct {
+			__u32 type;
+			__u16 size;
+			__u16 reserved;
+		};
+	};
+	struct ib_uverbs_flow_tunnel_filter val;
+	struct ib_uverbs_flow_tunnel_filter mask;
+};
+
+struct ib_uverbs_flow_attr {
+	__u32 type;
+	__u16 size;
+	__u16 priority;
+	__u8  num_of_specs;
+	__u8  reserved[2];
+	__u8  port;
+	__u32 flags;
+	/* Following are the optional layers according to user request
+	 * struct ib_flow_spec_xxx
+	 * struct ib_flow_spec_yyy
+	 */
+	struct ib_uverbs_flow_spec_hdr flow_specs[0];
+};
+
+struct ib_uverbs_create_flow  {
+	__u32 comp_mask;
+	__u32 qp_handle;
+	struct ib_uverbs_flow_attr flow_attr;
+};
+
+struct ib_uverbs_create_flow_resp {
+	__u32 comp_mask;
+	__u32 flow_handle;
+};
+
+struct ib_uverbs_destroy_flow  {
+	__u32 comp_mask;
+	__u32 flow_handle;
+};
+
+struct ib_uverbs_create_srq {
+	__u64 response;
+	__u64 user_handle;
+	__u32 pd_handle;
+	__u32 max_wr;
+	__u32 max_sge;
+	__u32 srq_limit;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_create_xsrq {
+	__u64 response;
+	__u64 user_handle;
+	__u32 srq_type;
+	__u32 pd_handle;
+	__u32 max_wr;
+	__u32 max_sge;
+	__u32 srq_limit;
+	__u32 max_num_tags;
+	__u32 xrcd_handle;
+	__u32 cq_handle;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_create_srq_resp {
+	__u32 srq_handle;
+	__u32 max_wr;
+	__u32 max_sge;
+	__u32 srqn;
+};
+
+struct ib_uverbs_modify_srq {
+	__u32 srq_handle;
+	__u32 attr_mask;
+	__u32 max_wr;
+	__u32 srq_limit;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_query_srq {
+	__u64 response;
+	__u32 srq_handle;
+	__u32 reserved;
+	__u64 driver_data[0];
+};
+
+struct ib_uverbs_query_srq_resp {
+	__u32 max_wr;
+	__u32 max_sge;
+	__u32 srq_limit;
+	__u32 reserved;
+};
+
+struct ib_uverbs_destroy_srq {
+	__u64 response;
+	__u32 srq_handle;
+	__u32 reserved;
+};
+
+struct ib_uverbs_destroy_srq_resp {
+	__u32 events_reported;
+};
+
+struct ib_uverbs_ex_create_wq  {
+	__u32 comp_mask;
+	__u32 wq_type;
+	__u64 user_handle;
+	__u32 pd_handle;
+	__u32 cq_handle;
+	__u32 max_wr;
+	__u32 max_sge;
+	__u32 create_flags; /* Use enum ib_wq_flags */
+	__u32 reserved;
+};
+
+struct ib_uverbs_ex_create_wq_resp {
+	__u32 comp_mask;
+	__u32 response_length;
+	__u32 wq_handle;
+	__u32 max_wr;
+	__u32 max_sge;
+	__u32 wqn;
+};
+
+struct ib_uverbs_ex_destroy_wq  {
+	__u32 comp_mask;
+	__u32 wq_handle;
+};
+
+struct ib_uverbs_ex_destroy_wq_resp {
+	__u32 comp_mask;
+	__u32 response_length;
+	__u32 events_reported;
+	__u32 reserved;
+};
+
+struct ib_uverbs_ex_modify_wq  {
+	__u32 attr_mask;
+	__u32 wq_handle;
+	__u32 wq_state;
+	__u32 curr_wq_state;
+	__u32 flags; /* Use enum ib_wq_flags */
+	__u32 flags_mask; /* Use enum ib_wq_flags */
+};
+
+/* Prevent memory allocation rather than max expected size */
+#define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE 0x0d
+struct ib_uverbs_ex_create_rwq_ind_table  {
+	__u32 comp_mask;
+	__u32 log_ind_tbl_size;
+	/* Following are the wq handles according to log_ind_tbl_size
+	 * wq_handle1
+	 * wq_handle2
+	 */
+	__u32 wq_handles[0];
+};
+
+struct ib_uverbs_ex_create_rwq_ind_table_resp {
+	__u32 comp_mask;
+	__u32 response_length;
+	__u32 ind_tbl_handle;
+	__u32 ind_tbl_num;
+};
+
+struct ib_uverbs_ex_destroy_rwq_ind_table  {
+	__u32 comp_mask;
+	__u32 ind_tbl_handle;
+};
+
+struct ib_uverbs_cq_moderation {
+	__u16 cq_count;
+	__u16 cq_period;
+};
+
+struct ib_uverbs_ex_modify_cq {
+	__u32 cq_handle;
+	__u32 attr_mask;
+	struct ib_uverbs_cq_moderation attr;
+	__u32 reserved;
+};
+
+#define IB_DEVICE_NAME_MAX 64
+
+#endif /* IB_USER_VERBS_H */
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 02/17] verbs: Include rdma/ib_user_verbs.h in kern-abi.h
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
  2018-01-11 22:13   ` [PATCH rdma-core 01/17] Update rdma/ib_user_verbs.h Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
       [not found]     ` <20180111221340.965-3-jgg-uk2M96/98Pc@public.gmane.org>
  2018-01-11 22:13   ` [PATCH rdma-core 03/17] verbs: Delete extended command definitions from kern-abi.h Jason Gunthorpe
                     ` (15 subsequent siblings)
  17 siblings, 1 reply; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

There are a few overlapping definitions that are identical in both
headers, delete them from kern-abi.h to make them includable.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/kern-abi.h | 62 ++++++---------------------------------------------
 1 file changed, 7 insertions(+), 55 deletions(-)

diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index f53e22fce5303b..d7acdaa9a4bca9 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -37,9 +37,14 @@
 
 #include <linux/types.h>
 
+#include <rdma/ib_user_verbs.h>
+
 /*
- * This file must be kept in sync with the kernel's version of
- * drivers/infiniband/include/ib_user_verbs.h
+ * This file contains copied data from the kernel's include/uapi/rdma/ib_user_verbs.h,
+ * now included above.
+ *
+ * Whenever possible use the definition from the kernel header and avoid
+ * copying from that header into this file.
  */
 
 /*
@@ -48,59 +53,6 @@
 #define IB_USER_VERBS_MIN_ABI_VERSION	3
 #define IB_USER_VERBS_MAX_ABI_VERSION	6
 
-#define IB_USER_VERBS_CMD_THRESHOLD    50
-
-enum {
-	IB_USER_VERBS_CMD_GET_CONTEXT,
-	IB_USER_VERBS_CMD_QUERY_DEVICE,
-	IB_USER_VERBS_CMD_QUERY_PORT,
-	IB_USER_VERBS_CMD_ALLOC_PD,
-	IB_USER_VERBS_CMD_DEALLOC_PD,
-	IB_USER_VERBS_CMD_CREATE_AH,
-	IB_USER_VERBS_CMD_MODIFY_AH,
-	IB_USER_VERBS_CMD_QUERY_AH,
-	IB_USER_VERBS_CMD_DESTROY_AH,
-	IB_USER_VERBS_CMD_REG_MR,
-	IB_USER_VERBS_CMD_REG_SMR,
-	IB_USER_VERBS_CMD_REREG_MR,
-	IB_USER_VERBS_CMD_QUERY_MR,
-	IB_USER_VERBS_CMD_DEREG_MR,
-	IB_USER_VERBS_CMD_ALLOC_MW,
-	IB_USER_VERBS_CMD_BIND_MW,
-	IB_USER_VERBS_CMD_DEALLOC_MW,
-	IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
-	IB_USER_VERBS_CMD_CREATE_CQ,
-	IB_USER_VERBS_CMD_RESIZE_CQ,
-	IB_USER_VERBS_CMD_DESTROY_CQ,
-	IB_USER_VERBS_CMD_POLL_CQ,
-	IB_USER_VERBS_CMD_PEEK_CQ,
-	IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
-	IB_USER_VERBS_CMD_CREATE_QP,
-	IB_USER_VERBS_CMD_QUERY_QP,
-	IB_USER_VERBS_CMD_MODIFY_QP,
-	IB_USER_VERBS_CMD_DESTROY_QP,
-	IB_USER_VERBS_CMD_POST_SEND,
-	IB_USER_VERBS_CMD_POST_RECV,
-	IB_USER_VERBS_CMD_ATTACH_MCAST,
-	IB_USER_VERBS_CMD_DETACH_MCAST,
-	IB_USER_VERBS_CMD_CREATE_SRQ,
-	IB_USER_VERBS_CMD_MODIFY_SRQ,
-	IB_USER_VERBS_CMD_QUERY_SRQ,
-	IB_USER_VERBS_CMD_DESTROY_SRQ,
-	IB_USER_VERBS_CMD_POST_SRQ_RECV,
-	IB_USER_VERBS_CMD_OPEN_XRCD,
-	IB_USER_VERBS_CMD_CLOSE_XRCD,
-	IB_USER_VERBS_CMD_CREATE_XSRQ,
-	IB_USER_VERBS_CMD_OPEN_QP
-};
-
-#define IB_USER_VERBS_CMD_COMMAND_MASK		0xff
-#define IB_USER_VERBS_CMD_FLAGS_MASK		0xff000000u
-#define IB_USER_VERBS_CMD_FLAGS_SHIFT		24
-
-
-#define IB_USER_VERBS_CMD_FLAG_EXTENDED		0x80ul
-
 /* use this mask for creating extended commands */
 #define IB_USER_VERBS_CMD_EXTENDED_MASK \
 	(IB_USER_VERBS_CMD_FLAG_EXTENDED << \
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 03/17] verbs: Delete extended command definitions from kern-abi.h
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
  2018-01-11 22:13   ` [PATCH rdma-core 01/17] Update rdma/ib_user_verbs.h Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 02/17] verbs: Include rdma/ib_user_verbs.h in kern-abi.h Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 04/17] verbs: Remove unused structs Jason Gunthorpe
                     ` (14 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

The kernel definition is not quite the same, the names are slightly
different and the kernel enum does not include the flags bit.

Revise IBV_INIT_CMD_RESP_EX_V to use the kernel name and include the
flag bits.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/cmd.c      |  8 ++++----
 libibverbs/ibverbs.h  | 10 +++++++++-
 libibverbs/kern-abi.h | 26 --------------------------
 3 files changed, 13 insertions(+), 31 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index bcec94f5b0ce72..fc58de768d0011 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -156,7 +156,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 		return EINVAL;
 
 	IBV_INIT_CMD_RESP_EX_V(cmd, cmd_core_size, cmd_size,
-			       QUERY_DEVICE_EX, resp, resp_core_size,
+			       QUERY_DEVICE, resp, resp_core_size,
 			       resp_size);
 	cmd->comp_mask = 0;
 	cmd->reserved = 0;
@@ -527,7 +527,7 @@ int ibv_cmd_create_cq_ex(struct ibv_context *context,
 	int err;
 
 	memset(cmd, 0, cmd_core_size);
-	IBV_INIT_CMD_RESP_EX_V(cmd, cmd_core_size, cmd_size, CREATE_CQ_EX, resp,
+	IBV_INIT_CMD_RESP_EX_V(cmd, cmd_core_size, cmd_size, CREATE_CQ, resp,
 			       resp_core_size, resp_size);
 
 	if (cq_attr->comp_mask & ~(IBV_CQ_INIT_ATTR_MASK_RESERVED - 1))
@@ -993,7 +993,7 @@ int ibv_cmd_create_qp_ex2(struct ibv_context *context,
 
 	memset(cmd, 0, cmd_core_size);
 
-	IBV_INIT_CMD_RESP_EX_V(cmd, cmd_core_size, cmd_size, CREATE_QP_EX, resp,
+	IBV_INIT_CMD_RESP_EX_V(cmd, cmd_core_size, cmd_size, CREATE_QP, resp,
 			       resp_core_size, resp_size);
 
 	err = create_qp_ex_common(qp, qp_attr, vxrcd, &cmd->base);
@@ -1389,7 +1389,7 @@ int ibv_cmd_modify_qp_ex(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 			     response_length) + sizeof(resp->response_length))
 		return EINVAL;
 
-	IBV_INIT_CMD_RESP_EX_V(cmd, cmd_core_size, cmd_size, MODIFY_QP_EX,
+	IBV_INIT_CMD_RESP_EX_V(cmd, cmd_core_size, cmd_size, MODIFY_QP,
 			       resp, resp_core_size, resp_size);
 
 	copy_modify_qp_fields(qp, attr, attr_mask, &cmd->base);
diff --git a/libibverbs/ibverbs.h b/libibverbs/ibverbs.h
index 2da44967c4f1c0..97d3a4b8dbab91 100644
--- a/libibverbs/ibverbs.h
+++ b/libibverbs/ibverbs.h
@@ -83,12 +83,20 @@ struct verbs_ex_private {
 		(cmd)->response  = (uintptr_t) (out);			\
 	} while (0)
 
+static inline uint32_t _cmd_ex(uint32_t cmd)
+{
+	return (IB_USER_VERBS_CMD_FLAG_EXTENDED
+		<< IB_USER_VERBS_CMD_FLAGS_SHIFT) |
+	       cmd;
+}
+
 #define IBV_INIT_CMD_RESP_EX_V(cmd, cmd_size, size, opcode, out, resp_size,\
 		outsize)						   \
 	do {                                                               \
 		size_t c_size = cmd_size - sizeof(struct ex_hdr);	   \
 		if (abi_ver > 2)					   \
-			(cmd)->hdr.command = IB_USER_VERBS_CMD_##opcode;   \
+			(cmd)->hdr.command =				   \
+				_cmd_ex(IB_USER_VERBS_EX_CMD_##opcode);    \
 		else							   \
 			(cmd)->hdr.command =				   \
 				IB_USER_VERBS_CMD_##opcode##_V2;	   \
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index d7acdaa9a4bca9..f67ddb10548880 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -53,32 +53,6 @@
 #define IB_USER_VERBS_MIN_ABI_VERSION	3
 #define IB_USER_VERBS_MAX_ABI_VERSION	6
 
-/* use this mask for creating extended commands */
-#define IB_USER_VERBS_CMD_EXTENDED_MASK \
-	(IB_USER_VERBS_CMD_FLAG_EXTENDED << \
-	 IB_USER_VERBS_CMD_FLAGS_SHIFT)
-
-
-enum {
-	IB_USER_VERBS_CMD_QUERY_DEVICE_EX = IB_USER_VERBS_CMD_EXTENDED_MASK |
-					    IB_USER_VERBS_CMD_QUERY_DEVICE,
-	IB_USER_VERBS_CMD_CREATE_QP_EX = IB_USER_VERBS_CMD_EXTENDED_MASK |
-					 IB_USER_VERBS_CMD_CREATE_QP,
-	IB_USER_VERBS_CMD_CREATE_CQ_EX = IB_USER_VERBS_CMD_EXTENDED_MASK |
-						IB_USER_VERBS_CMD_CREATE_CQ,
-	IB_USER_VERBS_CMD_MODIFY_QP_EX = IB_USER_VERBS_CMD_EXTENDED_MASK |
-						IB_USER_VERBS_CMD_MODIFY_QP,
-	IB_USER_VERBS_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_EXTENDED_MASK +
-					IB_USER_VERBS_CMD_THRESHOLD,
-	IB_USER_VERBS_CMD_DESTROY_FLOW,
-	IB_USER_VERBS_CMD_CREATE_WQ,
-	IB_USER_VERBS_CMD_MODIFY_WQ,
-	IB_USER_VERBS_CMD_DESTROY_WQ,
-	IB_USER_VERBS_CMD_CREATE_RWQ_IND_TBL,
-	IB_USER_VERBS_CMD_DESTROY_RWQ_IND_TBL,
-	IB_USER_VERBS_CMD_MODIFY_CQ,
-};
-
 /*
  * Make sure that all structs defined in this file remain laid out so
  * that they pack the same way on 32-bit and 64-bit architectures (to
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 04/17] verbs: Remove unused structs
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (2 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 03/17] verbs: Delete extended command definitions from kern-abi.h Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 05/17] verbs: Remove kernel ABI v2 compat cruft Jason Gunthorpe
                     ` (13 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Some of these structs are renamed duplicates from the kernel header, others
are just perplexing. In any case we don't use them in rdma-core

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/kern-abi.h | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index f67ddb10548880..92d750e1d26b09 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -64,16 +64,6 @@
  *    different between 32-bit and 64-bit architectures.
  */
 
-struct hdr {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
-};
-
-struct response_hdr {
-	__u64 response;
-};
-
 struct ex_hdr {
 	struct {
 		__u32 command;
@@ -108,17 +98,6 @@ struct ibv_comp_event {
  * the rest of the command struct based on these value.
  */
 
-struct ibv_query_params {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
-	__u64 response;
-};
-
-struct ibv_query_params_resp {
-	__u32 num_cq_events;
-};
-
 struct ibv_get_context {
 	__u32 command;
 	__u16 in_words;
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 05/17] verbs: Remove kernel ABI v2 compat cruft
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (3 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 04/17] verbs: Remove unused structs Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 06/17] verbs: Add missing endian annotations to kern-abi.h Jason Gunthorpe
                     ` (12 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

When verbs extensions were introduced the minimum ABI version was
changed to v3 and abi_ver <= 2 was no longer possible.

Remove everything to do with this support since it hasn't even
been runnable for 5 years.

Fixes: 6be16586e081 ("Infrastructure to support verbs extensions")
Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/cmd.c      |  3 ---
 libibverbs/ibverbs.h  | 18 +++-----------
 libibverbs/kern-abi.h | 67 ---------------------------------------------------
 libibverbs/verbs.c    | 33 -------------------------
 4 files changed, 4 insertions(+), 117 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index fc58de768d0011..fbd87d475a2751 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -48,9 +48,6 @@ int ibv_cmd_get_context(struct verbs_context *context_ex,
 			struct ibv_get_context *cmd, size_t cmd_size,
 			struct ibv_get_context_resp *resp, size_t resp_size)
 {
-	if (abi_ver < IB_USER_VERBS_MIN_ABI_VERSION)
-		return ENOSYS;
-
 	IBV_INIT_CMD_RESP(cmd, cmd_size, GET_CONTEXT, resp, resp_size);
 
 	if (write(context_ex->context.cmd_fd, cmd, cmd_size) != cmd_size)
diff --git a/libibverbs/ibverbs.h b/libibverbs/ibverbs.h
index 97d3a4b8dbab91..7755393fe4f3ce 100644
--- a/libibverbs/ibverbs.h
+++ b/libibverbs/ibverbs.h
@@ -64,20 +64,14 @@ struct verbs_ex_private {
 
 #define IBV_INIT_CMD(cmd, size, opcode)					\
 	do {								\
-		if (abi_ver > 2)					\
-			(cmd)->command = IB_USER_VERBS_CMD_##opcode;	\
-		else							\
-			(cmd)->command = IB_USER_VERBS_CMD_##opcode##_V2; \
+		(cmd)->command = IB_USER_VERBS_CMD_##opcode;		\
 		(cmd)->in_words  = (size) / 4;				\
 		(cmd)->out_words = 0;					\
 	} while (0)
 
 #define IBV_INIT_CMD_RESP(cmd, size, opcode, out, outsize)		\
 	do {								\
-		if (abi_ver > 2)					\
-			(cmd)->command = IB_USER_VERBS_CMD_##opcode;	\
-		else							\
-			(cmd)->command = IB_USER_VERBS_CMD_##opcode##_V2; \
+		(cmd)->command = IB_USER_VERBS_CMD_##opcode;		\
 		(cmd)->in_words  = (size) / 4;				\
 		(cmd)->out_words = (outsize) / 4;			\
 		(cmd)->response  = (uintptr_t) (out);			\
@@ -94,12 +88,8 @@ static inline uint32_t _cmd_ex(uint32_t cmd)
 		outsize)						   \
 	do {                                                               \
 		size_t c_size = cmd_size - sizeof(struct ex_hdr);	   \
-		if (abi_ver > 2)					   \
-			(cmd)->hdr.command =				   \
-				_cmd_ex(IB_USER_VERBS_EX_CMD_##opcode);    \
-		else							   \
-			(cmd)->hdr.command =				   \
-				IB_USER_VERBS_CMD_##opcode##_V2;	   \
+		(cmd)->hdr.command =					   \
+			_cmd_ex(IB_USER_VERBS_EX_CMD_##opcode);		   \
 		(cmd)->hdr.in_words  = ((c_size) / 8);                     \
 		(cmd)->hdr.out_words = ((resp_size) / 8);                  \
 		(cmd)->hdr.provider_in_words   = (((size) - (cmd_size))/8);\
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 92d750e1d26b09..52b6c8f5b3d621 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -1093,73 +1093,6 @@ struct ibv_destroy_srq_resp {
 	__u32 events_reported;
 };
 
-/*
- * Compatibility with older ABI versions
- */
-
-enum {
-	IB_USER_VERBS_CMD_QUERY_PARAMS_V2,
-	IB_USER_VERBS_CMD_GET_CONTEXT_V2,
-	IB_USER_VERBS_CMD_QUERY_DEVICE_V2,
-	IB_USER_VERBS_CMD_QUERY_PORT_V2,
-	IB_USER_VERBS_CMD_QUERY_GID_V2,
-	IB_USER_VERBS_CMD_QUERY_PKEY_V2,
-	IB_USER_VERBS_CMD_ALLOC_PD_V2,
-	IB_USER_VERBS_CMD_DEALLOC_PD_V2,
-	IB_USER_VERBS_CMD_CREATE_AH_V2,
-	IB_USER_VERBS_CMD_MODIFY_AH_V2,
-	IB_USER_VERBS_CMD_QUERY_AH_V2,
-	IB_USER_VERBS_CMD_DESTROY_AH_V2,
-	IB_USER_VERBS_CMD_REG_MR_V2,
-	IB_USER_VERBS_CMD_REG_SMR_V2,
-	IB_USER_VERBS_CMD_REREG_MR_V2,
-	IB_USER_VERBS_CMD_QUERY_MR_V2,
-	IB_USER_VERBS_CMD_DEREG_MR_V2,
-	IB_USER_VERBS_CMD_ALLOC_MW_V2,
-	IB_USER_VERBS_CMD_BIND_MW_V2,
-	IB_USER_VERBS_CMD_DEALLOC_MW_V2,
-	IB_USER_VERBS_CMD_CREATE_CQ_V2,
-	IB_USER_VERBS_CMD_RESIZE_CQ_V2,
-	IB_USER_VERBS_CMD_DESTROY_CQ_V2,
-	IB_USER_VERBS_CMD_POLL_CQ_V2,
-	IB_USER_VERBS_CMD_PEEK_CQ_V2,
-	IB_USER_VERBS_CMD_REQ_NOTIFY_CQ_V2,
-	IB_USER_VERBS_CMD_CREATE_QP_V2,
-	IB_USER_VERBS_CMD_QUERY_QP_V2,
-	IB_USER_VERBS_CMD_MODIFY_QP_V2,
-	IB_USER_VERBS_CMD_DESTROY_QP_V2,
-	IB_USER_VERBS_CMD_POST_SEND_V2,
-	IB_USER_VERBS_CMD_POST_RECV_V2,
-	IB_USER_VERBS_CMD_ATTACH_MCAST_V2,
-	IB_USER_VERBS_CMD_DETACH_MCAST_V2,
-	IB_USER_VERBS_CMD_CREATE_SRQ_V2,
-	IB_USER_VERBS_CMD_MODIFY_SRQ_V2,
-	IB_USER_VERBS_CMD_QUERY_SRQ_V2,
-	IB_USER_VERBS_CMD_DESTROY_SRQ_V2,
-	IB_USER_VERBS_CMD_POST_SRQ_RECV_V2,
-	/*
-	 * Set commands that didn't exist to -1 so our compile-time
-	 * trick opcodes in IBV_INIT_CMD() doesn't break.
-	 */
-	IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL_V2 = -1,
-	IB_USER_VERBS_CMD_OPEN_XRCD_V2 = -1,
-	IB_USER_VERBS_CMD_CLOSE_XRCD_V2 = -1,
-	IB_USER_VERBS_CMD_CREATE_XSRQ_V2 = -1,
-	IB_USER_VERBS_CMD_OPEN_QP_V2 = -1,
-	IB_USER_VERBS_CMD_CREATE_FLOW_V2 = -1,
-	IB_USER_VERBS_CMD_DESTROY_FLOW_V2 = -1,
-	IB_USER_VERBS_CMD_QUERY_DEVICE_EX_V2 = -1,
-	IB_USER_VERBS_CMD_CREATE_QP_EX_V2 = -1,
-	IB_USER_VERBS_CMD_CREATE_CQ_EX_V2 = -1,
-	IB_USER_VERBS_CMD_CREATE_WQ_V2 = -1,
-	IB_USER_VERBS_CMD_MODIFY_WQ_V2 = -1,
-	IB_USER_VERBS_CMD_DESTROY_WQ_V2 = -1,
-	IB_USER_VERBS_CMD_CREATE_RWQ_IND_TBL_V2 = -1,
-	IB_USER_VERBS_CMD_DESTROY_RWQ_IND_TBL_V2 = -1,
-	IB_USER_VERBS_CMD_MODIFY_QP_EX_V2 = -1,
-	IB_USER_VERBS_CMD_MODIFY_CQ_V2 = -1,
-};
-
 struct ibv_modify_srq_v3 {
 	__u32 command;
 	__u16 in_words;
diff --git a/libibverbs/verbs.c b/libibverbs/verbs.c
index c772335e06d71a..4b2696e2aac020 100644
--- a/libibverbs/verbs.c
+++ b/libibverbs/verbs.c
@@ -315,33 +315,12 @@ LATEST_SYMVER_FUNC(ibv_dereg_mr, 1_1, "IBVERBS_1.1",
 	return ret;
 }
 
-static struct ibv_comp_channel *ibv_create_comp_channel_v2(struct ibv_context *context)
-{
-	struct ibv_abi_compat_v2 *t = context->abi_compat;
-	static int warned;
-
-	if (!pthread_mutex_trylock(&t->in_use))
-		return &t->channel;
-
-	if (!warned) {
-		fprintf(stderr, PFX "Warning: kernel's ABI version %d limits capacity.\n"
-			"    Only one completion channel can be created per context.\n",
-			abi_ver);
-		++warned;
-	}
-
-	return NULL;
-}
-
 struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context *context)
 {
 	struct ibv_comp_channel            *channel;
 	struct ibv_create_comp_channel      cmd;
 	struct ibv_create_comp_channel_resp resp;
 
-	if (abi_ver <= 2)
-		return ibv_create_comp_channel_v2(context);
-
 	channel = malloc(sizeof *channel);
 	if (!channel)
 		return NULL;
@@ -361,13 +340,6 @@ struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context *context)
 	return channel;
 }
 
-static int ibv_destroy_comp_channel_v2(struct ibv_comp_channel *channel)
-{
-	struct ibv_abi_compat_v2 *t = (struct ibv_abi_compat_v2 *) channel;
-	pthread_mutex_unlock(&t->in_use);
-	return 0;
-}
-
 int ibv_destroy_comp_channel(struct ibv_comp_channel *channel)
 {
 	struct ibv_context *context;
@@ -381,11 +353,6 @@ int ibv_destroy_comp_channel(struct ibv_comp_channel *channel)
 		goto out;
 	}
 
-	if (abi_ver <= 2) {
-		ret = ibv_destroy_comp_channel_v2(channel);
-		goto out;
-	}
-
 	close(channel->fd);
 	free(channel);
 	ret = 0;
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 06/17] verbs: Add missing endian annotations to kern-abi.h
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (4 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 05/17] verbs: Remove kernel ABI v2 compat cruft Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 07/17] verbs: Use kernel uapi names for identical structs Jason Gunthorpe
                     ` (11 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Copied from the kernel headers.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/kern-abi.h | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 52b6c8f5b3d621..e4bca3aea4f906 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -768,8 +768,8 @@ struct ibv_kern_send_wr {
 struct ibv_kern_eth_filter {
 	__u8  dst_mac[6];
 	__u8  src_mac[6];
-	__u16  ether_type;
-	__u16  vlan_tag;
+	__be16  ether_type;
+	__be16  vlan_tag;
 };
 
 struct ibv_kern_spec_eth {
@@ -794,8 +794,8 @@ struct ibv_kern_spec_ipv4 {
 };
 
 struct ibv_kern_ipv4_ext_filter {
-	__u32 src_ip;
-	__u32 dst_ip;
+	__be32 src_ip;
+	__be32 dst_ip;
 	__u8  proto;
 	__u8  tos;
 	__u8  ttl;
@@ -813,7 +813,7 @@ struct ibv_kern_spec_ipv4_ext {
 struct ibv_kern_ipv6_filter {
 	__u8  src_ip[16];
 	__u8  dst_ip[16];
-	__u32 flow_label;
+	__be32 flow_label;
 	__u8  next_hdr;
 	__u8  traffic_class;
 	__u8  hop_limit;
@@ -829,8 +829,8 @@ struct ibv_kern_spec_ipv6 {
 };
 
 struct ibv_kern_tcp_udp_filter {
-	__u16 dst_port;
-	__u16 src_port;
+	__be16 dst_port;
+	__be16 src_port;
 };
 
 struct ibv_kern_spec_tcp_udp {
@@ -850,7 +850,7 @@ struct ibv_kern_spec_action_tag {
 };
 
 struct ibv_kern_tunnel_filter {
-	__u32 tunnel_id;
+	__be32 tunnel_id;
 };
 
 struct ibv_kern_spec_tunnel {
@@ -897,6 +897,7 @@ struct ibv_kern_flow_attr {
 	 * struct ibv_kern_flow_spec_xxx
 	 * struct ibv_kern_flow_spec_yyy
 	 */
+	struct ib_uverbs_flow_spec_hdr flow_specs[0];
 };
 
 struct ibv_post_send {
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 07/17] verbs: Use kernel uapi names for identical structs
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (5 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 06/17] verbs: Add missing endian annotations to kern-abi.h Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
       [not found]     ` <20180111221340.965-8-jgg-uk2M96/98Pc@public.gmane.org>
  2018-01-11 22:13   ` [PATCH rdma-core 08/17] verbs: Use kernel uapi header for ibv_cq_moderation_caps_resp Jason Gunthorpe
                     ` (10 subsequent siblings)
  17 siblings, 1 reply; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

And delete the duplicates from kern-abi.h

A script was made to find the trivially duplicate structs, which
produced this sed script:

$ sed -i \
 -e 's/struct[ \t]ibv_alloc_mw_resp\([ \t,]\)/struct ib_uverbs_alloc_mw_resp\1/g' \
 -e 's/struct[ \t]ibv_alloc_pd_resp\([ \t,]\)/struct ib_uverbs_alloc_pd_resp\1/g' \
 -e 's/struct[ \t]ibv_comp_event\([ \t,]\)/struct ib_uverbs_comp_event_desc\1/g' \
 -e 's/struct[ \t]ibv_create_comp_channel_resp\([ \t,]\)/struct ib_uverbs_create_comp_channel_resp\1/g' \
 -e 's/struct[ \t]ibv_create_cq_resp\([ \t,]\)/struct ib_uverbs_create_cq_resp\1/g' \
 -e 's/struct[ \t]ibv_create_cq_resp_ex\([ \t,]\)/struct ib_uverbs_ex_create_cq_resp\1/g' \
 -e 's/struct[ \t]ibv_create_flow_resp\([ \t,]\)/struct ib_uverbs_destroy_flow \1/g' \
 -e 's/struct[ \t]ibv_create_qp_resp\([ \t,]\)/struct ib_uverbs_create_qp_resp\1/g' \
 -e 's/struct[ \t]ibv_create_qp_resp_ex\([ \t,]\)/struct ib_uverbs_ex_create_qp_resp\1/g' \
 -e 's/struct[ \t]ibv_create_rwq_ind_table_resp\([ \t,]\)/struct ib_uverbs_ex_create_rwq_ind_table_resp\1/g' \
 -e 's/struct[ \t]ibv_create_srq_resp\([ \t,]\)/struct ib_uverbs_create_srq_resp\1/g' \
 -e 's/struct[ \t]ibv_create_wq_resp\([ \t,]\)/struct ib_uverbs_ex_create_wq_resp\1/g' \
 -e 's/struct[ \t]ibv_destroy_cq_resp\([ \t,]\)/struct ib_uverbs_destroy_cq_resp\1/g' \
 -e 's/struct[ \t]ibv_destroy_qp_resp\([ \t,]\)/struct ib_uverbs_destroy_qp_resp\1/g' \
 -e 's/struct[ \t]ibv_destroy_srq_resp\([ \t,]\)/struct ib_uverbs_destroy_qp_resp\1/g' \
 -e 's/struct[ \t]ibv_destroy_wq_resp\([ \t,]\)/struct ib_uverbs_ex_destroy_wq_resp\1/g' \
 -e 's/struct[ \t]ibv_get_context_resp\([ \t,]\)/struct ib_uverbs_get_context_resp\1/g' \
 -e 's/struct[ \t]ibv_kern_ah_attr\([ \t,]\)/struct ib_uverbs_ah_attr\1/g' \
 -e 's/struct[ \t]ibv_kern_async_event\([ \t,]\)/struct ib_uverbs_async_event_desc\1/g' \
 -e 's/struct[ \t]ibv_kern_eth_filter\([ \t,]\)/struct ib_uverbs_flow_eth_filter\1/g' \
 -e 's/struct[ \t]ibv_kern_flow_attr\([ \t,]\)/struct ib_uverbs_flow_attr\1/g' \
 -e 's/struct[ \t]ibv_kern_global_route\([ \t,]\)/struct ib_uverbs_global_route\1/g' \
 -e 's/struct[ \t]ibv_kern_ipv4_ext_filter\([ \t,]\)/struct ib_uverbs_flow_ipv4_filter\1/g' \
 -e 's/struct[ \t]ibv_kern_ipv6_filter\([ \t,]\)/struct ib_uverbs_flow_ipv6_filter\1/g' \
 -e 's/struct[ \t]ibv_kern_modify_cq_attr\([ \t,]\)/struct ib_uverbs_cq_moderation\1/g' \
 -e 's/struct[ \t]ibv_kern_qp_attr\([ \t,]\)/struct ib_uverbs_qp_attr\1/g' \
 -e 's/struct[ \t]ibv_kern_recv_wr\([ \t,]\)/struct ib_uverbs_recv_wr\1/g' \
 -e 's/struct[ \t]ibv_kern_tcp_udp_filter\([ \t,]\)/struct ib_uverbs_flow_tcp_udp_filter\1/g' \
 -e 's/struct[ \t]ibv_kern_tunnel_filter\([ \t,]\)/struct ib_uverbs_flow_tunnel_filter\1/g' \
 -e 's/struct[ \t]ibv_modify_qp_resp_ex\([ \t,]\)/struct ib_uverbs_ex_modify_qp_resp\1/g' \
 -e 's/struct[ \t]ibv_odp_caps_resp\([ \t,]\)/struct ib_uverbs_odp_caps\1/g' \
 -e 's/struct[ \t]ibv_open_xrcd_resp\([ \t,]\)/struct ib_uverbs_close_xrcd\1/g' \
 -e 's/struct[ \t]ibv_post_recv_resp\([ \t,]\)/struct ib_uverbs_post_send_resp\1/g' \
 -e 's/struct[ \t]ibv_post_send_resp\([ \t,]\)/struct ib_uverbs_post_send_resp\1/g' \
 -e 's/struct[ \t]ibv_post_srq_recv_resp\([ \t,]\)/struct ib_uverbs_post_recv_resp\1/g' \
 -e 's/struct[ \t]ibv_qp_dest\([ \t,]\)/struct ib_uverbs_qp_dest\1/g' \
 -e 's/struct[ \t]ibv_query_device_resp\([ \t,]\)/struct ib_uverbs_query_device_resp\1/g' \
 -e 's/struct[ \t]ibv_query_port_resp\([ \t,]\)/struct ib_uverbs_query_port_resp\1/g' \
 -e 's/struct[ \t]ibv_query_qp_resp\([ \t,]\)/struct ib_uverbs_query_qp_resp\1/g' \
 -e 's/struct[ \t]ibv_query_srq_resp\([ \t,]\)/struct ib_uverbs_query_srq_resp\1/g' \
 -e 's/struct[ \t]ibv_reg_mr_resp\([ \t,]\)/struct ib_uverbs_reg_mr_resp\1/g' \
 -e 's/struct[ \t]ibv_rereg_mr_resp\([ \t,]\)/struct ib_uverbs_rereg_mr_resp\1/g' \
 -e 's/struct[ \t]ibv_resize_cq_resp\([ \t,]\)/struct ib_uverbs_resize_cq_resp\1/g' \
 -e 's/struct[ \t]ibv_rss_caps_resp\([ \t,]\)/struct ib_uverbs_rss_caps\1/g' \
 -e 's/struct[ \t]ibv_tm_caps_resp\([ \t,]\)/struct ib_uverbs_tm_caps\1/g' \
 `git ls-files`

Followed by hand checking and removing the changed structs from
kern-abi.h and fixing the trivial residual compiler errors.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibcm/cm.c                          |   2 +-
 libibverbs/cmd.c                      |  82 +++---
 libibverbs/device.c                   |   2 +-
 libibverbs/driver.h                   |  36 +--
 libibverbs/kern-abi.h                 | 453 ++--------------------------------
 libibverbs/marshall.c                 |   4 +-
 libibverbs/marshall.h                 |   4 +-
 libibverbs/verbs.c                    |   4 +-
 librdmacm/cma.c                       |   2 +-
 librdmacm/rdma_cma_abi.h              |   2 +-
 providers/bnxt_re/bnxt_re-abi.h       |  10 +-
 providers/cxgb3/iwch-abi.h            |  12 +-
 providers/cxgb4/cxgb4-abi.h           |  10 +-
 providers/cxgb4/verbs.c               |   4 +-
 providers/hfi1verbs/hfi-abi.h         |  10 +-
 providers/hfi1verbs/hfiverbs.c        |   2 +-
 providers/hfi1verbs/verbs.c           |  12 +-
 providers/hns/hns_roce_u_abi.h        |   6 +-
 providers/hns/hns_roce_u_verbs.c      |   6 +-
 providers/i40iw/i40iw-abi.h           |   8 +-
 providers/i40iw/i40iw_uverbs.c        |   6 +-
 providers/ipathverbs/ipath-abi.h      |  10 +-
 providers/ipathverbs/ipathverbs.c     |   2 +-
 providers/ipathverbs/verbs.c          |  12 +-
 providers/mlx4/mlx4-abi.h             |  14 +-
 providers/mlx4/verbs.c                |  18 +-
 providers/mlx5/mlx5-abi.h             |  18 +-
 providers/mlx5/verbs.c                |  10 +-
 providers/mthca/mthca-abi.h           |   8 +-
 providers/mthca/verbs.c               |   6 +-
 providers/nes/nes-abi.h               |   8 +-
 providers/nes/nes_uverbs.c            |   6 +-
 providers/ocrdma/ocrdma_abi.h         |  12 +-
 providers/ocrdma/ocrdma_verbs.c       |   2 +-
 providers/qedr/qelr_abi.h             |  10 +-
 providers/rxe/rxe-abi.h               |  10 +-
 providers/rxe/rxe.c                   |   8 +-
 providers/vmw_pvrdma/pvrdma-abi-fix.h |   8 +-
 providers/vmw_pvrdma/qp.c             |   4 +-
 providers/vmw_pvrdma/verbs.c          |   2 +-
 40 files changed, 217 insertions(+), 628 deletions(-)

diff --git a/libibcm/cm.c b/libibcm/cm.c
index 4fd3fdd6510a2f..ec9252673bdb5b 100644
--- a/libibcm/cm.c
+++ b/libibcm/cm.c
@@ -335,7 +335,7 @@ int ib_cm_init_qp_attr(struct ib_cm_id *cm_id,
 		       struct ibv_qp_attr *qp_attr,
 		       int *qp_attr_mask)
 {
-	struct ibv_kern_qp_attr *resp;
+	struct ib_uverbs_qp_attr *resp;
 	struct ib_ucm_init_qp_attr *cmd;
 	void *msg;
 	int result;
diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index fbd87d475a2751..a675bfb7d02fd3 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -46,7 +46,7 @@
 
 int ibv_cmd_get_context(struct verbs_context *context_ex,
 			struct ibv_get_context *cmd, size_t cmd_size,
-			struct ibv_get_context_resp *resp, size_t resp_size)
+			struct ib_uverbs_get_context_resp *resp, size_t resp_size)
 {
 	IBV_INIT_CMD_RESP(cmd, cmd_size, GET_CONTEXT, resp, resp_size);
 
@@ -62,7 +62,7 @@ int ibv_cmd_get_context(struct verbs_context *context_ex,
 }
 
 static void copy_query_dev_fields(struct ibv_device_attr *device_attr,
-				  struct ibv_query_device_resp *resp,
+				  struct ib_uverbs_query_device_resp *resp,
 				  uint64_t *raw_fw_ver)
 {
 	*raw_fw_ver				= resp->fw_ver;
@@ -112,7 +112,7 @@ int ibv_cmd_query_device(struct ibv_context *context,
 			 uint64_t *raw_fw_ver,
 			 struct ibv_query_device *cmd, size_t cmd_size)
 {
-	struct ibv_query_device_resp resp;
+	struct ib_uverbs_query_device_resp resp;
 
 	IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_DEVICE, &resp, sizeof resp);
 
@@ -269,7 +269,7 @@ int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num,
 		       struct ibv_port_attr *port_attr,
 		       struct ibv_query_port *cmd, size_t cmd_size)
 {
-	struct ibv_query_port_resp resp;
+	struct ib_uverbs_query_port_resp resp;
 
 	IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_PORT, &resp, sizeof resp);
 	cmd->port_num = port_num;
@@ -306,7 +306,7 @@ int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num,
 
 int ibv_cmd_alloc_pd(struct ibv_context *context, struct ibv_pd *pd,
 		     struct ibv_alloc_pd *cmd, size_t cmd_size,
-		     struct ibv_alloc_pd_resp *resp, size_t resp_size)
+		     struct ib_uverbs_alloc_pd_resp *resp, size_t resp_size)
 {
 	IBV_INIT_CMD_RESP(cmd, cmd_size, ALLOC_PD, resp, resp_size);
 
@@ -338,7 +338,7 @@ int ibv_cmd_open_xrcd(struct ibv_context *context, struct verbs_xrcd *xrcd,
 		      int vxrcd_size,
 		      struct ibv_xrcd_init_attr *attr,
 		      struct ibv_open_xrcd *cmd, size_t cmd_size,
-		      struct ibv_open_xrcd_resp *resp, size_t resp_size)
+		      struct ib_uverbs_close_xrcd *resp, size_t resp_size)
 {
 	IBV_INIT_CMD_RESP(cmd, cmd_size, OPEN_XRCD, resp, resp_size);
 
@@ -383,7 +383,7 @@ int ibv_cmd_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 		   uint64_t hca_va, int access,
 		   struct ibv_mr *mr, struct ibv_reg_mr *cmd,
 		   size_t cmd_size,
-		   struct ibv_reg_mr_resp *resp, size_t resp_size)
+		   struct ib_uverbs_reg_mr_resp *resp, size_t resp_size)
 {
 
 	IBV_INIT_CMD_RESP(cmd, cmd_size, REG_MR, resp, resp_size);
@@ -410,7 +410,7 @@ int ibv_cmd_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 int ibv_cmd_rereg_mr(struct ibv_mr *mr, uint32_t flags, void *addr,
 		     size_t length, uint64_t hca_va, int access,
 		     struct ibv_pd *pd, struct ibv_rereg_mr *cmd,
-		     size_t cmd_sz, struct ibv_rereg_mr_resp *resp,
+		     size_t cmd_sz, struct ib_uverbs_rereg_mr_resp *resp,
 		     size_t resp_sz)
 {
 	IBV_INIT_CMD_RESP(cmd, cmd_sz, REREG_MR, resp, resp_sz);
@@ -452,7 +452,7 @@ int ibv_cmd_dereg_mr(struct ibv_mr *mr)
 int ibv_cmd_alloc_mw(struct ibv_pd *pd, enum ibv_mw_type type,
 		     struct ibv_mw *mw, struct ibv_alloc_mw *cmd,
 		     size_t cmd_size,
-		     struct ibv_alloc_mw_resp *resp, size_t resp_size)
+		     struct ib_uverbs_alloc_mw_resp *resp, size_t resp_size)
 {
 	IBV_INIT_CMD_RESP(cmd, cmd_size, ALLOC_MW, resp, resp_size);
 	cmd->pd_handle	= pd->handle;
@@ -490,7 +490,7 @@ int ibv_cmd_create_cq(struct ibv_context *context, int cqe,
 		      struct ibv_comp_channel *channel,
 		      int comp_vector, struct ibv_cq *cq,
 		      struct ibv_create_cq *cmd, size_t cmd_size,
-		      struct ibv_create_cq_resp *resp, size_t resp_size)
+		      struct ib_uverbs_create_cq_resp *resp, size_t resp_size)
 {
 	IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_CQ, resp, resp_size);
 	cmd->user_handle   = (uintptr_t) cq;
@@ -517,7 +517,7 @@ int ibv_cmd_create_cq_ex(struct ibv_context *context,
 			 struct ibv_create_cq_ex *cmd,
 			 size_t cmd_core_size,
 			 size_t cmd_size,
-			 struct ibv_create_cq_resp_ex *resp,
+			 struct ib_uverbs_ex_create_cq_resp *resp,
 			 size_t resp_core_size,
 			 size_t resp_size)
 {
@@ -622,7 +622,7 @@ int ibv_cmd_req_notify_cq(struct ibv_cq *ibcq, int solicited_only)
 
 int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
 		      struct ibv_resize_cq *cmd, size_t cmd_size,
-		      struct ibv_resize_cq_resp *resp, size_t resp_size)
+		      struct ib_uverbs_resize_cq_resp *resp, size_t resp_size)
 {
 	IBV_INIT_CMD_RESP(cmd, cmd_size, RESIZE_CQ, resp, resp_size);
 	cmd->cq_handle = cq->handle;
@@ -641,7 +641,7 @@ int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
 int ibv_cmd_destroy_cq(struct ibv_cq *cq)
 {
 	struct ibv_destroy_cq      cmd;
-	struct ibv_destroy_cq_resp resp;
+	struct ib_uverbs_destroy_cq_resp resp;
 
 	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_CQ, &resp, sizeof resp);
 	cmd.cq_handle = cq->handle;
@@ -664,7 +664,7 @@ int ibv_cmd_destroy_cq(struct ibv_cq *cq)
 int ibv_cmd_create_srq(struct ibv_pd *pd,
 		       struct ibv_srq *srq, struct ibv_srq_init_attr *attr,
 		       struct ibv_create_srq *cmd, size_t cmd_size,
-		       struct ibv_create_srq_resp *resp, size_t resp_size)
+		       struct ib_uverbs_create_srq_resp *resp, size_t resp_size)
 {
 	IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_SRQ, resp, resp_size);
 	cmd->user_handle = (uintptr_t) srq;
@@ -700,7 +700,7 @@ int ibv_cmd_create_srq_ex(struct ibv_context *context,
 			  struct verbs_srq *srq, int vsrq_sz,
 			  struct ibv_srq_init_attr_ex *attr_ex,
 			  struct ibv_create_xsrq *cmd, size_t cmd_size,
-			  struct ibv_create_srq_resp *resp, size_t resp_size)
+			  struct ib_uverbs_create_srq_resp *resp, size_t resp_size)
 {
 	struct verbs_xrcd *vxrcd = NULL;
 
@@ -835,7 +835,7 @@ int ibv_cmd_modify_srq(struct ibv_srq *srq,
 int ibv_cmd_query_srq(struct ibv_srq *srq, struct ibv_srq_attr *srq_attr,
 		      struct ibv_query_srq *cmd, size_t cmd_size)
 {
-	struct ibv_query_srq_resp resp;
+	struct ib_uverbs_query_srq_resp resp;
 
 	IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_SRQ, &resp, sizeof resp);
 	cmd->srq_handle = srq->handle;
@@ -856,7 +856,7 @@ int ibv_cmd_query_srq(struct ibv_srq *srq, struct ibv_srq_attr *srq_attr,
 int ibv_cmd_destroy_srq(struct ibv_srq *srq)
 {
 	struct ibv_destroy_srq      cmd;
-	struct ibv_destroy_srq_resp resp;
+	struct ib_uverbs_destroy_qp_resp resp;
 
 	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_SRQ, &resp, sizeof resp);
 	cmd.srq_handle = srq->handle;
@@ -925,7 +925,7 @@ static int create_qp_ex_common(struct verbs_qp *qp,
 static void create_qp_handle_resp_common(struct ibv_context *context,
 					 struct verbs_qp *qp,
 					 struct ibv_qp_init_attr_ex *qp_attr,
-					 struct ibv_create_qp_resp *resp,
+					 struct ib_uverbs_create_qp_resp *resp,
 					 struct verbs_xrcd *vxrcd,
 					 int vqp_sz)
 {
@@ -973,7 +973,7 @@ int ibv_cmd_create_qp_ex2(struct ibv_context *context,
 			  struct ibv_create_qp_ex *cmd,
 			  size_t cmd_core_size,
 			  size_t cmd_size,
-			  struct ibv_create_qp_resp_ex *resp,
+			  struct ib_uverbs_ex_create_qp_resp *resp,
 			  size_t resp_core_size,
 			  size_t resp_size)
 {
@@ -984,7 +984,7 @@ int ibv_cmd_create_qp_ex2(struct ibv_context *context,
 		return EINVAL;
 
 	if (resp_core_size <
-	    offsetof(struct ibv_create_qp_resp_ex, response_length) +
+	    offsetof(struct ib_uverbs_ex_create_qp_resp, response_length) +
 	    sizeof(resp->response_length))
 		return EINVAL;
 
@@ -1033,7 +1033,7 @@ int ibv_cmd_create_qp_ex(struct ibv_context *context,
 			 struct verbs_qp *qp, int vqp_sz,
 			 struct ibv_qp_init_attr_ex *attr_ex,
 			 struct ibv_create_qp *cmd, size_t cmd_size,
-			 struct ibv_create_qp_resp *resp, size_t resp_size)
+			 struct ib_uverbs_create_qp_resp *resp, size_t resp_size)
 {
 	struct verbs_xrcd *vxrcd = NULL;
 	int err;
@@ -1077,7 +1077,7 @@ int ibv_cmd_create_qp_ex(struct ibv_context *context,
 int ibv_cmd_create_qp(struct ibv_pd *pd,
 		      struct ibv_qp *qp, struct ibv_qp_init_attr *attr,
 		      struct ibv_create_qp *cmd, size_t cmd_size,
-		      struct ibv_create_qp_resp *resp, size_t resp_size)
+		      struct ib_uverbs_create_qp_resp *resp, size_t resp_size)
 {
 	IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_QP, resp, resp_size);
 
@@ -1136,7 +1136,7 @@ int ibv_cmd_open_qp(struct ibv_context *context, struct verbs_qp *qp,
 		    int vqp_sz,
 		    struct ibv_qp_open_attr *attr,
 		    struct ibv_open_qp *cmd, size_t cmd_size,
-		    struct ibv_create_qp_resp *resp, size_t resp_size)
+		    struct ib_uverbs_create_qp_resp *resp, size_t resp_size)
 {
 	struct verbs_xrcd *xrcd;
 	IBV_INIT_CMD_RESP(cmd, cmd_size, OPEN_QP, resp, resp_size);
@@ -1187,7 +1187,7 @@ int ibv_cmd_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 		     struct ibv_qp_init_attr *init_attr,
 		     struct ibv_query_qp *cmd, size_t cmd_size)
 {
-	struct ibv_query_qp_resp resp;
+	struct ib_uverbs_query_qp_resp resp;
 
 	/*
 	 * Starting with IBV_QP_RATE_LIMIT the attribute must go through the
@@ -1379,10 +1379,10 @@ int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 int ibv_cmd_modify_qp_ex(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 			 int attr_mask, struct ibv_modify_qp_ex *cmd,
 			 size_t cmd_core_size, size_t cmd_size,
-			 struct ibv_modify_qp_resp_ex *resp,
+			 struct ib_uverbs_ex_modify_qp_resp *resp,
 			 size_t resp_core_size, size_t resp_size)
 {
-	if (resp_core_size < offsetof(struct ibv_modify_qp_resp_ex,
+	if (resp_core_size < offsetof(struct ib_uverbs_ex_modify_qp_resp,
 			     response_length) + sizeof(resp->response_length))
 		return EINVAL;
 
@@ -1411,7 +1411,7 @@ int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 		      struct ibv_send_wr **bad_wr)
 {
 	struct ibv_post_send     *cmd;
-	struct ibv_post_send_resp resp;
+	struct ib_uverbs_post_send_resp resp;
 	struct ibv_send_wr       *i;
 	struct ibv_kern_send_wr  *n, *tmp;
 	struct ibv_sge           *s;
@@ -1501,9 +1501,9 @@ int ibv_cmd_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
 		      struct ibv_recv_wr **bad_wr)
 {
 	struct ibv_post_recv     *cmd;
-	struct ibv_post_recv_resp resp;
+	struct ib_uverbs_post_send_resp resp;
 	struct ibv_recv_wr       *i;
-	struct ibv_kern_recv_wr  *n, *tmp;
+	struct ib_uverbs_recv_wr  *n, *tmp;
 	struct ibv_sge           *s;
 	unsigned                  wr_count = 0;
 	unsigned                  sge_count = 0;
@@ -1524,7 +1524,7 @@ int ibv_cmd_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
 	cmd->sge_count = sge_count;
 	cmd->wqe_size  = sizeof *n;
 
-	n = (struct ibv_kern_recv_wr *) ((void *) cmd + sizeof *cmd);
+	n = (struct ib_uverbs_recv_wr *) ((void *) cmd + sizeof *cmd);
 	s = (struct ibv_sge *) (n + wr_count);
 
 	tmp = n;
@@ -1562,9 +1562,9 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
 		      struct ibv_recv_wr **bad_wr)
 {
 	struct ibv_post_srq_recv *cmd;
-	struct ibv_post_srq_recv_resp resp;
+	struct ib_uverbs_post_recv_resp resp;
 	struct ibv_recv_wr       *i;
-	struct ibv_kern_recv_wr  *n, *tmp;
+	struct ib_uverbs_recv_wr  *n, *tmp;
 	struct ibv_sge           *s;
 	unsigned                  wr_count = 0;
 	unsigned                  sge_count = 0;
@@ -1585,7 +1585,7 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
 	cmd->sge_count = sge_count;
 	cmd->wqe_size  = sizeof *n;
 
-	n = (struct ibv_kern_recv_wr *) ((void *) cmd + sizeof *cmd);
+	n = (struct ib_uverbs_recv_wr *) ((void *) cmd + sizeof *cmd);
 	s = (struct ibv_sge *) (n + wr_count);
 
 	tmp = n;
@@ -1668,7 +1668,7 @@ int ibv_cmd_destroy_ah(struct ibv_ah *ah)
 int ibv_cmd_destroy_qp(struct ibv_qp *qp)
 {
 	struct ibv_destroy_qp      cmd;
-	struct ibv_destroy_qp_resp resp;
+	struct ib_uverbs_destroy_qp_resp resp;
 
 	IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_QP, &resp, sizeof resp);
 	cmd.qp_handle = qp->handle;
@@ -1738,7 +1738,7 @@ static int get_filters_size(struct ibv_flow_spec *ib_spec,
 	switch (type) {
 	case IBV_FLOW_SPEC_IPV4_EXT:
 		min_filter_size =
-			offsetof(struct ibv_kern_ipv4_ext_filter, flags) +
+			offsetof(struct ib_uverbs_flow_ipv4_filter, flags) +
 			sizeof(kern_spec->ipv4_ext.mask.flags);
 		curr_kern_filter_size = min_filter_size;
 		ib_spec_filter_mask = (void *)&ib_spec->ipv4_ext.val +
@@ -1746,7 +1746,7 @@ static int get_filters_size(struct ibv_flow_spec *ib_spec,
 		break;
 	case IBV_FLOW_SPEC_IPV6:
 		min_filter_size =
-			offsetof(struct ibv_kern_ipv6_filter, hop_limit) +
+			offsetof(struct ib_uverbs_flow_ipv6_filter, hop_limit) +
 			sizeof(kern_spec->ipv6.mask.hop_limit);
 		curr_kern_filter_size = min_filter_size;
 		ib_spec_filter_mask = (void *)&ib_spec->ipv6.val +
@@ -1754,7 +1754,7 @@ static int get_filters_size(struct ibv_flow_spec *ib_spec,
 		break;
 	case IBV_FLOW_SPEC_VXLAN_TUNNEL:
 		min_filter_size =
-			offsetof(struct ibv_kern_tunnel_filter,
+			offsetof(struct ib_uverbs_flow_tunnel_filter,
 				 tunnel_id) +
 			sizeof(kern_spec->tunnel.mask.tunnel_id);
 		curr_kern_filter_size = min_filter_size;
@@ -1877,7 +1877,7 @@ int ibv_cmd_create_flow(struct ibv_qp *qp,
 			struct ibv_flow_attr *flow_attr)
 {
 	struct ibv_create_flow *cmd;
-	struct ibv_create_flow_resp resp;
+	struct ib_uverbs_destroy_flow  resp;
 	size_t cmd_size;
 	size_t written_size;
 	int i, err;
@@ -1946,7 +1946,7 @@ int ibv_cmd_create_wq(struct ibv_context *context,
 		      struct ibv_create_wq *cmd,
 		      size_t cmd_core_size,
 		      size_t cmd_size,
-		      struct ibv_create_wq_resp *resp,
+		      struct ib_uverbs_ex_create_wq_resp *resp,
 		      size_t resp_core_size,
 		      size_t resp_size)
 {
@@ -2033,7 +2033,7 @@ int ibv_cmd_modify_wq(struct ibv_wq *wq, struct ibv_wq_attr *attr,
 int ibv_cmd_destroy_wq(struct ibv_wq *wq)
 {
 	struct ibv_destroy_wq cmd;
-	struct ibv_destroy_wq_resp resp;
+	struct ib_uverbs_ex_destroy_wq_resp resp;
 	int ret = 0;
 
 	memset(&cmd, 0, sizeof(cmd));
@@ -2062,7 +2062,7 @@ int ibv_cmd_create_rwq_ind_table(struct ibv_context *context,
 				 struct ibv_create_rwq_ind_table *cmd,
 				 size_t cmd_core_size,
 				 size_t cmd_size,
-				 struct ibv_create_rwq_ind_table_resp *resp,
+				 struct ib_uverbs_ex_create_rwq_ind_table_resp *resp,
 				 size_t resp_core_size,
 				 size_t resp_size)
 {
diff --git a/libibverbs/device.c b/libibverbs/device.c
index 7626ce992aa03e..682a504f863802 100644
--- a/libibverbs/device.c
+++ b/libibverbs/device.c
@@ -322,7 +322,7 @@ LATEST_SYMVER_FUNC(ibv_get_async_event, 1_1, "IBVERBS_1.1",
 		   struct ibv_context *context,
 		   struct ibv_async_event *event)
 {
-	struct ibv_kern_async_event ev;
+	struct ib_uverbs_async_event_desc ev;
 
 	if (read(context->async_fd, &ev, sizeof ev) != sizeof ev)
 		return -1;
diff --git a/libibverbs/driver.h b/libibverbs/driver.h
index 1bb37c63c14d37..0c5a8e9a43f366 100644
--- a/libibverbs/driver.h
+++ b/libibverbs/driver.h
@@ -319,7 +319,7 @@ void verbs_init_cq(struct ibv_cq *cq, struct ibv_context *context,
 
 int ibv_cmd_get_context(struct verbs_context *context,
 			struct ibv_get_context *cmd, size_t cmd_size,
-			struct ibv_get_context_resp *resp, size_t resp_size);
+			struct ib_uverbs_get_context_resp *resp, size_t resp_size);
 int ibv_cmd_query_device(struct ibv_context *context,
 			 struct ibv_device_attr *device_attr,
 			 uint64_t *raw_fw_ver,
@@ -339,50 +339,50 @@ int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num,
 		       struct ibv_query_port *cmd, size_t cmd_size);
 int ibv_cmd_alloc_pd(struct ibv_context *context, struct ibv_pd *pd,
 		     struct ibv_alloc_pd *cmd, size_t cmd_size,
-		     struct ibv_alloc_pd_resp *resp, size_t resp_size);
+		     struct ib_uverbs_alloc_pd_resp *resp, size_t resp_size);
 int ibv_cmd_dealloc_pd(struct ibv_pd *pd);
 int ibv_cmd_open_xrcd(struct ibv_context *context, struct verbs_xrcd *xrcd,
 		      int vxrcd_size,
 		      struct ibv_xrcd_init_attr *attr,
 		      struct ibv_open_xrcd *cmd, size_t cmd_size,
-		      struct ibv_open_xrcd_resp *resp, size_t resp_size);
+		      struct ib_uverbs_close_xrcd *resp, size_t resp_size);
 int ibv_cmd_close_xrcd(struct verbs_xrcd *xrcd);
 int ibv_cmd_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 		   uint64_t hca_va, int access,
 		   struct ibv_mr *mr, struct ibv_reg_mr *cmd,
 		   size_t cmd_size,
-		   struct ibv_reg_mr_resp *resp, size_t resp_size);
+		   struct ib_uverbs_reg_mr_resp *resp, size_t resp_size);
 int ibv_cmd_rereg_mr(struct ibv_mr *mr, uint32_t flags, void *addr,
 		     size_t length, uint64_t hca_va, int access,
 		     struct ibv_pd *pd, struct ibv_rereg_mr *cmd,
-		     size_t cmd_sz, struct ibv_rereg_mr_resp *resp,
+		     size_t cmd_sz, struct ib_uverbs_rereg_mr_resp *resp,
 		     size_t resp_sz);
 int ibv_cmd_dereg_mr(struct ibv_mr *mr);
 int ibv_cmd_alloc_mw(struct ibv_pd *pd, enum ibv_mw_type type,
 		     struct ibv_mw *mw, struct ibv_alloc_mw *cmd,
 		     size_t cmd_size,
-		     struct ibv_alloc_mw_resp *resp, size_t resp_size);
+		     struct ib_uverbs_alloc_mw_resp *resp, size_t resp_size);
 int ibv_cmd_dealloc_mw(struct ibv_mw *mw,
 		       struct ibv_dealloc_mw *cmd, size_t cmd_size);
 int ibv_cmd_create_cq(struct ibv_context *context, int cqe,
 		      struct ibv_comp_channel *channel,
 		      int comp_vector, struct ibv_cq *cq,
 		      struct ibv_create_cq *cmd, size_t cmd_size,
-		      struct ibv_create_cq_resp *resp, size_t resp_size);
+		      struct ib_uverbs_create_cq_resp *resp, size_t resp_size);
 int ibv_cmd_create_cq_ex(struct ibv_context *context,
 			 struct ibv_cq_init_attr_ex *cq_attr,
 			 struct ibv_cq_ex *cq,
 			 struct ibv_create_cq_ex *cmd,
 			 size_t cmd_core_size,
 			 size_t cmd_size,
-			 struct ibv_create_cq_resp_ex *resp,
+			 struct ib_uverbs_ex_create_cq_resp *resp,
 			 size_t resp_core_size,
 			 size_t resp_size);
 int ibv_cmd_poll_cq(struct ibv_cq *cq, int ne, struct ibv_wc *wc);
 int ibv_cmd_req_notify_cq(struct ibv_cq *cq, int solicited_only);
 int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
 		      struct ibv_resize_cq *cmd, size_t cmd_size,
-		      struct ibv_resize_cq_resp *resp, size_t resp_size);
+		      struct ib_uverbs_resize_cq_resp *resp, size_t resp_size);
 int ibv_cmd_destroy_cq(struct ibv_cq *cq);
 int ibv_cmd_modify_cq(struct ibv_cq *cq,
 		      struct ibv_modify_cq_attr *attr,
@@ -392,12 +392,12 @@ int ibv_cmd_modify_cq(struct ibv_cq *cq,
 int ibv_cmd_create_srq(struct ibv_pd *pd,
 		       struct ibv_srq *srq, struct ibv_srq_init_attr *attr,
 		       struct ibv_create_srq *cmd, size_t cmd_size,
-		       struct ibv_create_srq_resp *resp, size_t resp_size);
+		       struct ib_uverbs_create_srq_resp *resp, size_t resp_size);
 int ibv_cmd_create_srq_ex(struct ibv_context *context,
 			  struct verbs_srq *srq, int vsrq_sz,
 			  struct ibv_srq_init_attr_ex *attr_ex,
 			  struct ibv_create_xsrq *cmd, size_t cmd_size,
-			  struct ibv_create_srq_resp *resp, size_t resp_size);
+			  struct ib_uverbs_create_srq_resp *resp, size_t resp_size);
 int ibv_cmd_modify_srq(struct ibv_srq *srq,
 		       struct ibv_srq_attr *srq_attr,
 		       int srq_attr_mask,
@@ -410,26 +410,26 @@ int ibv_cmd_destroy_srq(struct ibv_srq *srq);
 int ibv_cmd_create_qp(struct ibv_pd *pd,
 		      struct ibv_qp *qp, struct ibv_qp_init_attr *attr,
 		      struct ibv_create_qp *cmd, size_t cmd_size,
-		      struct ibv_create_qp_resp *resp, size_t resp_size);
+		      struct ib_uverbs_create_qp_resp *resp, size_t resp_size);
 int ibv_cmd_create_qp_ex(struct ibv_context *context,
 			 struct verbs_qp *qp, int vqp_sz,
 			 struct ibv_qp_init_attr_ex *attr_ex,
 			 struct ibv_create_qp *cmd, size_t cmd_size,
-			 struct ibv_create_qp_resp *resp, size_t resp_size);
+			 struct ib_uverbs_create_qp_resp *resp, size_t resp_size);
 int ibv_cmd_create_qp_ex2(struct ibv_context *context,
 			  struct verbs_qp *qp, int vqp_sz,
 			  struct ibv_qp_init_attr_ex *qp_attr,
 			  struct ibv_create_qp_ex *cmd,
 			  size_t cmd_core_size,
 			  size_t cmd_size,
-			  struct ibv_create_qp_resp_ex *resp,
+			  struct ib_uverbs_ex_create_qp_resp *resp,
 			  size_t resp_core_size,
 			  size_t resp_size);
 int ibv_cmd_open_qp(struct ibv_context *context,
 		    struct verbs_qp *qp,  int vqp_sz,
 		    struct ibv_qp_open_attr *attr,
 		    struct ibv_open_qp *cmd, size_t cmd_size,
-		    struct ibv_create_qp_resp *resp, size_t resp_size);
+		    struct ib_uverbs_create_qp_resp *resp, size_t resp_size);
 int ibv_cmd_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *qp_attr,
 		     int attr_mask,
 		     struct ibv_qp_init_attr *qp_init_attr,
@@ -440,7 +440,7 @@ int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 int ibv_cmd_modify_qp_ex(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 			 int attr_mask, struct ibv_modify_qp_ex *cmd,
 			 size_t cmd_core_size, size_t cmd_size,
-			 struct ibv_modify_qp_resp_ex *resp,
+			 struct ib_uverbs_ex_modify_qp_resp *resp,
 			 size_t resp_core_size, size_t resp_size);
 int ibv_cmd_destroy_qp(struct ibv_qp *qp);
 int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
@@ -467,7 +467,7 @@ int ibv_cmd_create_wq(struct ibv_context *context,
 		      struct ibv_create_wq *cmd,
 		      size_t cmd_core_size,
 		      size_t cmd_size,
-		      struct ibv_create_wq_resp *resp,
+		      struct ib_uverbs_ex_create_wq_resp *resp,
 		      size_t resp_core_size,
 		      size_t resp_size);
 
@@ -481,7 +481,7 @@ int ibv_cmd_create_rwq_ind_table(struct ibv_context *context,
 				 struct ibv_create_rwq_ind_table *cmd,
 				 size_t cmd_core_size,
 				 size_t cmd_size,
-				 struct ibv_create_rwq_ind_table_resp *resp,
+				 struct ib_uverbs_ex_create_rwq_ind_table_resp *resp,
 				 size_t resp_core_size,
 				 size_t resp_size);
 int ibv_cmd_destroy_rwq_ind_table(struct ibv_rwq_ind_table *rwq_ind_table);
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index e4bca3aea4f906..3468e5497c3531 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -80,16 +80,6 @@ struct ex_hdr {
 	};
 };
 
-struct ibv_kern_async_event {
-	__u64 element;
-	__u32 event_type;
-	__u32 reserved;
-};
-
-struct ibv_comp_event {
-	__u64 cq_handle;
-};
-
 /*
  * All commands from userspace should start with a __u32 command field
  * followed by __u16 in_words and out_words fields (which give the
@@ -106,11 +96,6 @@ struct ibv_get_context {
 	__u64 driver_data[0];
 };
 
-struct ibv_get_context_resp {
-	__u32 async_fd;
-	__u32 num_comp_vectors;
-};
-
 struct ibv_query_device {
 	__u32 command;
 	__u16 in_words;
@@ -119,82 +104,12 @@ struct ibv_query_device {
 	__u64 driver_data[0];
 };
 
-struct ibv_query_device_resp {
-	__u64 fw_ver;
-	__be64 node_guid;
-	__be64 sys_image_guid;
-	__u64 max_mr_size;
-	__u64 page_size_cap;
-	__u32 vendor_id;
-	__u32 vendor_part_id;
-	__u32 hw_ver;
-	__u32 max_qp;
-	__u32 max_qp_wr;
-	__u32 device_cap_flags;
-	__u32 max_sge;
-	__u32 max_sge_rd;
-	__u32 max_cq;
-	__u32 max_cqe;
-	__u32 max_mr;
-	__u32 max_pd;
-	__u32 max_qp_rd_atom;
-	__u32 max_ee_rd_atom;
-	__u32 max_res_rd_atom;
-	__u32 max_qp_init_rd_atom;
-	__u32 max_ee_init_rd_atom;
-	__u32 atomic_cap;
-	__u32 max_ee;
-	__u32 max_rdd;
-	__u32 max_mw;
-	__u32 max_raw_ipv6_qp;
-	__u32 max_raw_ethy_qp;
-	__u32 max_mcast_grp;
-	__u32 max_mcast_qp_attach;
-	__u32 max_total_mcast_qp_attach;
-	__u32 max_ah;
-	__u32 max_fmr;
-	__u32 max_map_per_fmr;
-	__u32 max_srq;
-	__u32 max_srq_wr;
-	__u32 max_srq_sge;
-	__u16 max_pkeys;
-	__u8  local_ca_ack_delay;
-	__u8  phys_port_cnt;
-	__u8  reserved[4];
-};
-
 struct ibv_query_device_ex {
 	struct ex_hdr	hdr;
 	__u32		comp_mask;
 	__u32		reserved;
 };
 
-struct ibv_odp_caps_resp {
-	__u64 general_caps;
-	struct {
-		__u32 rc_odp_caps;
-		__u32 uc_odp_caps;
-		__u32 ud_odp_caps;
-	} per_transport_caps;
-	__u32 reserved;
-};
-
-struct ibv_rss_caps_resp {
-	__u32 supported_qpts;
-	__u32 max_rwq_indirection_tables;
-	__u32 max_rwq_indirection_table_size;
-	__u32 reserved;
-};
-
-struct ibv_tm_caps_resp {
-	__u32 max_rndv_hdr_size;
-	__u32 max_num_tags;
-	__u32 flags;
-	__u32 max_ops;
-	__u32 max_sge;
-	__u32 reserved;
-};
-
 struct ibv_cq_moderation_caps_resp {
 	__u16  cq_count;
 	__u16  cq_period;
@@ -202,17 +117,17 @@ struct ibv_cq_moderation_caps_resp {
 };
 
 struct ibv_query_device_resp_ex {
-	struct ibv_query_device_resp base;
+	struct ib_uverbs_query_device_resp base;
 	__u32 comp_mask;
 	__u32 response_length;
-	struct ibv_odp_caps_resp odp_caps;
+	struct ib_uverbs_odp_caps odp_caps;
 	__u64 timestamp_mask;
 	__u64 hca_core_clock;
 	__u64 device_cap_flags_ex;
-	struct ibv_rss_caps_resp rss_caps;
+	struct ib_uverbs_rss_caps rss_caps;
 	__u32  max_wq_type_rq;
 	__u32 raw_packet_caps;
-	struct ibv_tm_caps_resp tm_caps;
+	struct ib_uverbs_tm_caps tm_caps;
 	struct ibv_cq_moderation_caps_resp cq_mod_caps;
 };
 
@@ -226,30 +141,6 @@ struct ibv_query_port {
 	__u64 driver_data[0];
 };
 
-struct ibv_query_port_resp {
-	__u32 port_cap_flags;
-	__u32 max_msg_sz;
-	__u32 bad_pkey_cntr;
-	__u32 qkey_viol_cntr;
-	__u32 gid_tbl_len;
-	__u16 pkey_tbl_len;
-	__u16 lid;
-	__u16 sm_lid;
-	__u8  state;
-	__u8  max_mtu;
-	__u8  active_mtu;
-	__u8  lmc;
-	__u8  max_vl_num;
-	__u8  sm_sl;
-	__u8  subnet_timeout;
-	__u8  init_type_reply;
-	__u8  active_width;
-	__u8  active_speed;
-	__u8  phys_state;
-	__u8  link_layer;
-	__u8  reserved[2];
-};
-
 struct ibv_alloc_pd {
 	__u32 command;
 	__u16 in_words;
@@ -258,10 +149,6 @@ struct ibv_alloc_pd {
 	__u64 driver_data[0];
 };
 
-struct ibv_alloc_pd_resp {
-	__u32 pd_handle;
-};
-
 struct ibv_dealloc_pd {
 	__u32 command;
 	__u16 in_words;
@@ -279,10 +166,6 @@ struct ibv_open_xrcd {
 	__u64 driver_data[0];
 };
 
-struct ibv_open_xrcd_resp {
-	__u32 xrcd_handle;
-};
-
 struct ibv_close_xrcd {
 	__u32 command;
 	__u16 in_words;
@@ -303,12 +186,6 @@ struct ibv_reg_mr {
 	__u64 driver_data[0];
 };
 
-struct ibv_reg_mr_resp {
-	__u32 mr_handle;
-	__u32 lkey;
-	__u32 rkey;
-};
-
 struct ibv_rereg_mr {
 	__u32 command;
 	__u16 in_words;
@@ -324,11 +201,6 @@ struct ibv_rereg_mr {
 	__u64 driver_data[0];
 };
 
-struct ibv_rereg_mr_resp {
-	__u32 lkey;
-	__u32 rkey;
-};
-
 struct ibv_dereg_mr {
 	__u32 command;
 	__u16 in_words;
@@ -346,11 +218,6 @@ struct ibv_alloc_mw {
 	__u8  reserved[3];
 };
 
-struct ibv_alloc_mw_resp {
-	__u32 mw_handle;
-	__u32 rkey;
-};
-
 struct ibv_dealloc_mw {
 	__u32 command;
 	__u16 in_words;
@@ -366,10 +233,6 @@ struct ibv_create_comp_channel {
 	__u64 response;
 };
 
-struct ibv_create_comp_channel_resp {
-	__u32 fd;
-};
-
 struct ibv_create_cq {
 	__u32 command;
 	__u16 in_words;
@@ -383,11 +246,6 @@ struct ibv_create_cq {
 	__u64 driver_data[0];
 };
 
-struct ibv_create_cq_resp {
-	__u32 cq_handle;
-	__u32 cqe;
-};
-
 enum ibv_create_cq_ex_kernel_flags {
 	IBV_CREATE_CQ_EX_KERNEL_FLAG_COMPLETION_TIMESTAMP = 1 << 0,
 };
@@ -403,12 +261,6 @@ struct ibv_create_cq_ex {
 	__u32		reserved;
 };
 
-struct ibv_create_cq_resp_ex {
-	struct ibv_create_cq_resp	base;
-	__u32				comp_mask;
-	__u32				response_length;
-};
-
 struct ibv_kern_wc {
 	__u64  wr_id;
 	__u32  status;
@@ -460,12 +312,6 @@ struct ibv_resize_cq {
 	__u64 driver_data[0];
 };
 
-struct ibv_resize_cq_resp {
-	__u32 cqe;
-	__u32 reserved;
-	__u64 driver_data[0];
-};
-
 struct ibv_destroy_cq {
 	__u32 command;
 	__u16 in_words;
@@ -475,69 +321,6 @@ struct ibv_destroy_cq {
 	__u32 reserved;
 };
 
-struct ibv_destroy_cq_resp {
-	__u32 comp_events_reported;
-	__u32 async_events_reported;
-};
-
-struct ibv_kern_global_route {
-	__u8  dgid[16];
-	__u32 flow_label;
-	__u8  sgid_index;
-	__u8  hop_limit;
-	__u8  traffic_class;
-	__u8  reserved;
-};
-
-struct ibv_kern_ah_attr {
-	struct ibv_kern_global_route grh;
-	__u16 dlid;
-	__u8  sl;
-	__u8  src_path_bits;
-	__u8  static_rate;
-	__u8  is_global;
-	__u8  port_num;
-	__u8  reserved;
-};
-
-struct ibv_kern_qp_attr {
-	__u32	qp_attr_mask;
-	__u32	qp_state;
-	__u32	cur_qp_state;
-	__u32	path_mtu;
-	__u32	path_mig_state;
-	__u32	qkey;
-	__u32	rq_psn;
-	__u32	sq_psn;
-	__u32	dest_qp_num;
-	__u32	qp_access_flags;
-
-	struct ibv_kern_ah_attr ah_attr;
-	struct ibv_kern_ah_attr alt_ah_attr;
-
-	/* ib_qp_cap */
-	__u32	max_send_wr;
-	__u32	max_recv_wr;
-	__u32	max_send_sge;
-	__u32	max_recv_sge;
-	__u32	max_inline_data;
-
-	__u16	pkey_index;
-	__u16	alt_pkey_index;
-	__u8	en_sqd_async_notify;
-	__u8	sq_draining;
-	__u8	max_rd_atomic;
-	__u8	max_dest_rd_atomic;
-	__u8	min_rnr_timer;
-	__u8	port_num;
-	__u8	timeout;
-	__u8	retry_cnt;
-	__u8	rnr_retry;
-	__u8	alt_port_num;
-	__u8	alt_timeout;
-	__u8	reserved[5];
-};
-
 #define IBV_CREATE_QP_COMMON	\
 	__u64 user_handle;	\
 	__u32 pd_handle;	\
@@ -580,17 +363,6 @@ struct ibv_open_qp {
 	__u64 driver_data[0];
 };
 
-/* also used for open response */
-struct ibv_create_qp_resp {
-	__u32 qp_handle;
-	__u32 qpn;
-	__u32 max_send_wr;
-	__u32 max_recv_wr;
-	__u32 max_send_sge;
-	__u32 max_recv_sge;
-	__u32 max_inline_data;
-	__u32 reserved;
-};
 
 enum ibv_create_qp_ex_kernel_mask {
 	IBV_CREATE_QP_EX_KERNEL_MASK_IND_TABLE = 1 << 0,
@@ -605,27 +377,6 @@ struct ibv_create_qp_ex {
 	__u32 source_qpn;
 };
 
-struct ibv_create_qp_resp_ex {
-	struct ibv_create_qp_resp base;
-	__u32 comp_mask;
-	__u32 response_length;
-};
-
-struct ibv_qp_dest {
-	__u8  dgid[16];
-	__u32 flow_label;
-	__u16 dlid;
-	__u16 reserved;
-	__u8  sgid_index;
-	__u8  hop_limit;
-	__u8  traffic_class;
-	__u8  sl;
-	__u8  src_path_bits;
-	__u8  static_rate;
-	__u8  is_global;
-	__u8  port_num;
-};
-
 struct ibv_query_qp {
 	__u32 command;
 	__u16 in_words;
@@ -636,43 +387,9 @@ struct ibv_query_qp {
 	__u64 driver_data[0];
 };
 
-struct ibv_query_qp_resp {
-	struct ibv_qp_dest dest;
-	struct ibv_qp_dest alt_dest;
-	__u32 max_send_wr;
-	__u32 max_recv_wr;
-	__u32 max_send_sge;
-	__u32 max_recv_sge;
-	__u32 max_inline_data;
-	__u32 qkey;
-	__u32 rq_psn;
-	__u32 sq_psn;
-	__u32 dest_qp_num;
-	__u32 qp_access_flags;
-	__u16 pkey_index;
-	__u16 alt_pkey_index;
-	__u8  qp_state;
-	__u8  cur_qp_state;
-	__u8  path_mtu;
-	__u8  path_mig_state;
-	__u8  sq_draining;
-	__u8  max_rd_atomic;
-	__u8  max_dest_rd_atomic;
-	__u8  min_rnr_timer;
-	__u8  port_num;
-	__u8  timeout;
-	__u8  retry_cnt;
-	__u8  rnr_retry;
-	__u8  alt_port_num;
-	__u8  alt_timeout;
-	__u8  sq_sig_all;
-	__u8  reserved[5];
-	__u64 driver_data[0];
-};
-
 struct ibv_modify_qp_common {
-	struct ibv_qp_dest dest;
-	struct ibv_qp_dest alt_dest;
+	struct ib_uverbs_qp_dest dest;
+	struct ib_uverbs_qp_dest alt_dest;
 	__u32 qp_handle;
 	__u32 attr_mask;
 	__u32 qkey;
@@ -714,11 +431,6 @@ struct ibv_modify_qp_ex {
 	__u32  reserved;
 };
 
-struct ibv_modify_qp_resp_ex {
-	__u32  comp_mask;
-	__u32  response_length;
-};
-
 struct ibv_destroy_qp {
 	__u32 command;
 	__u16 in_words;
@@ -728,10 +440,6 @@ struct ibv_destroy_qp {
 	__u32 reserved;
 };
 
-struct ibv_destroy_qp_resp {
-	__u32 events_reported;
-};
-
 struct ibv_kern_send_wr {
 	__u64 wr_id;
 	__u32 num_sge;
@@ -765,19 +473,12 @@ struct ibv_kern_send_wr {
 	} qp_type;
 };
 
-struct ibv_kern_eth_filter {
-	__u8  dst_mac[6];
-	__u8  src_mac[6];
-	__be16  ether_type;
-	__be16  vlan_tag;
-};
-
 struct ibv_kern_spec_eth {
 	__u32 type;
 	__u16  size;
 	__u16 reserved;
-	struct ibv_kern_eth_filter val;
-	struct ibv_kern_eth_filter mask;
+	struct ib_uverbs_flow_eth_filter val;
+	struct ib_uverbs_flow_eth_filter mask;
 };
 
 struct ibv_kern_ipv4_filter {
@@ -793,52 +494,28 @@ struct ibv_kern_spec_ipv4 {
 	struct ibv_kern_ipv4_filter mask;
 };
 
-struct ibv_kern_ipv4_ext_filter {
-	__be32 src_ip;
-	__be32 dst_ip;
-	__u8  proto;
-	__u8  tos;
-	__u8  ttl;
-	__u8  flags;
-};
-
 struct ibv_kern_spec_ipv4_ext {
 	__u32  type;
 	__u16  size;
 	__u16 reserved;
-	struct ibv_kern_ipv4_ext_filter val;
-	struct ibv_kern_ipv4_ext_filter mask;
-};
-
-struct ibv_kern_ipv6_filter {
-	__u8  src_ip[16];
-	__u8  dst_ip[16];
-	__be32 flow_label;
-	__u8  next_hdr;
-	__u8  traffic_class;
-	__u8  hop_limit;
-	__u8  reserved;
+	struct ib_uverbs_flow_ipv4_filter val;
+	struct ib_uverbs_flow_ipv4_filter mask;
 };
 
 struct ibv_kern_spec_ipv6 {
 	__u32  type;
 	__u16  size;
 	__u16 reserved;
-	struct ibv_kern_ipv6_filter val;
-	struct ibv_kern_ipv6_filter mask;
-};
-
-struct ibv_kern_tcp_udp_filter {
-	__be16 dst_port;
-	__be16 src_port;
+	struct ib_uverbs_flow_ipv6_filter val;
+	struct ib_uverbs_flow_ipv6_filter mask;
 };
 
 struct ibv_kern_spec_tcp_udp {
 	__u32  type;
 	__u16  size;
 	__u16 reserved;
-	struct ibv_kern_tcp_udp_filter val;
-	struct ibv_kern_tcp_udp_filter mask;
+	struct ib_uverbs_flow_tcp_udp_filter val;
+	struct ib_uverbs_flow_tcp_udp_filter mask;
 };
 
 struct ibv_kern_spec_action_tag {
@@ -849,16 +526,12 @@ struct ibv_kern_spec_action_tag {
 	__u32 reserved1;
 };
 
-struct ibv_kern_tunnel_filter {
-	__be32 tunnel_id;
-};
-
 struct ibv_kern_spec_tunnel {
 	__u32  type;
 	__u16  size;
 	__u16 reserved;
-	struct ibv_kern_tunnel_filter val;
-	struct ibv_kern_tunnel_filter mask;
+	struct ib_uverbs_flow_tunnel_filter val;
+	struct ib_uverbs_flow_tunnel_filter mask;
 };
 
 struct ibv_kern_spec_action_drop {
@@ -885,21 +558,6 @@ struct ibv_kern_spec {
 	};
 };
 
-struct ibv_kern_flow_attr {
-	__u32 type;
-	__u16 size;
-	__u16 priority;
-	__u8 num_of_specs;
-	__u8 reserved[2];
-	__u8 port;
-	__u32 flags;
-	/* Following are the optional layers according to user request
-	 * struct ibv_kern_flow_spec_xxx
-	 * struct ibv_kern_flow_spec_yyy
-	 */
-	struct ib_uverbs_flow_spec_hdr flow_specs[0];
-};
-
 struct ibv_post_send {
 	__u32 command;
 	__u16 in_words;
@@ -912,16 +570,6 @@ struct ibv_post_send {
 	struct ibv_kern_send_wr send_wr[0];
 };
 
-struct ibv_post_send_resp {
-	__u32 bad_wr;
-};
-
-struct ibv_kern_recv_wr {
-	__u64 wr_id;
-	__u32 num_sge;
-	__u32 reserved;
-};
-
 struct ibv_post_recv {
 	__u32 command;
 	__u16 in_words;
@@ -931,11 +579,7 @@ struct ibv_post_recv {
 	__u32 wr_count;
 	__u32 sge_count;
 	__u32 wqe_size;
-	struct ibv_kern_recv_wr recv_wr[0];
-};
-
-struct ibv_post_recv_resp {
-	__u32 bad_wr;
+	struct ib_uverbs_recv_wr recv_wr[0];
 };
 
 struct ibv_post_srq_recv {
@@ -947,11 +591,7 @@ struct ibv_post_srq_recv {
 	__u32 wr_count;
 	__u32 sge_count;
 	__u32 wqe_size;
-	struct ibv_kern_recv_wr recv_wr[0];
-};
-
-struct ibv_post_srq_recv_resp {
-	__u32 bad_wr;
+	struct ib_uverbs_recv_wr recv_wr[0];
 };
 
 struct ibv_create_ah {
@@ -962,7 +602,7 @@ struct ibv_create_ah {
 	__u64 user_handle;
 	__u32 pd_handle;
 	__u32 reserved;
-	struct ibv_kern_ah_attr attr;
+	struct ib_uverbs_ah_attr attr;
 };
 
 struct ibv_create_ah_resp {
@@ -991,12 +631,7 @@ struct ibv_create_flow  {
 	struct ex_hdr hdr;
 	__u32 comp_mask;
 	__u32 qp_handle;
-	struct ibv_kern_flow_attr flow_attr;
-};
-
-struct ibv_create_flow_resp {
-	__u32 comp_mask;
-	__u32 flow_handle;
+	struct ib_uverbs_flow_attr flow_attr;
 };
 
 struct ibv_destroy_flow  {
@@ -1046,13 +681,6 @@ struct ibv_create_xsrq {
 	__u64 driver_data[0];
 };
 
-struct ibv_create_srq_resp {
-	__u32 srq_handle;
-	__u32 max_wr;
-	__u32 max_sge;
-	__u32 srqn;
-};
-
 struct ibv_modify_srq {
 	__u32 command;
 	__u16 in_words;
@@ -1074,13 +702,6 @@ struct ibv_query_srq {
 	__u64 driver_data[0];
 };
 
-struct ibv_query_srq_resp {
-	__u32 max_wr;
-	__u32 max_sge;
-	__u32 srq_limit;
-	__u32 reserved;
-};
-
 struct ibv_destroy_srq {
 	__u32 command;
 	__u16 in_words;
@@ -1090,10 +711,6 @@ struct ibv_destroy_srq {
 	__u32 reserved;
 };
 
-struct ibv_destroy_srq_resp {
-	__u32 events_reported;
-};
-
 struct ibv_modify_srq_v3 {
 	__u32 command;
 	__u16 in_words;
@@ -1139,28 +756,12 @@ struct ibv_create_wq {
 	__u32 reserved;
 };
 
-struct ibv_create_wq_resp {
-	__u32 comp_mask;
-	__u32 response_length;
-	__u32 wq_handle;
-	__u32 max_wr;
-	__u32 max_sge;
-	__u32 wqn;
-};
-
 struct ibv_destroy_wq {
 	struct ex_hdr hdr;
 	__u32 comp_mask;
 	__u32 wq_handle;
 };
 
-struct ibv_destroy_wq_resp {
-	__u32 comp_mask;
-	__u32 response_length;
-	__u32 events_reported;
-	__u32 reserved;
-};
-
 struct ibv_modify_wq  {
 	struct ex_hdr hdr;
 	__u32 attr_mask;
@@ -1181,29 +782,17 @@ struct ibv_create_rwq_ind_table {
 	 */
 };
 
-struct ibv_create_rwq_ind_table_resp {
-	__u32 comp_mask;
-	__u32 response_length;
-	__u32 ind_tbl_handle;
-	__u32 ind_tbl_num;
-};
-
 struct ibv_destroy_rwq_ind_table {
 	struct ex_hdr hdr;
 	__u32 comp_mask;
 	__u32 ind_tbl_handle;
 };
 
-struct ibv_kern_modify_cq_attr {
-	__u16 cq_count;
-	__u16 cq_period;
-};
-
 struct ibv_modify_cq {
 	struct ex_hdr hdr;
 	__u32 cq_handle;
 	__u32 attr_mask;
-	struct ibv_kern_modify_cq_attr attr;
+	struct ib_uverbs_cq_moderation attr;
 	__u32 reserved;
 };
 
diff --git a/libibverbs/marshall.c b/libibverbs/marshall.c
index 5b0260832ca797..20c2ba9e6410b4 100644
--- a/libibverbs/marshall.c
+++ b/libibverbs/marshall.c
@@ -37,7 +37,7 @@
 #include <infiniband/marshall.h>
 
 void ibv_copy_ah_attr_from_kern(struct ibv_ah_attr *dst,
-				struct ibv_kern_ah_attr *src)
+				struct ib_uverbs_ah_attr *src)
 {
 	memcpy(dst->grh.dgid.raw, src->grh.dgid, sizeof dst->grh.dgid);
 	dst->grh.flow_label = src->grh.flow_label;
@@ -54,7 +54,7 @@ void ibv_copy_ah_attr_from_kern(struct ibv_ah_attr *dst,
 }
 
 void ibv_copy_qp_attr_from_kern(struct ibv_qp_attr *dst,
-				struct ibv_kern_qp_attr *src)
+				struct ib_uverbs_qp_attr *src)
 {
 	dst->cur_qp_state = src->cur_qp_state;
 	dst->path_mtu = src->path_mtu;
diff --git a/libibverbs/marshall.h b/libibverbs/marshall.h
index c5ba62ccfc1c26..723f4f485b4d78 100644
--- a/libibverbs/marshall.h
+++ b/libibverbs/marshall.h
@@ -43,10 +43,10 @@ extern "C" {
 #endif
 
 void ibv_copy_qp_attr_from_kern(struct ibv_qp_attr *dst,
-				struct ibv_kern_qp_attr *src);
+				struct ib_uverbs_qp_attr *src);
 
 void ibv_copy_ah_attr_from_kern(struct ibv_ah_attr *dst,
-				struct ibv_kern_ah_attr *src);
+				struct ib_uverbs_ah_attr *src);
 
 void ibv_copy_path_rec_from_kern(struct ibv_sa_path_rec *dst,
 				 struct ib_user_path_rec *src);
diff --git a/libibverbs/verbs.c b/libibverbs/verbs.c
index 4b2696e2aac020..3b5c31090f3f6b 100644
--- a/libibverbs/verbs.c
+++ b/libibverbs/verbs.c
@@ -319,7 +319,7 @@ struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context *context)
 {
 	struct ibv_comp_channel            *channel;
 	struct ibv_create_comp_channel      cmd;
-	struct ibv_create_comp_channel_resp resp;
+	struct ib_uverbs_create_comp_channel_resp resp;
 
 	channel = malloc(sizeof *channel);
 	if (!channel)
@@ -410,7 +410,7 @@ LATEST_SYMVER_FUNC(ibv_get_cq_event, 1_1, "IBVERBS_1.1",
 		   struct ibv_comp_channel *channel,
 		   struct ibv_cq **cq, void **cq_context)
 {
-	struct ibv_comp_event ev;
+	struct ib_uverbs_comp_event_desc ev;
 
 	if (read(channel->fd, &ev, sizeof ev) != sizeof ev)
 		return -1;
diff --git a/librdmacm/cma.c b/librdmacm/cma.c
index ca1b5fb4772aaf..db2b01e608bd61 100644
--- a/librdmacm/cma.c
+++ b/librdmacm/cma.c
@@ -993,7 +993,7 @@ static int rdma_init_qp_attr(struct rdma_cm_id *id, struct ibv_qp_attr *qp_attr,
 			     int *qp_attr_mask)
 {
 	struct ucma_abi_init_qp_attr cmd;
-	struct ibv_kern_qp_attr resp;
+	struct ib_uverbs_qp_attr resp;
 	struct cma_id_private *id_priv;
 	int ret;
 	
diff --git a/librdmacm/rdma_cma_abi.h b/librdmacm/rdma_cma_abi.h
index deb37a41643a76..0ebdad96ec484a 100644
--- a/librdmacm/rdma_cma_abi.h
+++ b/librdmacm/rdma_cma_abi.h
@@ -216,7 +216,7 @@ struct ucma_abi_conn_param {
 struct ucma_abi_ud_param {
 	__u32 qp_num;
 	__u32 qkey;
-	struct ibv_kern_ah_attr ah_attr;
+	struct ib_uverbs_ah_attr ah_attr;
 	__u8 private_data[RDMA_MAX_PRIVATE_DATA];
 	__u8 private_data_len;
 	__u8 reserved[7];
diff --git a/providers/bnxt_re/bnxt_re-abi.h b/providers/bnxt_re/bnxt_re-abi.h
index 73beef59808554..94ec7b367f9bca 100644
--- a/providers/bnxt_re/bnxt_re-abi.h
+++ b/providers/bnxt_re/bnxt_re-abi.h
@@ -196,7 +196,7 @@ struct bnxt_re_db_hdr {
 };
 
 struct bnxt_re_cntx_resp {
-	struct ibv_get_context_resp resp;
+	struct ib_uverbs_get_context_resp resp;
 	__u32 dev_id;
 	__u32 max_qp; /* To allocate qp-table */
 	__u32 pg_size;
@@ -206,14 +206,14 @@ struct bnxt_re_cntx_resp {
 };
 
 struct bnxt_re_pd_resp {
-	struct ibv_alloc_pd_resp resp;
+	struct ib_uverbs_alloc_pd_resp resp;
 	__u32 pdid;
 	__u32 dpi;
 	__u64 dbr;
 };
 
 struct bnxt_re_mr_resp {
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 };
 
 struct bnxt_re_cq_req {
@@ -223,7 +223,7 @@ struct bnxt_re_cq_req {
 };
 
 struct bnxt_re_cq_resp {
-	struct ibv_create_cq_resp resp;
+	struct ib_uverbs_create_cq_resp resp;
 	__u32 cqid;
 	__u32 tail;
 	__u32 phase;
@@ -271,7 +271,7 @@ struct bnxt_re_qp_req {
 };
 
 struct bnxt_re_qp_resp {
-	struct ibv_create_qp_resp resp;
+	struct ib_uverbs_create_qp_resp resp;
 	__u32 qpid;
 	__u32 rsvd;
 };
diff --git a/providers/cxgb3/iwch-abi.h b/providers/cxgb3/iwch-abi.h
index 7f2c12d98107f9..50741ded5052be 100644
--- a/providers/cxgb3/iwch-abi.h
+++ b/providers/cxgb3/iwch-abi.h
@@ -36,11 +36,11 @@
 #include <infiniband/kern-abi.h>
 
 struct iwch_alloc_ucontext_resp {
-	struct ibv_get_context_resp ibv_resp;
+	struct ib_uverbs_get_context_resp ibv_resp;
 };
 
 struct iwch_alloc_pd_resp {
-	struct ibv_alloc_pd_resp ibv_resp;
+	struct ib_uverbs_alloc_pd_resp ibv_resp;
 	uint32_t pdid;
 };
 
@@ -50,19 +50,19 @@ struct iwch_create_cq {
 };
 
 struct iwch_reg_mr_resp {
-	struct ibv_reg_mr_resp ibv_resp;
+	struct ib_uverbs_reg_mr_resp ibv_resp;
 	uint32_t pbl_addr;
 };
 
 struct iwch_create_cq_resp_v0 {
-	struct ibv_create_cq_resp ibv_resp;
+	struct ib_uverbs_create_cq_resp ibv_resp;
 	uint64_t physaddr;
 	uint32_t cqid;
 	uint32_t size_log2;
 };
 
 struct iwch_create_cq_resp_v1 {
-	struct ibv_create_cq_resp ibv_resp;
+	struct ib_uverbs_create_cq_resp ibv_resp;
 	uint64_t physaddr;
 	uint32_t cqid;
 	uint32_t size_log2;
@@ -75,7 +75,7 @@ struct iwch_create_qp {
 };
 
 struct iwch_create_qp_resp {
-	struct ibv_create_qp_resp ibv_resp;
+	struct ib_uverbs_create_qp_resp ibv_resp;
 	uint64_t physaddr;
 	uint64_t doorbell;
 	uint32_t qpid;
diff --git a/providers/cxgb4/cxgb4-abi.h b/providers/cxgb4/cxgb4-abi.h
index 91e68d552b293d..b18d03d25907f9 100644
--- a/providers/cxgb4/cxgb4-abi.h
+++ b/providers/cxgb4/cxgb4-abi.h
@@ -36,19 +36,19 @@
 #include <infiniband/kern-abi.h>
 
 struct c4iw_alloc_ucontext_resp {
-	struct ibv_get_context_resp ibv_resp;
+	struct ib_uverbs_get_context_resp ibv_resp;
 	__u64 status_page_key;
 	__u32 status_page_size;
 	__u32 reserved;
 };
 
 struct c4iw_alloc_pd_resp {
-	struct ibv_alloc_pd_resp ibv_resp;
+	struct ib_uverbs_alloc_pd_resp ibv_resp;
 	uint32_t pdid;
 };
 
 struct c4iw_create_cq_resp {
-	struct ibv_create_cq_resp ibv_resp;
+	struct ib_uverbs_create_cq_resp ibv_resp;
 	__u64 key;
 	__u64 gts_key;
 	__u64 memsize;
@@ -63,7 +63,7 @@ enum {
 };
 
 struct c4iw_create_qp_resp_v0 {
-	struct ibv_create_qp_resp ibv_resp;
+	struct ib_uverbs_create_qp_resp ibv_resp;
 	__u64 sq_key;
 	__u64 rq_key;
 	__u64 sq_db_gts_key;
@@ -78,7 +78,7 @@ struct c4iw_create_qp_resp_v0 {
 };
 
 struct c4iw_create_qp_resp {
-	struct ibv_create_qp_resp ibv_resp;
+	struct ib_uverbs_create_qp_resp ibv_resp;
 	__u64 ma_sync_key;
 	__u64 sq_key;
 	__u64 rq_key;
diff --git a/providers/cxgb4/verbs.c b/providers/cxgb4/verbs.c
index 251a337d2b4183..9a7fa3cf61fc32 100644
--- a/providers/cxgb4/verbs.c
+++ b/providers/cxgb4/verbs.c
@@ -113,7 +113,7 @@ static struct ibv_mr *__c4iw_reg_mr(struct ibv_pd *pd, void *addr,
 {
 	struct c4iw_mr *mhp;
 	struct ibv_reg_mr cmd;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 	struct c4iw_dev *dev = to_c4iw_dev(pd->context->device);
 
 	mhp = malloc(sizeof *mhp);
@@ -245,7 +245,7 @@ int c4iw_resize_cq(struct ibv_cq *ibcq, int cqe)
 	int ret;
 
 	struct ibv_resize_cq cmd;
-	struct ibv_resize_cq_resp resp;
+	struct ib_uverbs_resize_cq_resp resp;
 	ret = ibv_cmd_resize_cq(ibcq, cqe, &cmd, sizeof cmd, &resp, sizeof resp);
 	PDBG("%s ret %d\n", __func__, ret);
 	return ret;
diff --git a/providers/hfi1verbs/hfi-abi.h b/providers/hfi1verbs/hfi-abi.h
index 2df637d00db76d..edf05e820ff1fa 100644
--- a/providers/hfi1verbs/hfi-abi.h
+++ b/providers/hfi1verbs/hfi-abi.h
@@ -60,27 +60,27 @@
 #include <infiniband/kern-abi.h>
 
 struct hfi1_get_context_resp {
-	struct ibv_get_context_resp	ibv_resp;
+	struct ib_uverbs_get_context_resp	ibv_resp;
 	__u32				version;
 };
 
 struct hfi1_create_cq_resp {
-	struct ibv_create_cq_resp	ibv_resp;
+	struct ib_uverbs_create_cq_resp	ibv_resp;
 	__u64				offset;
 };
 
 struct hfi1_resize_cq_resp {
-	struct ibv_resize_cq_resp	ibv_resp;
+	struct ib_uverbs_resize_cq_resp	ibv_resp;
 	__u64				offset;
 };
 
 struct hfi1_create_qp_resp {
-	struct ibv_create_qp_resp	ibv_resp;
+	struct ib_uverbs_create_qp_resp	ibv_resp;
 	__u64				offset;
 };
 
 struct hfi1_create_srq_resp {
-	struct ibv_create_srq_resp	ibv_resp;
+	struct ib_uverbs_create_srq_resp	ibv_resp;
 	__u64				offset;
 };
 
diff --git a/providers/hfi1verbs/hfiverbs.c b/providers/hfi1verbs/hfiverbs.c
index e9d3261f599e3f..d46ad8666abc31 100644
--- a/providers/hfi1verbs/hfiverbs.c
+++ b/providers/hfi1verbs/hfiverbs.c
@@ -141,7 +141,7 @@ static struct verbs_context *hfi1_alloc_context(struct ibv_device *ibdev,
 {
 	struct hfi1_context	    *context;
 	struct ibv_get_context       cmd;
-	struct ibv_get_context_resp  resp;
+	struct ib_uverbs_get_context_resp  resp;
 	struct hfi1_device         *dev;
 
 	context = verbs_init_and_alloc_context(ibdev, cmd_fd, context, ibv_ctx);
diff --git a/providers/hfi1verbs/verbs.c b/providers/hfi1verbs/verbs.c
index 145708d7b4ba7a..8e616b8b2198b8 100644
--- a/providers/hfi1verbs/verbs.c
+++ b/providers/hfi1verbs/verbs.c
@@ -101,7 +101,7 @@ int hfi1_query_port(struct ibv_context *context, uint8_t port,
 struct ibv_pd *hfi1_alloc_pd(struct ibv_context *context)
 {
 	struct ibv_alloc_pd	  cmd;
-	struct ibv_alloc_pd_resp  resp;
+	struct ib_uverbs_alloc_pd_resp  resp;
 	struct ibv_pd		 *pd;
 
 	pd = malloc(sizeof *pd);
@@ -134,7 +134,7 @@ struct ibv_mr *hfi1_reg_mr(struct ibv_pd *pd, void *addr,
 {
 	struct ibv_mr *mr;
 	struct ibv_reg_mr cmd;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 	int ret;
 
 	mr = malloc(sizeof *mr);
@@ -206,7 +206,7 @@ struct ibv_cq *hfi1_create_cq_v1(struct ibv_context *context, int cqe,
 {
 	struct ibv_cq		   *cq;
 	struct ibv_create_cq	    cmd;
-	struct ibv_create_cq_resp   resp;
+	struct ib_uverbs_create_cq_resp   resp;
 	int			    ret;
 
 	cq = malloc(sizeof *cq);
@@ -257,7 +257,7 @@ int hfi1_resize_cq(struct ibv_cq *ibcq, int cqe)
 int hfi1_resize_cq_v1(struct ibv_cq *ibcq, int cqe)
 {
 	struct ibv_resize_cq		cmd;
-	struct ibv_resize_cq_resp	resp;
+	struct ib_uverbs_resize_cq_resp	resp;
 
 	return ibv_cmd_resize_cq(ibcq, cqe, &cmd, sizeof cmd,
 				 &resp, sizeof resp);
@@ -364,7 +364,7 @@ struct ibv_qp *hfi1_create_qp_v1(struct ibv_pd *pd,
 				  struct ibv_qp_init_attr *attr)
 {
 	struct ibv_create_qp	     cmd;
-	struct ibv_create_qp_resp    resp;
+	struct ib_uverbs_create_qp_resp    resp;
 	struct ibv_qp		    *qp;
 	int			     ret;
 
@@ -561,7 +561,7 @@ struct ibv_srq *hfi1_create_srq_v1(struct ibv_pd *pd,
 {
 	struct ibv_srq *srq;
 	struct ibv_create_srq cmd;
-	struct ibv_create_srq_resp resp;
+	struct ib_uverbs_create_srq_resp resp;
 	int ret;
 
 	srq = malloc(sizeof *srq);
diff --git a/providers/hns/hns_roce_u_abi.h b/providers/hns/hns_roce_u_abi.h
index 2a57f464ac6798..251a5c920a3557 100644
--- a/providers/hns/hns_roce_u_abi.h
+++ b/providers/hns/hns_roce_u_abi.h
@@ -36,12 +36,12 @@
 #include <infiniband/kern-abi.h>
 
 struct hns_roce_alloc_ucontext_resp {
-	struct ibv_get_context_resp	ibv_resp;
+	struct ib_uverbs_get_context_resp	ibv_resp;
 	__u32				qp_tab_size;
 };
 
 struct hns_roce_alloc_pd_resp {
-	struct ibv_alloc_pd_resp	ibv_resp;
+	struct ib_uverbs_alloc_pd_resp	ibv_resp;
 	__u32				pdn;
 	__u32				reserved;
 };
@@ -53,7 +53,7 @@ struct hns_roce_create_cq {
 };
 
 struct hns_roce_create_cq_resp {
-	struct ibv_create_cq_resp	ibv_resp;
+	struct ib_uverbs_create_cq_resp	ibv_resp;
 	__u32				cqn;
 	__u32				reserved;
 };
diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c
index 3def78d25a9a71..11390de0efd366 100644
--- a/providers/hns/hns_roce_u_verbs.c
+++ b/providers/hns/hns_roce_u_verbs.c
@@ -124,7 +124,7 @@ struct ibv_mr *hns_roce_u_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 	int ret;
 	struct ibv_mr *mr;
 	struct ibv_reg_mr cmd;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 
 	if (!addr) {
 		fprintf(stderr, "2nd parm addr is NULL!\n");
@@ -154,7 +154,7 @@ int hns_roce_u_rereg_mr(struct ibv_mr *mr, int flags, struct ibv_pd *pd,
 			void *addr, size_t length, int access)
 {
 	struct ibv_rereg_mr cmd;
-	struct ibv_rereg_mr_resp resp;
+	struct ib_uverbs_rereg_mr_resp resp;
 
 	return ibv_cmd_rereg_mr(mr, flags, addr, length, (uintptr_t)addr,
 				access, pd, &cmd, sizeof(cmd), &resp,
@@ -502,7 +502,7 @@ struct ibv_qp *hns_roce_u_create_qp(struct ibv_pd *pd,
 	int ret;
 	struct hns_roce_qp *qp = NULL;
 	struct hns_roce_create_qp cmd;
-	struct ibv_create_qp_resp resp;
+	struct ib_uverbs_create_qp_resp resp;
 	struct hns_roce_context *context = to_hr_ctx(pd->context);
 	unsigned int sge_ex_count;
 
diff --git a/providers/i40iw/i40iw-abi.h b/providers/i40iw/i40iw-abi.h
index df2df07659c022..8b35a8decfb9cf 100644
--- a/providers/i40iw/i40iw-abi.h
+++ b/providers/i40iw/i40iw-abi.h
@@ -47,7 +47,7 @@ struct i40iw_get_context {
 };
 
 struct i40iw_ualloc_ucontext_resp {
-	struct ibv_get_context_resp ibv_resp;
+	struct ib_uverbs_get_context_resp ibv_resp;
 	__u32 max_pds;		/* maximum pds allowed for this user process */
 	__u32 max_qps;		/* maximum qps allowed for this user process */
 	__u32 wq_size;		/* defines the size of the WQs (sq+rq) allocated to the mmaped area */
@@ -56,7 +56,7 @@ struct i40iw_ualloc_ucontext_resp {
 };
 
 struct i40iw_ualloc_pd_resp {
-	struct ibv_alloc_pd_resp ibv_resp;
+	struct ib_uverbs_alloc_pd_resp ibv_resp;
 	__u32 pd_id;
 	__u8 reserved[4];
 };
@@ -67,7 +67,7 @@ struct i40iw_ucreate_cq {
 };
 
 struct i40iw_ucreate_cq_resp {
-	struct ibv_create_cq_resp ibv_resp;
+	struct ib_uverbs_create_cq_resp ibv_resp;
 	__u32 cq_id;
 	__u32 cq_size;
 	__u32 mmap_db_index;
@@ -95,7 +95,7 @@ struct i40iw_ucreate_qp {
 };
 
 struct i40iw_ucreate_qp_resp {
-	struct ibv_create_qp_resp ibv_resp;
+	struct ib_uverbs_create_qp_resp ibv_resp;
 	__u32 qp_id;
 	__u32 actual_sq_size;
 	__u32 actual_rq_size;
diff --git a/providers/i40iw/i40iw_uverbs.c b/providers/i40iw/i40iw_uverbs.c
index 851f1cdf4d9f9a..7cde44577985a3 100644
--- a/providers/i40iw/i40iw_uverbs.c
+++ b/providers/i40iw/i40iw_uverbs.c
@@ -153,7 +153,7 @@ struct ibv_mr *i40iw_ureg_mr(struct ibv_pd *pd, void *addr, size_t length, int a
 {
 	struct ibv_mr *mr;
 	struct i40iw_ureg_mr cmd;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 
 	mr = malloc(sizeof(*mr));
 	if (!mr)
@@ -218,7 +218,7 @@ struct ibv_cq *i40iw_ucreate_cq(struct ibv_context *context, int cqe,
 
 	struct i40iw_ureg_mr reg_mr_cmd;
 
-	struct ibv_reg_mr_resp reg_mr_resp;
+	struct ib_uverbs_reg_mr_resp reg_mr_resp;
 
 	if (cqe > I40IW_MAX_CQ_SIZE)
 		return NULL;
@@ -502,7 +502,7 @@ static int i40iw_vmapped_qp(struct i40iw_uqp *iwuqp, struct ibv_pd *pd,
 	int ret;
 	struct i40iw_ureg_mr reg_mr_cmd;
 	u32 sq_pages, rq_pages;
-	struct ibv_reg_mr_resp reg_mr_resp;
+	struct ib_uverbs_reg_mr_resp reg_mr_resp;
 
 	memset(&reg_mr_cmd, 0, sizeof(reg_mr_cmd));
 	sqsize = sqdepth * I40IW_QP_WQE_MIN_SIZE;
diff --git a/providers/ipathverbs/ipath-abi.h b/providers/ipathverbs/ipath-abi.h
index bd3cde23eacfe9..2b2e3290c5b233 100644
--- a/providers/ipathverbs/ipath-abi.h
+++ b/providers/ipathverbs/ipath-abi.h
@@ -40,27 +40,27 @@
 #include <infiniband/kern-abi.h>
 
 struct ipath_get_context_resp {
-	struct ibv_get_context_resp	ibv_resp;
+	struct ib_uverbs_get_context_resp	ibv_resp;
 	__u32				version;
 };
 
 struct ipath_create_cq_resp {
-	struct ibv_create_cq_resp	ibv_resp;
+	struct ib_uverbs_create_cq_resp	ibv_resp;
 	__u64				offset;
 };
 
 struct ipath_resize_cq_resp {
-	struct ibv_resize_cq_resp	ibv_resp;
+	struct ib_uverbs_resize_cq_resp	ibv_resp;
 	__u64				offset;
 };
 
 struct ipath_create_qp_resp {
-	struct ibv_create_qp_resp	ibv_resp;
+	struct ib_uverbs_create_qp_resp	ibv_resp;
 	__u64				offset;
 };
 
 struct ipath_create_srq_resp {
-	struct ibv_create_srq_resp	ibv_resp;
+	struct ib_uverbs_create_srq_resp	ibv_resp;
 	__u64				offset;
 };
 
diff --git a/providers/ipathverbs/ipathverbs.c b/providers/ipathverbs/ipathverbs.c
index f2c96187d8cb5d..00d84b7f84a855 100644
--- a/providers/ipathverbs/ipathverbs.c
+++ b/providers/ipathverbs/ipathverbs.c
@@ -140,7 +140,7 @@ static struct verbs_context *ipath_alloc_context(struct ibv_device *ibdev,
 {
 	struct ipath_context	    *context;
 	struct ibv_get_context       cmd;
-	struct ibv_get_context_resp  resp;
+	struct ib_uverbs_get_context_resp  resp;
 	struct ipath_device         *dev;
 
 	context = verbs_init_and_alloc_context(ibdev, cmd_fd, context, ibv_ctx);
diff --git a/providers/ipathverbs/verbs.c b/providers/ipathverbs/verbs.c
index b81a98253fa639..e0b247bf337583 100644
--- a/providers/ipathverbs/verbs.c
+++ b/providers/ipathverbs/verbs.c
@@ -81,7 +81,7 @@ int ipath_query_port(struct ibv_context *context, uint8_t port,
 struct ibv_pd *ipath_alloc_pd(struct ibv_context *context)
 {
 	struct ibv_alloc_pd	  cmd;
-	struct ibv_alloc_pd_resp  resp;
+	struct ib_uverbs_alloc_pd_resp  resp;
 	struct ibv_pd		 *pd;
 
 	pd = malloc(sizeof *pd);
@@ -114,7 +114,7 @@ struct ibv_mr *ipath_reg_mr(struct ibv_pd *pd, void *addr,
 {
 	struct ibv_mr *mr;
 	struct ibv_reg_mr cmd;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 	int ret;
 
 	mr = malloc(sizeof *mr);
@@ -184,7 +184,7 @@ struct ibv_cq *ipath_create_cq_v1(struct ibv_context *context, int cqe,
 {
 	struct ibv_cq		   *cq;
 	struct ibv_create_cq	    cmd;
-	struct ibv_create_cq_resp   resp;
+	struct ib_uverbs_create_cq_resp   resp;
 	int			    ret;
 
 	cq = malloc(sizeof *cq);
@@ -234,7 +234,7 @@ int ipath_resize_cq(struct ibv_cq *ibcq, int cqe)
 int ipath_resize_cq_v1(struct ibv_cq *ibcq, int cqe)
 {
 	struct ibv_resize_cq		cmd;
-	struct ibv_resize_cq_resp	resp;
+	struct ib_uverbs_resize_cq_resp	resp;
 
 	return ibv_cmd_resize_cq(ibcq, cqe, &cmd, sizeof cmd,
 				 &resp, sizeof resp);
@@ -341,7 +341,7 @@ struct ibv_qp *ipath_create_qp_v1(struct ibv_pd *pd,
 				  struct ibv_qp_init_attr *attr)
 {
 	struct ibv_create_qp	     cmd;
-	struct ibv_create_qp_resp    resp;
+	struct ib_uverbs_create_qp_resp    resp;
 	struct ibv_qp		    *qp;
 	int			     ret;
 
@@ -537,7 +537,7 @@ struct ibv_srq *ipath_create_srq_v1(struct ibv_pd *pd,
 {
 	struct ibv_srq *srq;
 	struct ibv_create_srq cmd;
-	struct ibv_create_srq_resp resp;
+	struct ib_uverbs_create_srq_resp resp;
 	int ret;
 
 	srq = malloc(sizeof *srq);
diff --git a/providers/mlx4/mlx4-abi.h b/providers/mlx4/mlx4-abi.h
index c4783d29e19cee..5f8ce28d70713d 100644
--- a/providers/mlx4/mlx4-abi.h
+++ b/providers/mlx4/mlx4-abi.h
@@ -45,7 +45,7 @@ enum {
 };
 
 struct mlx4_alloc_ucontext_resp_v3 {
-	struct ibv_get_context_resp	ibv_resp;
+	struct ib_uverbs_get_context_resp	ibv_resp;
 	__u32				qp_tab_size;
 	__u16				bf_reg_size;
 	__u16				bf_regs_per_page;
@@ -56,7 +56,7 @@ enum mlx4_query_dev_ex_resp_mask {
 };
 
 struct mlx4_alloc_ucontext_resp {
-	struct ibv_get_context_resp	ibv_resp;
+	struct ib_uverbs_get_context_resp	ibv_resp;
 	__u32				dev_caps;
 	__u32				qp_tab_size;
 	__u16				bf_reg_size;
@@ -65,7 +65,7 @@ struct mlx4_alloc_ucontext_resp {
 };
 
 struct mlx4_alloc_pd_resp {
-	struct ibv_alloc_pd_resp	ibv_resp;
+	struct ib_uverbs_alloc_pd_resp	ibv_resp;
 	__u32				pdn;
 	__u32				reserved;
 };
@@ -77,7 +77,7 @@ struct mlx4_create_cq {
 };
 
 struct mlx4_create_cq_resp {
-	struct ibv_create_cq_resp	ibv_resp;
+	struct ib_uverbs_create_cq_resp	ibv_resp;
 	__u32				cqn;
 	__u32				reserved;
 };
@@ -89,7 +89,7 @@ struct mlx4_create_cq_ex {
 };
 
 struct mlx4_create_cq_resp_ex {
-	struct ibv_create_cq_resp_ex	ibv_resp;
+	struct ib_uverbs_ex_create_cq_resp	ibv_resp;
 	__u32				cqn;
 	__u32				reserved;
 };
@@ -131,7 +131,7 @@ struct mlx4_create_xsrq {
 };
 
 struct mlx4_create_srq_resp {
-	struct ibv_create_srq_resp	ibv_resp;
+	struct ib_uverbs_create_srq_resp	ibv_resp;
 	__u32				srqn;
 	__u32				reserved;
 };
@@ -176,7 +176,7 @@ struct mlx4_create_qp_ex {
 };
 
 struct mlx4_create_qp_resp_ex {
-	struct ibv_create_qp_resp_ex	ibv_resp;
+	struct ib_uverbs_ex_create_qp_resp	ibv_resp;
 };
 
 struct mlx4_drv_create_wq {
diff --git a/providers/mlx4/verbs.c b/providers/mlx4/verbs.c
index c525aeb0b89ea8..879af38f71dffe 100644
--- a/providers/mlx4/verbs.c
+++ b/providers/mlx4/verbs.c
@@ -235,7 +235,7 @@ struct ibv_xrcd *mlx4_open_xrcd(struct ibv_context *context,
 				struct ibv_xrcd_init_attr *attr)
 {
 	struct ibv_open_xrcd cmd;
-	struct ibv_open_xrcd_resp resp;
+	struct ib_uverbs_close_xrcd resp;
 	struct verbs_xrcd *xrcd;
 	int ret;
 
@@ -273,7 +273,7 @@ struct ibv_mr *mlx4_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 {
 	struct ibv_mr *mr;
 	struct ibv_reg_mr cmd;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 	int ret;
 
 	mr = malloc(sizeof *mr);
@@ -297,7 +297,7 @@ int mlx4_rereg_mr(struct ibv_mr *mr,
 		  size_t length, int access)
 {
 	struct ibv_rereg_mr cmd;
-	struct ibv_rereg_mr_resp resp;
+	struct ib_uverbs_rereg_mr_resp resp;
 
 	if (flags & IBV_REREG_MR_KEEP_VALID)
 		return ENOTSUP;
@@ -325,7 +325,7 @@ struct ibv_mw *mlx4_alloc_mw(struct ibv_pd *pd, enum ibv_mw_type type)
 {
 	struct ibv_mw *mw;
 	struct ibv_alloc_mw cmd;
-	struct ibv_alloc_mw_resp resp;
+	struct ib_uverbs_alloc_mw_resp resp;
 	int ret;
 
 	mw = calloc(1, sizeof(*mw));
@@ -588,7 +588,7 @@ int mlx4_resize_cq(struct ibv_cq *ibcq, int cqe)
 {
 	struct mlx4_cq *cq = to_mcq(ibcq);
 	struct mlx4_resize_cq cmd;
-	struct ibv_resize_cq_resp resp;
+	struct ib_uverbs_resize_cq_resp resp;
 	struct mlx4_buf buf;
 	int old_cqe, outst_cqe, ret;
 
@@ -863,7 +863,7 @@ static struct ibv_qp *create_qp_ex(struct ibv_context *context,
 {
 	struct mlx4_context *ctx = to_mctx(context);
 	struct mlx4_create_qp     cmd = {};
-	struct ibv_create_qp_resp resp = {};
+	struct ib_uverbs_create_qp_resp resp = {};
 	struct mlx4_qp		 *qp;
 	int			  ret;
 
@@ -1042,7 +1042,7 @@ struct ibv_qp *mlx4_create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr)
 struct ibv_qp *mlx4_open_qp(struct ibv_context *context, struct ibv_qp_open_attr *attr)
 {
 	struct ibv_open_qp cmd;
-	struct ibv_create_qp_resp resp;
+	struct ib_uverbs_create_qp_resp resp;
 	struct mlx4_qp *qp;
 	int ret;
 
@@ -1398,7 +1398,7 @@ struct ibv_wq *mlx4_create_wq(struct ibv_context *context,
 {
 	struct mlx4_context		*ctx = to_mctx(context);
 	struct mlx4_create_wq		cmd = {};
-	struct ibv_create_wq_resp	resp = {};
+	struct ib_uverbs_ex_create_wq_resp	resp = {};
 	struct mlx4_qp			*qp;
 	int				ret;
 
@@ -1600,7 +1600,7 @@ struct ibv_rwq_ind_table *mlx4_create_rwq_ind_table(struct ibv_context *context,
 						    struct ibv_rwq_ind_table_init_attr *init_attr)
 {
 	struct ibv_create_rwq_ind_table *cmd;
-	struct ibv_create_rwq_ind_table_resp resp = {};
+	struct ib_uverbs_ex_create_rwq_ind_table_resp resp = {};
 	struct ibv_rwq_ind_table *ind_table;
 	uint32_t required_tbl_size;
 	unsigned int num_tbl_entries;
diff --git a/providers/mlx5/mlx5-abi.h b/providers/mlx5/mlx5-abi.h
index 7b964290d4e669..0f2db819889cf9 100644
--- a/providers/mlx5/mlx5-abi.h
+++ b/providers/mlx5/mlx5-abi.h
@@ -82,7 +82,7 @@ enum mlx5_ib_alloc_ucontext_resp_mask {
 };
 
 struct mlx5_alloc_ucontext_resp {
-	struct ibv_get_context_resp	ibv_resp;
+	struct ib_uverbs_get_context_resp	ibv_resp;
 	__u32				qp_tab_size;
 	__u32				bf_reg_size;
 	__u32				tot_uuars;
@@ -114,7 +114,7 @@ struct mlx5_create_ah_resp {
 };
 
 struct mlx5_alloc_pd_resp {
-	struct ibv_alloc_pd_resp	ibv_resp;
+	struct ib_uverbs_alloc_pd_resp	ibv_resp;
 	__u32				pdn;
 };
 
@@ -133,7 +133,7 @@ struct mlx5_create_cq {
 };
 
 struct mlx5_create_cq_resp {
-	struct ibv_create_cq_resp	ibv_resp;
+	struct ib_uverbs_create_cq_resp	ibv_resp;
 	__u32				cqn;
 };
 
@@ -145,7 +145,7 @@ struct mlx5_create_srq {
 };
 
 struct mlx5_create_srq_resp {
-	struct ibv_create_srq_resp	ibv_resp;
+	struct ib_uverbs_create_srq_resp	ibv_resp;
 	__u32				srqn;
 	__u32				reserved;
 };
@@ -190,7 +190,7 @@ struct mlx5_create_qp_ex_rss {
 };
 
 struct mlx5_create_qp_resp_ex {
-	struct ibv_create_qp_resp_ex	ibv_resp;
+	struct ib_uverbs_ex_create_qp_resp	ibv_resp;
 	__u32				uuar_index;
 	__u32				reserved;
 };
@@ -210,7 +210,7 @@ struct mlx5_create_qp {
 };
 
 struct mlx5_create_qp_resp {
-	struct ibv_create_qp_resp	ibv_resp;
+	struct ib_uverbs_create_qp_resp	ibv_resp;
 	__u32				uuar_index;
 };
 
@@ -237,7 +237,7 @@ struct mlx5_create_wq {
 };
 
 struct mlx5_create_wq_resp {
-	struct ibv_create_wq_resp	ibv_resp;
+	struct ib_uverbs_ex_create_wq_resp	ibv_resp;
 	__u32			response_length;
 	__u32			reserved;
 };
@@ -249,7 +249,7 @@ struct mlx5_modify_wq {
 };
 
 struct mlx5_create_rwq_ind_table_resp {
-	struct ibv_create_rwq_ind_table_resp ibv_resp;
+	struct ib_uverbs_ex_create_rwq_ind_table_resp ibv_resp;
 };
 
 struct mlx5_destroy_rwq_ind_table {
@@ -265,7 +265,7 @@ struct mlx5_resize_cq {
 };
 
 struct mlx5_resize_cq_resp {
-	struct ibv_resize_cq_resp	ibv_resp;
+	struct ib_uverbs_resize_cq_resp	ibv_resp;
 };
 
 struct mlx5_query_device_ex {
diff --git a/providers/mlx5/verbs.c b/providers/mlx5/verbs.c
index fb80561bdb242b..5f62a2b24eba81 100644
--- a/providers/mlx5/verbs.c
+++ b/providers/mlx5/verbs.c
@@ -373,7 +373,7 @@ struct ibv_mr *mlx5_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 	struct ibv_reg_mr cmd;
 	int ret;
 	enum ibv_access_flags access = (enum ibv_access_flags)acc;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 
 	mr = calloc(1, sizeof(*mr));
 	if (!mr)
@@ -396,7 +396,7 @@ int mlx5_rereg_mr(struct ibv_mr *ibmr, int flags, struct ibv_pd *pd, void *addr,
 		  size_t length, int access)
 {
 	struct ibv_rereg_mr cmd;
-	struct ibv_rereg_mr_resp resp;
+	struct ib_uverbs_rereg_mr_resp resp;
 
 	if (flags & IBV_REREG_MR_KEEP_VALID)
 		return ENOTSUP;
@@ -423,7 +423,7 @@ struct ibv_mw *mlx5_alloc_mw(struct ibv_pd *pd, enum ibv_mw_type type)
 {
 	struct ibv_mw *mw;
 	struct ibv_alloc_mw cmd;
-	struct ibv_alloc_mw_resp resp;
+	struct ib_uverbs_alloc_mw_resp resp;
 	int ret;
 
 	mw = malloc(sizeof(*mw));
@@ -1875,7 +1875,7 @@ int mlx5_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 {
 	struct ibv_modify_qp cmd = {};
 	struct ibv_modify_qp_ex cmd_ex = {};
-	struct ibv_modify_qp_resp_ex resp = {};
+	struct ib_uverbs_ex_modify_qp_resp resp = {};
 	struct mlx5_qp *mqp = to_mqp(qp);
 	struct mlx5_context *context = to_mctx(qp->context);
 	int ret;
@@ -2106,7 +2106,7 @@ mlx5_open_xrcd(struct ibv_context *context,
 	int err;
 	struct verbs_xrcd *xrcd;
 	struct ibv_open_xrcd cmd = {};
-	struct ibv_open_xrcd_resp resp = {};
+	struct ib_uverbs_close_xrcd resp = {};
 
 	xrcd = calloc(1, sizeof(*xrcd));
 	if (!xrcd)
diff --git a/providers/mthca/mthca-abi.h b/providers/mthca/mthca-abi.h
index 4fbd98bc08c3bc..396480f267d16a 100644
--- a/providers/mthca/mthca-abi.h
+++ b/providers/mthca/mthca-abi.h
@@ -39,13 +39,13 @@
 #define MTHCA_UVERBS_ABI_VERSION	1
 
 struct mthca_alloc_ucontext_resp {
-	struct ibv_get_context_resp	ibv_resp;
+	struct ib_uverbs_get_context_resp	ibv_resp;
 	__u32				qp_tab_size;
 	__u32				uarc_size;
 };
 
 struct mthca_alloc_pd_resp {
-	struct ibv_alloc_pd_resp	ibv_resp;
+	struct ib_uverbs_alloc_pd_resp	ibv_resp;
 	__u32				pdn;
 	__u32				reserved;
 };
@@ -72,7 +72,7 @@ struct mthca_create_cq {
 };
 
 struct mthca_create_cq_resp {
-	struct ibv_create_cq_resp	ibv_resp;
+	struct ib_uverbs_create_cq_resp	ibv_resp;
 	__u32				cqn;
 	__u32				reserved;
 };
@@ -91,7 +91,7 @@ struct mthca_create_srq {
 };
 
 struct mthca_create_srq_resp {
-	struct ibv_create_srq_resp	ibv_resp;
+	struct ib_uverbs_create_srq_resp	ibv_resp;
 	__u32				srqn;
 	__u32				reserved;
 };
diff --git a/providers/mthca/verbs.c b/providers/mthca/verbs.c
index 33024be2e750d3..df132576865a05 100644
--- a/providers/mthca/verbs.c
+++ b/providers/mthca/verbs.c
@@ -119,7 +119,7 @@ static struct ibv_mr *__mthca_reg_mr(struct ibv_pd *pd, void *addr,
 {
 	struct ibv_mr *mr;
 	struct mthca_reg_mr cmd;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 	int ret;
 
 	/*
@@ -275,7 +275,7 @@ int mthca_resize_cq(struct ibv_cq *ibcq, int cqe)
 	struct mthca_resize_cq cmd;
 	struct ibv_mr *mr;
 	struct mthca_buf buf;
-	struct ibv_resize_cq_resp resp;
+	struct ib_uverbs_resize_cq_resp resp;
 	int old_cqe;
 	int ret;
 
@@ -490,7 +490,7 @@ int mthca_destroy_srq(struct ibv_srq *srq)
 struct ibv_qp *mthca_create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr)
 {
 	struct mthca_create_qp    cmd;
-	struct ibv_create_qp_resp resp;
+	struct ib_uverbs_create_qp_resp resp;
 	struct mthca_qp          *qp;
 	int                       ret;
 
diff --git a/providers/nes/nes-abi.h b/providers/nes/nes-abi.h
index f363f95e809b9d..3c3362a2ec5faf 100644
--- a/providers/nes/nes-abi.h
+++ b/providers/nes/nes-abi.h
@@ -48,7 +48,7 @@ struct nes_get_context {
 
 
 struct nes_ualloc_ucontext_resp {
-	struct ibv_get_context_resp ibv_resp;
+	struct ib_uverbs_get_context_resp ibv_resp;
 	__u32 max_pds; 	/* maximum pds allowed for this user process */
 	__u32 max_qps; 	/* maximum qps allowed for this user process */
 	__u32 wq_size; 	/* defines the size of the WQs (sq+rq) allocated to the mmaped area */
@@ -58,7 +58,7 @@ struct nes_ualloc_ucontext_resp {
 };
 
 struct nes_ualloc_pd_resp {
-	struct ibv_alloc_pd_resp ibv_resp;
+	struct ib_uverbs_alloc_pd_resp ibv_resp;
 	__u32 pd_id;
 	__u32 db_index;
 };
@@ -71,7 +71,7 @@ struct nes_ucreate_cq {
 };
 
 struct nes_ucreate_cq_resp {
-	struct ibv_create_cq_resp ibv_resp;
+	struct ib_uverbs_create_cq_resp ibv_resp;
 	__u32 cq_id;
 	__u32 cq_size;
 	__u32 mmap_db_index;
@@ -97,7 +97,7 @@ struct nes_ucreate_qp {
 };
 
 struct nes_ucreate_qp_resp {
-	struct ibv_create_qp_resp ibv_resp;
+	struct ib_uverbs_create_qp_resp ibv_resp;
 	__u32 qp_id;
 	__u32 actual_sq_size;
 	__u32 actual_rq_size;
diff --git a/providers/nes/nes_uverbs.c b/providers/nes/nes_uverbs.c
index 7817ccf6e75b38..a3bd65f6c743f6 100644
--- a/providers/nes/nes_uverbs.c
+++ b/providers/nes/nes_uverbs.c
@@ -170,7 +170,7 @@ struct ibv_mr *nes_ureg_mr(struct ibv_pd *pd, void *addr,
 {
 	struct ibv_mr *mr;
 	struct nes_ureg_mr cmd;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 
 	mr = malloc(sizeof *mr);
 	if (!mr)
@@ -212,7 +212,7 @@ struct ibv_cq *nes_ucreate_cq(struct ibv_context *context, int cqe,
 {
 	struct nes_ucq *nesucq;
 	struct nes_ureg_mr reg_mr_cmd;
-	struct ibv_reg_mr_resp reg_mr_resp;
+	struct ib_uverbs_reg_mr_resp reg_mr_resp;
 	struct nes_ucreate_cq cmd;
 	struct nes_ucreate_cq_resp resp;
 	int ret;
@@ -937,7 +937,7 @@ static int nes_vmapped_qp(struct nes_uqp *nesuqp, struct ibv_pd *pd, struct ibv_
 {
 	struct nes_ucreate_qp cmd;
 	struct nes_ureg_mr reg_mr_cmd;
-        struct ibv_reg_mr_resp reg_mr_resp;
+	struct ib_uverbs_reg_mr_resp reg_mr_resp;
 	int totalqpsize;
 	int ret;
 
diff --git a/providers/ocrdma/ocrdma_abi.h b/providers/ocrdma/ocrdma_abi.h
index e43e30aa7817d0..f45707632a5a7f 100644
--- a/providers/ocrdma/ocrdma_abi.h
+++ b/providers/ocrdma/ocrdma_abi.h
@@ -66,7 +66,7 @@ struct ocrdma_get_context {
 };
 
 struct ocrdma_alloc_ucontext_resp {
-	struct ibv_get_context_resp ibv_resp;
+	struct ib_uverbs_get_context_resp ibv_resp;
 	uint32_t dev_id;
 	uint32_t wqe_size;
 	uint32_t max_inline_data;
@@ -85,7 +85,7 @@ struct ocrdma_alloc_pd_req {
 };
 
 struct ocrdma_alloc_pd_resp {
-	struct ibv_alloc_pd_resp ibv_resp;
+	struct ib_uverbs_alloc_pd_resp ibv_resp;
 	uint32_t id;
 	uint32_t dpp_enabled;
 	uint32_t dpp_page_addr_hi;
@@ -101,7 +101,7 @@ struct ocrdma_create_cq_req {
 
 #define MAX_CQ_PAGES 8
 struct ocrdma_create_cq_resp {
-	struct ibv_create_cq_resp ibv_resp;
+	struct ib_uverbs_create_cq_resp ibv_resp;
 	uint32_t cq_id;
 	uint32_t size;
 	uint32_t num_pages;
@@ -119,7 +119,7 @@ struct ocrdma_reg_mr {
 };
 
 struct ocrdma_reg_mr_resp {
-	struct ibv_reg_mr_resp ibv_resp;
+	struct ib_uverbs_reg_mr_resp ibv_resp;
 };
 
 struct ocrdma_create_qp_cmd {
@@ -134,7 +134,7 @@ struct ocrdma_create_qp_cmd {
 #define MAX_UD_HDR_PAGES 8
 
 struct ocrdma_create_qp_uresp {
-	struct ibv_create_qp_resp ibv_resp;
+	struct ib_uverbs_create_qp_resp ibv_resp;
 	uint16_t qp_id;
 	uint16_t sq_dbid;
 	uint16_t rq_dbid;
@@ -162,7 +162,7 @@ struct ocrdma_create_srq_cmd {
 };
 
 struct ocrdma_create_srq_resp {
-	struct ibv_create_srq_resp ibv_resp;
+	struct ib_uverbs_create_srq_resp ibv_resp;
 	uint16_t rq_dbid;
 	uint16_t resv0;
 	uint32_t resv1;
diff --git a/providers/ocrdma/ocrdma_verbs.c b/providers/ocrdma/ocrdma_verbs.c
index 6f140c33dbe509..5b8da32b1bdcdd 100644
--- a/providers/ocrdma/ocrdma_verbs.c
+++ b/providers/ocrdma/ocrdma_verbs.c
@@ -308,7 +308,7 @@ int ocrdma_resize_cq(struct ibv_cq *ibcq, int new_entries)
 {
 	int status;
 	struct ibv_resize_cq cmd;
-	struct ibv_resize_cq_resp resp;
+	struct ib_uverbs_resize_cq_resp resp;
 	status = ibv_cmd_resize_cq(ibcq, new_entries,
 				   &cmd, sizeof cmd, &resp, sizeof resp);
 	if (status == 0)
diff --git a/providers/qedr/qelr_abi.h b/providers/qedr/qelr_abi.h
index a7a0638e9f838e..95c880b6ab80a4 100644
--- a/providers/qedr/qelr_abi.h
+++ b/providers/qedr/qelr_abi.h
@@ -42,7 +42,7 @@ struct qelr_get_context {
 };
 
 struct qelr_alloc_ucontext_resp {
-	struct ibv_get_context_resp ibv_resp;	/* must be first */
+	struct ib_uverbs_get_context_resp ibv_resp;	/* must be first */
 	__u64 db_pa;
 	__u32 db_size;
 
@@ -60,7 +60,7 @@ struct qelr_alloc_pd_req {
 };
 
 struct qelr_alloc_pd_resp {
-	struct ibv_alloc_pd_resp ibv_resp;	/* must be first */
+	struct ib_uverbs_alloc_pd_resp ibv_resp;	/* must be first */
 	__u32 pd_id;
 };
 
@@ -72,7 +72,7 @@ struct qelr_create_cq_req {
 };
 
 struct qelr_create_cq_resp {
-	struct ibv_create_cq_resp ibv_resp;	/* must be first */
+	struct ib_uverbs_create_cq_resp ibv_resp;	/* must be first */
 	__u32 db_offset;
 	__u16 icid;
 };
@@ -82,7 +82,7 @@ struct qelr_reg_mr {
 };
 
 struct qelr_reg_mr_resp {
-	struct ibv_reg_mr_resp ibv_resp;	/* must be first */
+	struct ib_uverbs_reg_mr_resp ibv_resp;	/* must be first */
 };
 
 struct qelr_create_qp_req {
@@ -101,7 +101,7 @@ struct qelr_create_qp_req {
 };
 
 struct qelr_create_qp_resp {
-	struct ibv_create_qp_resp ibv_resp;	/* must be first */
+	struct ib_uverbs_create_qp_resp ibv_resp;	/* must be first */
 
 	__u32 qp_id;
 	__u32 atomic_supported;
diff --git a/providers/rxe/rxe-abi.h b/providers/rxe/rxe-abi.h
index 18e45a38356ccd..72b8438dbf6009 100644
--- a/providers/rxe/rxe-abi.h
+++ b/providers/rxe/rxe-abi.h
@@ -44,28 +44,28 @@ struct mmap_info {
 };
 
 struct rxe_get_context_resp {
-	struct ibv_get_context_resp ibv_resp;
+	struct ib_uverbs_get_context_resp ibv_resp;
 	__u32 version;
 };
 
 struct rxe_create_cq_resp {
-	struct ibv_create_cq_resp ibv_resp;
+	struct ib_uverbs_create_cq_resp ibv_resp;
 	struct mmap_info mi;
 };
 
 struct rxe_resize_cq_resp {
-	struct ibv_resize_cq_resp ibv_resp;
+	struct ib_uverbs_resize_cq_resp ibv_resp;
 	struct mmap_info mi;
 };
 
 struct rxe_create_qp_resp {
-	struct ibv_create_qp_resp ibv_resp;
+	struct ib_uverbs_create_qp_resp ibv_resp;
 	struct mmap_info rq_mi;
 	struct mmap_info sq_mi;
 };
 
 struct rxe_create_srq_resp {
-	struct ibv_create_srq_resp ibv_resp;
+	struct ib_uverbs_create_srq_resp ibv_resp;
 	struct mmap_info mi;
 	__u32 srq_num;
 };
diff --git a/providers/rxe/rxe.c b/providers/rxe/rxe.c
index 2856afc48cc243..ebdef7a73e83a6 100644
--- a/providers/rxe/rxe.c
+++ b/providers/rxe/rxe.c
@@ -97,7 +97,7 @@ static int rxe_query_port(struct ibv_context *context, uint8_t port,
 static struct ibv_pd *rxe_alloc_pd(struct ibv_context *context)
 {
 	struct ibv_alloc_pd cmd;
-	struct ibv_alloc_pd_resp resp;
+	struct ib_uverbs_alloc_pd_resp resp;
 	struct ibv_pd *pd;
 
 	pd = malloc(sizeof *pd);
@@ -128,7 +128,7 @@ static struct ibv_mr *rxe_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 {
 	struct ibv_mr *mr;
 	struct ibv_reg_mr cmd;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 	int ret;
 
 	mr = malloc(sizeof *mr);
@@ -670,7 +670,7 @@ static int post_one_send(struct rxe_qp *qp, struct rxe_wq *sq,
 static int post_send_db(struct ibv_qp *ibqp)
 {
 	struct ibv_post_send cmd;
-	struct ibv_post_send_resp resp;
+	struct ib_uverbs_post_send_resp resp;
 
 	cmd.command	= IB_USER_VERBS_CMD_POST_SEND;
 	cmd.in_words	= sizeof(cmd)/4;
@@ -862,7 +862,7 @@ static struct verbs_context *rxe_alloc_context(struct ibv_device *ibdev,
 {
 	struct rxe_context *context;
 	struct ibv_get_context cmd;
-	struct ibv_get_context_resp resp;
+	struct ib_uverbs_get_context_resp resp;
 
 	context = verbs_init_and_alloc_context(ibdev, cmd_fd, context, ibv_ctx);
 	if (!context)
diff --git a/providers/vmw_pvrdma/pvrdma-abi-fix.h b/providers/vmw_pvrdma/pvrdma-abi-fix.h
index 8ff9d7cececa55..7c028aeb6b7972 100644
--- a/providers/vmw_pvrdma/pvrdma-abi-fix.h
+++ b/providers/vmw_pvrdma/pvrdma-abi-fix.h
@@ -50,12 +50,12 @@
 #include <rdma/vmw_pvrdma-abi.h>
 
 struct user_pvrdma_alloc_ucontext_resp {
-	struct ibv_get_context_resp		ibv_resp;
+	struct ib_uverbs_get_context_resp		ibv_resp;
 	struct pvrdma_alloc_ucontext_resp	udata;
 };
 
 struct user_pvrdma_alloc_pd_resp {
-	struct ibv_alloc_pd_resp	ibv_resp;
+	struct ib_uverbs_alloc_pd_resp	ibv_resp;
 	struct pvrdma_alloc_pd_resp	udata;
 };
 
@@ -65,7 +65,7 @@ struct user_pvrdma_create_cq {
 };
 
 struct user_pvrdma_create_cq_resp {
-	struct ibv_create_cq_resp	ibv_resp;
+	struct ib_uverbs_create_cq_resp	ibv_resp;
 	struct pvrdma_create_cq_resp	udata;
 };
 
@@ -75,7 +75,7 @@ struct user_pvrdma_create_srq {
 };
 
 struct user_pvrdma_create_srq_resp {
-	struct ibv_create_srq_resp	ibv_resp;
+	struct ib_uverbs_create_srq_resp	ibv_resp;
 	struct pvrdma_create_srq_resp	udata;
 };
 
diff --git a/providers/vmw_pvrdma/qp.c b/providers/vmw_pvrdma/qp.c
index 25b4841b2f2a0c..34c8020793c8a1 100644
--- a/providers/vmw_pvrdma/qp.c
+++ b/providers/vmw_pvrdma/qp.c
@@ -108,7 +108,7 @@ struct ibv_srq *pvrdma_create_srq(struct ibv_pd *pd,
 {
 	struct pvrdma_device *dev = to_vdev(pd->context->device);
 	struct user_pvrdma_create_srq cmd;
-	struct ibv_create_srq_resp resp;
+	struct ib_uverbs_create_srq_resp resp;
 	struct pvrdma_srq *srq;
 	int ret;
 
@@ -211,7 +211,7 @@ struct ibv_qp *pvrdma_create_qp(struct ibv_pd *pd,
 {
 	struct pvrdma_device *dev = to_vdev(pd->context->device);
 	struct user_pvrdma_create_qp cmd;
-	struct ibv_create_qp_resp resp;
+	struct ib_uverbs_create_qp_resp resp;
 	struct pvrdma_qp *qp;
 	int ret;
 	int is_srq = !!(attr->srq);
diff --git a/providers/vmw_pvrdma/verbs.c b/providers/vmw_pvrdma/verbs.c
index a32046b5caab0b..b1ba0d652c1cf2 100644
--- a/providers/vmw_pvrdma/verbs.c
+++ b/providers/vmw_pvrdma/verbs.c
@@ -116,7 +116,7 @@ struct ibv_mr *pvrdma_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 {
 	struct ibv_mr *mr;
 	struct ibv_reg_mr cmd;
-	struct ibv_reg_mr_resp resp;
+	struct ib_uverbs_reg_mr_resp resp;
 	int ret;
 
 	mr = malloc(sizeof(*mr));
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 08/17] verbs: Use kernel uapi header for ibv_cq_moderation_caps_resp
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (6 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 07/17] verbs: Use kernel uapi names for identical structs Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 09/17] verbs: Use kernel uapi header for ibv_query_device_resp_ex Jason Gunthorpe
                     ` (9 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

For some reason the struct member names do not match the kernel version,
fix it.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/cmd.c      | 4 ++--
 libibverbs/kern-abi.h | 8 +-------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index a675bfb7d02fd3..ad0e0dc3736756 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -257,8 +257,8 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 		if (resp->response_length >=
 		    offsetof(struct ibv_query_device_resp_ex, cq_mod_caps) +
 		    sizeof(resp->cq_mod_caps)) {
-			attr->cq_mod_caps.max_cq_count = resp->cq_mod_caps.cq_count;
-			attr->cq_mod_caps.max_cq_period = resp->cq_mod_caps.cq_period;
+			attr->cq_mod_caps.max_cq_count = resp->cq_mod_caps.max_cq_moderation_count;
+			attr->cq_mod_caps.max_cq_period = resp->cq_mod_caps.max_cq_moderation_period;
 		}
 	}
 
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 3468e5497c3531..6a697987799c68 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -110,12 +110,6 @@ struct ibv_query_device_ex {
 	__u32		reserved;
 };
 
-struct ibv_cq_moderation_caps_resp {
-	__u16  cq_count;
-	__u16  cq_period;
-	__u32  reserved;
-};
-
 struct ibv_query_device_resp_ex {
 	struct ib_uverbs_query_device_resp base;
 	__u32 comp_mask;
@@ -128,7 +122,7 @@ struct ibv_query_device_resp_ex {
 	__u32  max_wq_type_rq;
 	__u32 raw_packet_caps;
 	struct ib_uverbs_tm_caps tm_caps;
-	struct ibv_cq_moderation_caps_resp cq_mod_caps;
+	struct ib_uverbs_cq_moderation_caps cq_mod_caps;
 };
 
 struct ibv_query_port {
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 09/17] verbs: Use kernel uapi header for ibv_query_device_resp_ex
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (7 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 08/17] verbs: Use kernel uapi header for ibv_cq_moderation_caps_resp Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 10/17] verbs: Use kernel uapi header for ibv_kern_wc and ibv_poll_cq_resp Jason Gunthorpe
                     ` (8 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

For some reason the struct member names do not match the kernel version,
fix it.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/cmd.c          | 28 ++++++++++++++--------------
 libibverbs/driver.h       |  2 +-
 libibverbs/kern-abi.h     | 15 ---------------
 providers/mlx4/mlx4-abi.h |  2 +-
 providers/mlx5/mlx5-abi.h |  2 +-
 5 files changed, 17 insertions(+), 32 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index ad0e0dc3736756..d7ca35b924a81c 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -134,7 +134,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 			    struct ibv_query_device_ex *cmd,
 			    size_t cmd_core_size,
 			    size_t cmd_size,
-			    struct ibv_query_device_resp_ex *resp,
+			    struct ib_uverbs_ex_query_device_resp *resp,
 			    size_t resp_core_size,
 			    size_t resp_size)
 {
@@ -147,7 +147,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 			sizeof(attr->comp_mask))
 		return EINVAL;
 
-	if (resp_core_size < offsetof(struct ibv_query_device_resp_ex,
+	if (resp_core_size < offsetof(struct ib_uverbs_ex_query_device_resp,
 				      response_length) +
 			     sizeof(resp->response_length))
 		return EINVAL;
@@ -171,7 +171,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 	if (attr_size >= offsetof(struct ibv_device_attr_ex, odp_caps) +
 			 sizeof(attr->odp_caps)) {
 		if (resp->response_length >=
-		    offsetof(struct ibv_query_device_resp_ex, odp_caps) +
+		    offsetof(struct ib_uverbs_ex_query_device_resp, odp_caps) +
 		    sizeof(resp->odp_caps)) {
 			attr->odp_caps.general_caps = resp->odp_caps.general_caps;
 			attr->odp_caps.per_transport_caps.rc_odp_caps =
@@ -187,7 +187,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 				  completion_timestamp_mask) +
 			 sizeof(attr->completion_timestamp_mask)) {
 		if (resp->response_length >=
-		    offsetof(struct ibv_query_device_resp_ex, timestamp_mask) +
+		    offsetof(struct ib_uverbs_ex_query_device_resp, timestamp_mask) +
 		    sizeof(resp->timestamp_mask))
 			attr->completion_timestamp_mask = resp->timestamp_mask;
 	}
@@ -195,7 +195,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 	if (attr_size >= offsetof(struct ibv_device_attr_ex, hca_core_clock) +
 			 sizeof(attr->hca_core_clock)) {
 		if (resp->response_length >=
-		    offsetof(struct ibv_query_device_resp_ex, hca_core_clock) +
+		    offsetof(struct ib_uverbs_ex_query_device_resp, hca_core_clock) +
 		    sizeof(resp->hca_core_clock))
 			attr->hca_core_clock = resp->hca_core_clock;
 	}
@@ -203,7 +203,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 	if (attr_size >= offsetof(struct ibv_device_attr_ex, device_cap_flags_ex) +
 			 sizeof(attr->device_cap_flags_ex)) {
 		if (resp->response_length >=
-		    offsetof(struct ibv_query_device_resp_ex, device_cap_flags_ex) +
+		    offsetof(struct ib_uverbs_ex_query_device_resp, device_cap_flags_ex) +
 		    sizeof(resp->device_cap_flags_ex))
 			attr->device_cap_flags_ex = resp->device_cap_flags_ex;
 	}
@@ -211,7 +211,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 	if (attr_size >= offsetof(struct ibv_device_attr_ex, rss_caps) +
 			 sizeof(attr->rss_caps)) {
 		if (resp->response_length >=
-		    offsetof(struct ibv_query_device_resp_ex, rss_caps) +
+		    offsetof(struct ib_uverbs_ex_query_device_resp, rss_caps) +
 		    sizeof(resp->rss_caps)) {
 			attr->rss_caps.supported_qpts = resp->rss_caps.supported_qpts;
 			attr->rss_caps.max_rwq_indirection_tables = resp->rss_caps.max_rwq_indirection_tables;
@@ -222,7 +222,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 	if (attr_size >= offsetof(struct ibv_device_attr_ex, max_wq_type_rq) +
 			 sizeof(attr->max_wq_type_rq)) {
 		if (resp->response_length >=
-		    offsetof(struct ibv_query_device_resp_ex, max_wq_type_rq) +
+		    offsetof(struct ib_uverbs_ex_query_device_resp, max_wq_type_rq) +
 		    sizeof(resp->max_wq_type_rq))
 			attr->max_wq_type_rq = resp->max_wq_type_rq;
 	}
@@ -230,7 +230,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 	if (attr_size >= offsetof(struct ibv_device_attr_ex, raw_packet_caps) +
 			 sizeof(attr->raw_packet_caps)) {
 		if (resp->response_length >=
-		    offsetof(struct ibv_query_device_resp_ex, raw_packet_caps) +
+		    offsetof(struct ib_uverbs_ex_query_device_resp, raw_packet_caps) +
 		    sizeof(resp->raw_packet_caps))
 			attr->raw_packet_caps = resp->raw_packet_caps;
 	}
@@ -238,7 +238,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 	if (attr_size >= offsetof(struct ibv_device_attr_ex, tm_caps) +
 			 sizeof(attr->tm_caps)) {
 		if (resp->response_length >=
-		    offsetof(struct ibv_query_device_resp_ex, tm_caps) +
+		    offsetof(struct ib_uverbs_ex_query_device_resp, tm_caps) +
 		    sizeof(resp->tm_caps)) {
 			attr->tm_caps.max_rndv_hdr_size =
 				resp->tm_caps.max_rndv_hdr_size;
@@ -255,10 +255,10 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 	if (attr_size >= offsetof(struct ibv_device_attr_ex, cq_mod_caps) +
 			 sizeof(attr->cq_mod_caps)) {
 		if (resp->response_length >=
-		    offsetof(struct ibv_query_device_resp_ex, cq_mod_caps) +
-		    sizeof(resp->cq_mod_caps)) {
-			attr->cq_mod_caps.max_cq_count = resp->cq_mod_caps.max_cq_moderation_count;
-			attr->cq_mod_caps.max_cq_period = resp->cq_mod_caps.max_cq_moderation_period;
+		    offsetof(struct ib_uverbs_ex_query_device_resp, cq_moderation_caps) +
+		    sizeof(resp->cq_moderation_caps)) {
+			attr->cq_mod_caps.max_cq_count = resp->cq_moderation_caps.max_cq_moderation_count;
+			attr->cq_mod_caps.max_cq_period = resp->cq_moderation_caps.max_cq_moderation_period;
 		}
 	}
 
diff --git a/libibverbs/driver.h b/libibverbs/driver.h
index 0c5a8e9a43f366..f9adf80df76cb0 100644
--- a/libibverbs/driver.h
+++ b/libibverbs/driver.h
@@ -331,7 +331,7 @@ int ibv_cmd_query_device_ex(struct ibv_context *context,
 			    struct ibv_query_device_ex *cmd,
 			    size_t cmd_core_size,
 			    size_t cmd_size,
-			    struct ibv_query_device_resp_ex *resp,
+			    struct ib_uverbs_ex_query_device_resp *resp,
 			    size_t resp_core_size,
 			    size_t resp_size);
 int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num,
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 6a697987799c68..96b98ebc229980 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -110,21 +110,6 @@ struct ibv_query_device_ex {
 	__u32		reserved;
 };
 
-struct ibv_query_device_resp_ex {
-	struct ib_uverbs_query_device_resp base;
-	__u32 comp_mask;
-	__u32 response_length;
-	struct ib_uverbs_odp_caps odp_caps;
-	__u64 timestamp_mask;
-	__u64 hca_core_clock;
-	__u64 device_cap_flags_ex;
-	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_cq_moderation_caps cq_mod_caps;
-};
-
 struct ibv_query_port {
 	__u32 command;
 	__u16 in_words;
diff --git a/providers/mlx4/mlx4-abi.h b/providers/mlx4/mlx4-abi.h
index 5f8ce28d70713d..3b58ff5eb83306 100644
--- a/providers/mlx4/mlx4-abi.h
+++ b/providers/mlx4/mlx4-abi.h
@@ -106,7 +106,7 @@ struct mlx4_rss_caps {
 };
 
 struct mlx4_query_device_ex_resp {
-	struct ibv_query_device_resp_ex ibv_resp;
+	struct ib_uverbs_ex_query_device_resp ibv_resp;
 	__u32				comp_mask;
 	__u32				response_length;
 	__u64				hca_core_clock_offset;
diff --git a/providers/mlx5/mlx5-abi.h b/providers/mlx5/mlx5-abi.h
index 0f2db819889cf9..661c774c7553ea 100644
--- a/providers/mlx5/mlx5-abi.h
+++ b/providers/mlx5/mlx5-abi.h
@@ -304,7 +304,7 @@ struct mlx5_striding_rq_caps {
 };
 
 struct mlx5_query_device_ex_resp {
-	struct ibv_query_device_resp_ex ibv_resp;
+	struct ib_uverbs_ex_query_device_resp ibv_resp;
 	__u32				comp_mask;
 	__u32				response_length;
 	struct ibv_tso_caps		tso_caps;
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 10/17] verbs: Use kernel uapi header for ibv_kern_wc and ibv_poll_cq_resp
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (8 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 09/17] verbs: Use kernel uapi header for ibv_query_device_resp_ex Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 11/17] verbs: Use kernel uapi header for ibv_create_ah_resp Jason Gunthorpe
                     ` (7 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

The kern_wc is slightly different, and the kernel API version is
missing a be32 (patch going to Linux separately)

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 buildlib/fixup-include/rdma-ib_user_verbs.h |  2 +-
 libibverbs/cmd.c                            |  6 +++---
 libibverbs/kern-abi.h                       | 24 ------------------------
 3 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/buildlib/fixup-include/rdma-ib_user_verbs.h b/buildlib/fixup-include/rdma-ib_user_verbs.h
index 7e11bb8651b641..0573c0bb9fd059 100644
--- a/buildlib/fixup-include/rdma-ib_user_verbs.h
+++ b/buildlib/fixup-include/rdma-ib_user_verbs.h
@@ -449,7 +449,7 @@ struct ib_uverbs_wc {
 	__u32 vendor_err;
 	__u32 byte_len;
 	union {
-		__u32 imm_data;
+		__be32 imm_data;
 		__u32 invalidate_rkey;
 	} ex;
 	__u32 qp_num;
diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index d7ca35b924a81c..62ac7df0dfc57b 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -562,12 +562,12 @@ int ibv_cmd_create_cq_ex(struct ibv_context *context,
 int ibv_cmd_poll_cq(struct ibv_cq *ibcq, int ne, struct ibv_wc *wc)
 {
 	struct ibv_poll_cq       cmd;
-	struct ibv_poll_cq_resp *resp;
+	struct ib_uverbs_poll_cq_resp *resp;
 	int                      i;
 	int                      rsize;
 	int                      ret;
 
-	rsize = sizeof *resp + ne * sizeof(struct ibv_kern_wc);
+	rsize = sizeof *resp + ne * sizeof(struct ib_uverbs_wc);
 	resp  = malloc(rsize);
 	if (!resp)
 		return -1;
@@ -589,7 +589,7 @@ int ibv_cmd_poll_cq(struct ibv_cq *ibcq, int ne, struct ibv_wc *wc)
 		wc[i].opcode 	     = resp->wc[i].opcode;
 		wc[i].vendor_err     = resp->wc[i].vendor_err;
 		wc[i].byte_len 	     = resp->wc[i].byte_len;
-		wc[i].imm_data 	     = resp->wc[i].imm_data;
+		wc[i].imm_data 	     = resp->wc[i].ex.imm_data;
 		wc[i].qp_num 	     = resp->wc[i].qp_num;
 		wc[i].src_qp 	     = resp->wc[i].src_qp;
 		wc[i].wc_flags 	     = resp->wc[i].wc_flags;
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 96b98ebc229980..a9e6b5461abd83 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -240,24 +240,6 @@ struct ibv_create_cq_ex {
 	__u32		reserved;
 };
 
-struct ibv_kern_wc {
-	__u64  wr_id;
-	__u32  status;
-	__u32  opcode;
-	__u32  vendor_err;
-	__u32  byte_len;
-	__be32  imm_data;
-	__u32  qp_num;
-	__u32  src_qp;
-	__u32  wc_flags;
-	__u16  pkey_index;
-	__u16  slid;
-	__u8   sl;
-	__u8   dlid_path_bits;
-	__u8   port_num;
-	__u8   reserved;
-};
-
 struct ibv_poll_cq {
 	__u32 command;
 	__u16 in_words;
@@ -267,12 +249,6 @@ struct ibv_poll_cq {
 	__u32 ne;
 };
 
-struct ibv_poll_cq_resp {
-	__u32 count;
-	__u32 reserved;
-	struct ibv_kern_wc wc[0];
-};
-
 struct ibv_req_notify_cq {
 	__u32 command;
 	__u16 in_words;
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 11/17] verbs: Use kernel uapi header for ibv_create_ah_resp
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (9 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 10/17] verbs: Use kernel uapi header for ibv_kern_wc and ibv_poll_cq_resp Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 12/17] verbs: Use kernel uapi header for ibv_kern_send_wr Jason Gunthorpe
                     ` (6 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

kern-abi.h has a different spelling for 'ah_handle'

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/cmd.c                | 4 ++--
 libibverbs/driver.h             | 2 +-
 libibverbs/kern-abi.h           | 4 ----
 providers/bnxt_re/verbs.c       | 2 +-
 providers/hfi1verbs/verbs.c     | 2 +-
 providers/ipathverbs/verbs.c    | 2 +-
 providers/mlx5/mlx5-abi.h       | 2 +-
 providers/ocrdma/ocrdma_verbs.c | 2 +-
 providers/rxe/rxe.c             | 2 +-
 9 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index 62ac7df0dfc57b..51366f05cfc9c5 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1621,7 +1621,7 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
 
 int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
 		      struct ibv_ah_attr *attr,
-		      struct ibv_create_ah_resp *resp,
+		      struct ib_uverbs_create_ah_resp *resp,
 		      size_t resp_size)
 {
 	struct ibv_create_ah      cmd;
@@ -1646,7 +1646,7 @@ int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
 
 	(void) VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
 
-	ah->handle  = resp->handle;
+	ah->handle  = resp->ah_handle;
 	ah->context = pd->context;
 
 	return 0;
diff --git a/libibverbs/driver.h b/libibverbs/driver.h
index f9adf80df76cb0..7a26f7ed2d0e23 100644
--- a/libibverbs/driver.h
+++ b/libibverbs/driver.h
@@ -451,7 +451,7 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
 			  struct ibv_recv_wr **bad_wr);
 int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
 		      struct ibv_ah_attr *attr,
-		      struct ibv_create_ah_resp *resp,
+		      struct ib_uverbs_create_ah_resp *resp,
 		      size_t resp_size);
 int ibv_cmd_destroy_ah(struct ibv_ah *ah);
 int ibv_cmd_attach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index a9e6b5461abd83..5d332f7b22c3f7 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -560,10 +560,6 @@ struct ibv_create_ah {
 	struct ib_uverbs_ah_attr attr;
 };
 
-struct ibv_create_ah_resp {
-	__u32 handle;
-};
-
 struct ibv_destroy_ah {
 	__u32 command;
 	__u16 in_words;
diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c
index bab2d732d71fa3..09ac33351db7e9 100644
--- a/providers/bnxt_re/verbs.c
+++ b/providers/bnxt_re/verbs.c
@@ -1390,7 +1390,7 @@ struct ibv_ah *bnxt_re_create_ah(struct ibv_pd *ibvpd, struct ibv_ah_attr *attr)
 {
 	struct bnxt_re_context *uctx;
 	struct bnxt_re_ah *ah;
-	struct ibv_create_ah_resp resp;
+	struct ib_uverbs_create_ah_resp resp;
 	int status;
 
 	uctx = to_bnxt_re_context(ibvpd->context);
diff --git a/providers/hfi1verbs/verbs.c b/providers/hfi1verbs/verbs.c
index 8e616b8b2198b8..957354b06b218c 100644
--- a/providers/hfi1verbs/verbs.c
+++ b/providers/hfi1verbs/verbs.c
@@ -678,7 +678,7 @@ int hfi1_post_srq_recv(struct ibv_srq *ibsrq, struct ibv_recv_wr *wr,
 struct ibv_ah *hfi1_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr)
 {
 	struct ibv_ah *ah;
-	struct ibv_create_ah_resp resp;
+	struct ib_uverbs_create_ah_resp resp;
 
 	ah = malloc(sizeof *ah);
 	if (ah == NULL)
diff --git a/providers/ipathverbs/verbs.c b/providers/ipathverbs/verbs.c
index e0b247bf337583..440e3dd622bad3 100644
--- a/providers/ipathverbs/verbs.c
+++ b/providers/ipathverbs/verbs.c
@@ -654,7 +654,7 @@ int ipath_post_srq_recv(struct ibv_srq *ibsrq, struct ibv_recv_wr *wr,
 struct ibv_ah *ipath_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr)
 {
 	struct ibv_ah *ah;
-	struct ibv_create_ah_resp resp;
+	struct ib_uverbs_create_ah_resp resp;
 
 	ah = malloc(sizeof *ah);
 	if (ah == NULL)
diff --git a/providers/mlx5/mlx5-abi.h b/providers/mlx5/mlx5-abi.h
index 661c774c7553ea..1205fe75c4d022 100644
--- a/providers/mlx5/mlx5-abi.h
+++ b/providers/mlx5/mlx5-abi.h
@@ -107,7 +107,7 @@ struct mlx5_alloc_ucontext_resp {
 };
 
 struct mlx5_create_ah_resp {
-	struct ibv_create_ah_resp	ibv_resp;
+	struct ib_uverbs_create_ah_resp	ibv_resp;
 	__u32				response_length;
 	__u8				dmac[ETHERNET_LL_SIZE];
 	__u8				reserved[6];
diff --git a/providers/ocrdma/ocrdma_verbs.c b/providers/ocrdma/ocrdma_verbs.c
index 5b8da32b1bdcdd..dd7035ddc28d86 100644
--- a/providers/ocrdma/ocrdma_verbs.c
+++ b/providers/ocrdma/ocrdma_verbs.c
@@ -2099,7 +2099,7 @@ struct ibv_ah *ocrdma_create_ah(struct ibv_pd *ibpd, struct ibv_ah_attr *attr)
 	int ahtbl_idx;
 	struct ocrdma_pd *pd;
 	struct ocrdma_ah *ah;
-	struct ibv_create_ah_resp resp;
+	struct ib_uverbs_create_ah_resp resp;
 
 	pd = get_ocrdma_pd(ibpd);
 	ah = malloc(sizeof *ah);
diff --git a/providers/rxe/rxe.c b/providers/rxe/rxe.c
index ebdef7a73e83a6..c6ec95c2bcf80d 100644
--- a/providers/rxe/rxe.c
+++ b/providers/rxe/rxe.c
@@ -783,7 +783,7 @@ static struct ibv_ah *rxe_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr)
 	struct rxe_ah *ah;
 	struct rxe_av *av;
 	union ibv_gid sgid;
-	struct ibv_create_ah_resp resp;
+	struct ib_uverbs_create_ah_resp resp;
 
 	err = ibv_query_gid(pd->context, attr->port_num, attr->grh.sgid_index,
 			    &sgid);
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 12/17] verbs: Use kernel uapi header for ibv_kern_send_wr
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (10 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 11/17] verbs: Use kernel uapi header for ibv_create_ah_resp Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 13/17] verbs: Use kernel uapi header for IBV_CREATE_QP_EX_KERNEL_MASK_IND_TABLE Jason Gunthorpe
                     ` (5 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

The kern_wc is slightly different, and the kernel API version is
missing a be32 (patch going to Linux separately)

The unused and curious qp_type.xrc.remote_srqn is deleted.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 buildlib/fixup-include/rdma-ib_user_verbs.h |  2 +-
 libibverbs/cmd.c                            |  6 ++---
 libibverbs/kern-abi.h                       | 35 +----------------------------
 3 files changed, 5 insertions(+), 38 deletions(-)

diff --git a/buildlib/fixup-include/rdma-ib_user_verbs.h b/buildlib/fixup-include/rdma-ib_user_verbs.h
index 0573c0bb9fd059..fd035641cf41ce 100644
--- a/buildlib/fixup-include/rdma-ib_user_verbs.h
+++ b/buildlib/fixup-include/rdma-ib_user_verbs.h
@@ -765,7 +765,7 @@ struct ib_uverbs_send_wr {
 	__u32 opcode;
 	__u32 send_flags;
 	union {
-		__u32 imm_data;
+		__be32 imm_data;
 		__u32 invalidate_rkey;
 	} ex;
 	union {
diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index 51366f05cfc9c5..99e94233f320d1 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1413,7 +1413,7 @@ int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 	struct ibv_post_send     *cmd;
 	struct ib_uverbs_post_send_resp resp;
 	struct ibv_send_wr       *i;
-	struct ibv_kern_send_wr  *n, *tmp;
+	struct ib_uverbs_send_wr  *n, *tmp;
 	struct ibv_sge           *s;
 	unsigned                  wr_count = 0;
 	unsigned                  sge_count = 0;
@@ -1434,7 +1434,7 @@ int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 	cmd->sge_count = sge_count;
 	cmd->wqe_size  = sizeof *n;
 
-	n = (struct ibv_kern_send_wr *) ((void *) cmd + sizeof *cmd);
+	n = (struct ib_uverbs_send_wr *) ((void *) cmd + sizeof *cmd);
 	s = (struct ibv_sge *) (n + wr_count);
 
 	tmp = n;
@@ -1443,7 +1443,7 @@ int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 		tmp->num_sge 	= i->num_sge;
 		tmp->opcode 	= i->opcode;
 		tmp->send_flags = i->send_flags;
-		tmp->imm_data 	= i->imm_data;
+		tmp->ex.imm_data = i->imm_data;
 		if (ibqp->qp_type == IBV_QPT_UD) {
 			tmp->wr.ud.ah 	       = i->wr.ud.ah->handle;
 			tmp->wr.ud.remote_qpn  = i->wr.ud.remote_qpn;
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 5d332f7b22c3f7..6284d0e45e9784 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -395,39 +395,6 @@ struct ibv_destroy_qp {
 	__u32 reserved;
 };
 
-struct ibv_kern_send_wr {
-	__u64 wr_id;
-	__u32 num_sge;
-	__u32 opcode;
-	__u32 send_flags;
-	__be32 imm_data;
-	union {
-		struct {
-			__u64 remote_addr;
-			__u32 rkey;
-			__u32 reserved;
-		} rdma;
-		struct {
-			__u64 remote_addr;
-			__u64 compare_add;
-			__u64 swap;
-			__u32 rkey;
-			__u32 reserved;
-		} atomic;
-		struct {
-			__u32 ah;
-			__u32 remote_qpn;
-			__u32 remote_qkey;
-			__u32 reserved;
-		} ud;
-	} wr;
-	union {
-		struct {
-			__u32 remote_srqn;
-		} xrc;
-	} qp_type;
-};
-
 struct ibv_kern_spec_eth {
 	__u32 type;
 	__u16  size;
@@ -522,7 +489,7 @@ struct ibv_post_send {
 	__u32 wr_count;
 	__u32 sge_count;
 	__u32 wqe_size;
-	struct ibv_kern_send_wr send_wr[0];
+	struct ib_uverbs_send_wr send_wr[0];
 };
 
 struct ibv_post_recv {
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 13/17] verbs: Use kernel uapi header for IBV_CREATE_QP_EX_KERNEL_MASK_IND_TABLE
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (11 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 12/17] verbs: Use kernel uapi header for ibv_kern_send_wr Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 14/17] verbs: Use kernel uapi header for flow steering types Jason Gunthorpe
                     ` (4 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Kernel calls it IB_UVERBS_CREATE_QP_MASK_IND_TABLE

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/cmd.c      | 2 +-
 libibverbs/kern-abi.h | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index 99e94233f320d1..dfa3fe6e113e98 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1014,7 +1014,7 @@ int ibv_cmd_create_qp_ex2(struct ibv_context *context,
 				    sizeof(cmd->ind_tbl_handle))
 			return EINVAL;
 		cmd->ind_tbl_handle = qp_attr->rwq_ind_tbl->ind_tbl_handle;
-		cmd->comp_mask = IBV_CREATE_QP_EX_KERNEL_MASK_IND_TABLE;
+		cmd->comp_mask = IB_UVERBS_CREATE_QP_MASK_IND_TABLE;
 	}
 
 	err = write(context->cmd_fd, cmd, cmd_size);
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 6284d0e45e9784..277d968f0bcc2c 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -318,11 +318,6 @@ struct ibv_open_qp {
 	__u64 driver_data[0];
 };
 
-
-enum ibv_create_qp_ex_kernel_mask {
-	IBV_CREATE_QP_EX_KERNEL_MASK_IND_TABLE = 1 << 0,
-};
-
 struct ibv_create_qp_ex {
 	struct ex_hdr	hdr;
 	struct ibv_create_qp_common base;
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 14/17] verbs: Use kernel uapi header for flow steering types
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (12 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 13/17] verbs: Use kernel uapi header for IBV_CREATE_QP_EX_KERNEL_MASK_IND_TABLE Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 15/17] verbs: Use kernel uapi header for ibv_modify_qp_common Jason Gunthorpe
                     ` (3 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

The kernel versions are a bit different, they have a union
around the header fields mapping to ib_uverbs_flow_spec_hdr
but are otherwise the same.

Performed by this script:

$ sed -i \
 -e 's/struct[ \t]ibv_kern_spec_action_drop\([ \t,)]\)/struct ib_uverbs_flow_spec_action_drop\1/g' \
 -e 's/struct[ \t]ibv_kern_spec_action_tag\([ \t,)]\)/struct ib_uverbs_flow_spec_action_tag\1/g' \
 -e 's/struct[ \t]ibv_kern_spec_eth\([ \t,)]\)/struct ib_uverbs_flow_spec_eth\1/g' \
 -e 's/struct[ \t]ibv_kern_spec_ipv4_ext\([ \t,)]\)/struct ib_uverbs_flow_spec_ipv4\1/g' \
 -e 's/struct[ \t]ibv_kern_spec_ipv6\([ \t,)]\)/struct ib_uverbs_flow_spec_ipv6\1/g' \
 -e 's/struct[ \t]ibv_kern_spec_tcp_udp\([ \t,)]\)/struct ib_uverbs_flow_spec_tcp_udp\1/g' \
 -e 's/struct[ \t]ibv_kern_spec_tunnel\([ \t,)]\)/struct ib_uverbs_flow_spec_tunnel\1/g' \
    `git ls-files`

And some minor touch ups.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/cmd.c      | 14 +++++-----
 libibverbs/kern-abi.h | 74 ++++++---------------------------------------------
 2 files changed, 15 insertions(+), 73 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index dfa3fe6e113e98..f73af7b7a92d80 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1790,7 +1790,7 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec,
 	switch (kern_spec->hdr.type) {
 	case IBV_FLOW_SPEC_ETH:
 	case IBV_FLOW_SPEC_ETH | IBV_FLOW_SPEC_INNER:
-		kern_spec->eth.size = sizeof(struct ibv_kern_spec_eth);
+		kern_spec->eth.size = sizeof(struct ib_uverbs_flow_spec_eth);
 		memcpy(&kern_spec->eth.val, &ib_spec->eth.val,
 		       sizeof(struct ibv_flow_eth_filter));
 		memcpy(&kern_spec->eth.mask, &ib_spec->eth.mask,
@@ -1815,7 +1815,7 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec,
 		kern_spec->hdr.type = IBV_FLOW_SPEC_IPV4 |
 				     (IBV_FLOW_SPEC_INNER & ib_spec->hdr.type);
 		kern_spec->ipv4_ext.size = sizeof(struct
-						  ibv_kern_spec_ipv4_ext);
+						  ib_uverbs_flow_spec_ipv4);
 		memcpy(&kern_spec->ipv4_ext.val, &ib_spec->ipv4_ext.val,
 		       kern_filter_size);
 		memcpy(&kern_spec->ipv4_ext.mask, (void *)&ib_spec->ipv4_ext.val
@@ -1829,7 +1829,7 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec,
 		if (ret)
 			return ret;
 
-		kern_spec->ipv6.size = sizeof(struct ibv_kern_spec_ipv6);
+		kern_spec->ipv6.size = sizeof(struct ib_uverbs_flow_spec_ipv6);
 		memcpy(&kern_spec->ipv6.val, &ib_spec->ipv6.val,
 		       kern_filter_size);
 		memcpy(&kern_spec->ipv6.mask, (void *)&ib_spec->ipv6.val
@@ -1839,7 +1839,7 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec,
 	case IBV_FLOW_SPEC_UDP:
 	case IBV_FLOW_SPEC_TCP | IBV_FLOW_SPEC_INNER:
 	case IBV_FLOW_SPEC_UDP | IBV_FLOW_SPEC_INNER:
-		kern_spec->tcp_udp.size = sizeof(struct ibv_kern_spec_tcp_udp);
+		kern_spec->tcp_udp.size = sizeof(struct ib_uverbs_flow_spec_tcp_udp);
 		memcpy(&kern_spec->tcp_udp.val, &ib_spec->tcp_udp.val,
 		       sizeof(struct ibv_flow_tcp_udp_filter));
 		memcpy(&kern_spec->tcp_udp.mask, &ib_spec->tcp_udp.mask,
@@ -1852,7 +1852,7 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec,
 		if (ret)
 			return ret;
 
-		kern_spec->tunnel.size = sizeof(struct ibv_kern_spec_tunnel);
+		kern_spec->tunnel.size = sizeof(struct ib_uverbs_flow_spec_tunnel);
 		memcpy(&kern_spec->tunnel.val, &ib_spec->tunnel.val,
 		       kern_filter_size);
 		memcpy(&kern_spec->tunnel.mask, (void *)&ib_spec->tunnel.val
@@ -1860,11 +1860,11 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec,
 		break;
 	case IBV_FLOW_SPEC_ACTION_TAG:
 		kern_spec->flow_tag.size =
-			sizeof(struct ibv_kern_spec_action_tag);
+			sizeof(struct ib_uverbs_flow_spec_action_tag);
 		kern_spec->flow_tag.tag_id = ib_spec->flow_tag.tag_id;
 		break;
 	case IBV_FLOW_SPEC_ACTION_DROP:
-		kern_spec->drop.size = sizeof(struct ibv_kern_spec_action_drop);
+		kern_spec->drop.size = sizeof(struct ib_uverbs_flow_spec_action_drop);
 		break;
 	default:
 		return EINVAL;
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 277d968f0bcc2c..57ef1dd6ff6beb 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -390,14 +390,6 @@ struct ibv_destroy_qp {
 	__u32 reserved;
 };
 
-struct ibv_kern_spec_eth {
-	__u32 type;
-	__u16  size;
-	__u16 reserved;
-	struct ib_uverbs_flow_eth_filter val;
-	struct ib_uverbs_flow_eth_filter mask;
-};
-
 struct ibv_kern_ipv4_filter {
 	__u32 src_ip;
 	__u32 dst_ip;
@@ -411,67 +403,17 @@ struct ibv_kern_spec_ipv4 {
 	struct ibv_kern_ipv4_filter mask;
 };
 
-struct ibv_kern_spec_ipv4_ext {
-	__u32  type;
-	__u16  size;
-	__u16 reserved;
-	struct ib_uverbs_flow_ipv4_filter val;
-	struct ib_uverbs_flow_ipv4_filter mask;
-};
-
-struct ibv_kern_spec_ipv6 {
-	__u32  type;
-	__u16  size;
-	__u16 reserved;
-	struct ib_uverbs_flow_ipv6_filter val;
-	struct ib_uverbs_flow_ipv6_filter mask;
-};
-
-struct ibv_kern_spec_tcp_udp {
-	__u32  type;
-	__u16  size;
-	__u16 reserved;
-	struct ib_uverbs_flow_tcp_udp_filter val;
-	struct ib_uverbs_flow_tcp_udp_filter mask;
-};
-
-struct ibv_kern_spec_action_tag {
-	__u32  type;
-	__u16  size;
-	__u16 reserved;
-	__u32 tag_id;
-	__u32 reserved1;
-};
-
-struct ibv_kern_spec_tunnel {
-	__u32  type;
-	__u16  size;
-	__u16 reserved;
-	struct ib_uverbs_flow_tunnel_filter val;
-	struct ib_uverbs_flow_tunnel_filter mask;
-};
-
-struct ibv_kern_spec_action_drop {
-	__u32  type;
-	__u16  size;
-	__u16 reserved;
-};
-
 struct ibv_kern_spec {
 	union {
-		struct {
-			__u32 type;
-			__u16 size;
-			__u16 reserved;
-		} hdr;
-		struct ibv_kern_spec_eth eth;
+		struct ib_uverbs_flow_spec_hdr hdr;
+		struct ib_uverbs_flow_spec_eth eth;
 		struct ibv_kern_spec_ipv4 ipv4;
-		struct ibv_kern_spec_ipv4_ext ipv4_ext;
-		struct ibv_kern_spec_tcp_udp tcp_udp;
-		struct ibv_kern_spec_ipv6 ipv6;
-		struct ibv_kern_spec_tunnel tunnel;
-		struct ibv_kern_spec_action_tag flow_tag;
-		struct ibv_kern_spec_action_drop drop;
+		struct ib_uverbs_flow_spec_ipv4 ipv4_ext;
+		struct ib_uverbs_flow_spec_tcp_udp tcp_udp;
+		struct ib_uverbs_flow_spec_ipv6 ipv6;
+		struct ib_uverbs_flow_spec_tunnel tunnel;
+		struct ib_uverbs_flow_spec_action_tag flow_tag;
+		struct ib_uverbs_flow_spec_action_drop drop;
 	};
 };
 
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 15/17] verbs: Use kernel uapi header for ibv_modify_qp_common
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (13 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 14/17] verbs: Use kernel uapi header for flow steering types Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 16/17] verb: Use kernel uapi header in struct ex_hdr Jason Gunthorpe
                     ` (2 subsequent siblings)
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

The kernel header has a redundant driver_data.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/cmd.c      |  2 +-
 libibverbs/kern-abi.h | 33 ++-------------------------------
 2 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index f73af7b7a92d80..0e1589e1c8963e 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1273,7 +1273,7 @@ int ibv_cmd_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 
 static void copy_modify_qp_fields(struct ibv_qp *qp, struct ibv_qp_attr *attr,
 				  int attr_mask,
-				  struct ibv_modify_qp_common *cmd)
+				  struct ib_uverbs_modify_qp *cmd)
 {
 	cmd->qp_handle = qp->handle;
 	cmd->attr_mask = attr_mask;
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 57ef1dd6ff6beb..8400ce1c47e92d 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -337,46 +337,17 @@ struct ibv_query_qp {
 	__u64 driver_data[0];
 };
 
-struct ibv_modify_qp_common {
-	struct ib_uverbs_qp_dest dest;
-	struct ib_uverbs_qp_dest alt_dest;
-	__u32 qp_handle;
-	__u32 attr_mask;
-	__u32 qkey;
-	__u32 rq_psn;
-	__u32 sq_psn;
-	__u32 dest_qp_num;
-	__u32 qp_access_flags;
-	__u16 pkey_index;
-	__u16 alt_pkey_index;
-	__u8  qp_state;
-	__u8  cur_qp_state;
-	__u8  path_mtu;
-	__u8  path_mig_state;
-	__u8  en_sqd_async_notify;
-	__u8  max_rd_atomic;
-	__u8  max_dest_rd_atomic;
-	__u8  min_rnr_timer;
-	__u8  port_num;
-	__u8  timeout;
-	__u8  retry_cnt;
-	__u8  rnr_retry;
-	__u8  alt_port_num;
-	__u8  alt_timeout;
-	__u8  reserved[2];
-};
-
 struct ibv_modify_qp {
 	__u32 command;
 	__u16 in_words;
 	__u16 out_words;
-	struct ibv_modify_qp_common base;
+	struct ib_uverbs_modify_qp base;
 	__u64 driver_data[0];
 };
 
 struct ibv_modify_qp_ex {
 	struct ex_hdr		    hdr;
-	struct ibv_modify_qp_common base;
+	struct ib_uverbs_modify_qp base;
 	__u32  rate_limit;
 	__u32  reserved;
 };
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 16/17] verb: Use kernel uapi header in struct ex_hdr
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (14 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 15/17] verbs: Use kernel uapi header for ibv_modify_qp_common Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-11 22:13   ` [PATCH rdma-core 17/17] verbs: Tidy up the remaining structs in kern-abi.h Jason Gunthorpe
  2018-01-22 17:37   ` [PATCH rdma-core 00/17] Use the kernel ABI header instead of kern-abi.h Jason Gunthorpe
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

All the components are defined by the uapi header. Revise
the macro to use the new names.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/ibverbs.h  | 14 +++++++-------
 libibverbs/kern-abi.h | 15 ++-------------
 2 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/libibverbs/ibverbs.h b/libibverbs/ibverbs.h
index 7755393fe4f3ce..ceb6c5bfd4e3f9 100644
--- a/libibverbs/ibverbs.h
+++ b/libibverbs/ibverbs.h
@@ -88,15 +88,15 @@ static inline uint32_t _cmd_ex(uint32_t cmd)
 		outsize)						   \
 	do {                                                               \
 		size_t c_size = cmd_size - sizeof(struct ex_hdr);	   \
-		(cmd)->hdr.command =					   \
+		(cmd)->hdr.hdr.command =				   \
 			_cmd_ex(IB_USER_VERBS_EX_CMD_##opcode);		   \
-		(cmd)->hdr.in_words  = ((c_size) / 8);                     \
-		(cmd)->hdr.out_words = ((resp_size) / 8);                  \
-		(cmd)->hdr.provider_in_words   = (((size) - (cmd_size))/8);\
-		(cmd)->hdr.provider_out_words  =			   \
+		(cmd)->hdr.hdr.in_words  = ((c_size) / 8);                 \
+		(cmd)->hdr.hdr.out_words = ((resp_size) / 8);              \
+		(cmd)->hdr.ex_hdr.provider_in_words   = (((size) - (cmd_size))/8);\
+		(cmd)->hdr.ex_hdr.provider_out_words  =			   \
 			     (((outsize) - (resp_size)) / 8);              \
-		(cmd)->hdr.response  = (uintptr_t) (out);                  \
-		(cmd)->hdr.reserved = 0;				   \
+		(cmd)->hdr.ex_hdr.response  = (uintptr_t) (out);           \
+		(cmd)->hdr.ex_hdr.cmd_hdr_reserved = 0;			   \
 	} while (0)
 
 #define IBV_INIT_CMD_RESP_EX_VCMD(cmd, cmd_size, size, opcode, out, outsize) \
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index 8400ce1c47e92d..ca7ba14dfdb580 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -65,19 +65,8 @@
  */
 
 struct ex_hdr {
-	struct {
-		__u32 command;
-		__u16 in_words;
-		__u16 out_words;
-	};
-	struct {
-		__u64 response;
-	};
-	struct {
-		__u16 provider_in_words;
-		__u16 provider_out_words;
-		__u32 reserved;
-	};
+	struct ib_uverbs_cmd_hdr hdr;
+	struct ib_uverbs_ex_cmd_hdr ex_hdr;
 };
 
 /*
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH rdma-core 17/17] verbs: Tidy up the remaining structs in kern-abi.h
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (15 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 16/17] verb: Use kernel uapi header in struct ex_hdr Jason Gunthorpe
@ 2018-01-11 22:13   ` Jason Gunthorpe
  2018-01-22 17:37   ` [PATCH rdma-core 00/17] Use the kernel ABI header instead of kern-abi.h Jason Gunthorpe
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-11 22:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

These are almost now all the manual wrapper structs around the
kernel ABI struct.

- Include the header using struct ib_uverbs_cmd_hdr
  and revise the macros to use it
- Delete driver_data[0] VLA. The driver data following the
  command data is implied for all commands.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 libibverbs/cmd.c      |   2 +-
 libibverbs/ibverbs.h  |  12 ++--
 libibverbs/kern-abi.h | 164 +++++++++++---------------------------------------
 providers/rxe/rxe.c   |   6 +-
 4 files changed, 46 insertions(+), 138 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index 0e1589e1c8963e..b89b1bdd366bc6 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -793,7 +793,7 @@ static int ibv_cmd_modify_srq_v3(struct ibv_srq *srq,
 
 	cmd_size = sizeof *cmd + new_cmd_size - sizeof *new_cmd;
 	cmd      = alloca(cmd_size);
-	memcpy(cmd->driver_data, new_cmd->driver_data, new_cmd_size - sizeof *new_cmd);
+	memcpy(cmd + 1, new_cmd + 1, new_cmd_size - sizeof *new_cmd);
 
 	IBV_INIT_CMD(cmd, cmd_size, MODIFY_SRQ);
 
diff --git a/libibverbs/ibverbs.h b/libibverbs/ibverbs.h
index ceb6c5bfd4e3f9..7238d79168733f 100644
--- a/libibverbs/ibverbs.h
+++ b/libibverbs/ibverbs.h
@@ -64,16 +64,16 @@ struct verbs_ex_private {
 
 #define IBV_INIT_CMD(cmd, size, opcode)					\
 	do {								\
-		(cmd)->command = IB_USER_VERBS_CMD_##opcode;		\
-		(cmd)->in_words  = (size) / 4;				\
-		(cmd)->out_words = 0;					\
+		(cmd)->hdr.command = IB_USER_VERBS_CMD_##opcode;	\
+		(cmd)->hdr.in_words  = (size) / 4;			\
+		(cmd)->hdr.out_words = 0;				\
 	} while (0)
 
 #define IBV_INIT_CMD_RESP(cmd, size, opcode, out, outsize)		\
 	do {								\
-		(cmd)->command = IB_USER_VERBS_CMD_##opcode;		\
-		(cmd)->in_words  = (size) / 4;				\
-		(cmd)->out_words = (outsize) / 4;			\
+		(cmd)->hdr.command = IB_USER_VERBS_CMD_##opcode;	\
+		(cmd)->hdr.in_words  = (size) / 4;			\
+		(cmd)->hdr.out_words = (outsize) / 4;			\
 		(cmd)->response  = (uintptr_t) (out);			\
 	} while (0)
 
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index ca7ba14dfdb580..8e264b00db46b5 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -78,19 +78,13 @@ struct ex_hdr {
  */
 
 struct ibv_get_context {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
-	__u64 driver_data[0];
 };
 
 struct ibv_query_device {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
-	__u64 driver_data[0];
 };
 
 struct ibv_query_device_ex {
@@ -100,64 +94,46 @@ struct ibv_query_device_ex {
 };
 
 struct ibv_query_port {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u8  port_num;
 	__u8  reserved[7];
-	__u64 driver_data[0];
 };
 
 struct ibv_alloc_pd {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
-	__u64 driver_data[0];
 };
 
 struct ibv_dealloc_pd {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u32 pd_handle;
 };
 
 struct ibv_open_xrcd {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 fd;
 	__u32 oflags;
-	__u64 driver_data[0];
 };
 
 struct ibv_close_xrcd {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u32 xrcd_handle;
 };
 
 struct ibv_reg_mr {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u64 start;
 	__u64 length;
 	__u64 hca_va;
 	__u32 pd_handle;
 	__u32 access_flags;
-	__u64 driver_data[0];
 };
 
 struct ibv_rereg_mr {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 mr_handle;
 	__u32 flags;
@@ -166,20 +142,15 @@ struct ibv_rereg_mr {
 	__u64 hca_va;
 	__u32 pd_handle;
 	__u32 access_flags;
-	__u64 driver_data[0];
 };
 
 struct ibv_dereg_mr {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u32 mr_handle;
 };
 
 struct ibv_alloc_mw {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 pd_handle;
 	__u8  mw_type;
@@ -187,31 +158,24 @@ struct ibv_alloc_mw {
 };
 
 struct ibv_dealloc_mw {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u32 mw_handle;
 	__u32 reserved;
 };
 
 struct ibv_create_comp_channel {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 };
 
 struct ibv_create_cq {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u64 user_handle;
 	__u32 cqe;
 	__u32 comp_vector;
 	__s32 comp_channel;
 	__u32 reserved;
-	__u64 driver_data[0];
 };
 
 enum ibv_create_cq_ex_kernel_flags {
@@ -230,36 +194,27 @@ struct ibv_create_cq_ex {
 };
 
 struct ibv_poll_cq {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 cq_handle;
 	__u32 ne;
 };
 
 struct ibv_req_notify_cq {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u32 cq_handle;
 	__u32 solicited;
 };
 
 struct ibv_resize_cq {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 cq_handle;
 	__u32 cqe;
-	__u64 driver_data[0];
 };
 
 struct ibv_destroy_cq {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 cq_handle;
 	__u32 reserved;
@@ -282,12 +237,9 @@ struct ibv_destroy_cq {
 	__u8  reserved
 
 struct ibv_create_qp {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	IBV_CREATE_QP_COMMON;
-	__u64 driver_data[0];
 };
 
 struct ibv_create_qp_common {
@@ -295,16 +247,13 @@ struct ibv_create_qp_common {
 };
 
 struct ibv_open_qp {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u64 user_handle;
 	__u32 pd_handle;
 	__u32 qpn;
 	__u8  qp_type;
 	__u8  reserved[7];
-	__u64 driver_data[0];
 };
 
 struct ibv_create_qp_ex {
@@ -317,21 +266,15 @@ struct ibv_create_qp_ex {
 };
 
 struct ibv_query_qp {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 qp_handle;
 	__u32 attr_mask;
-	__u64 driver_data[0];
 };
 
 struct ibv_modify_qp {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	struct ib_uverbs_modify_qp base;
-	__u64 driver_data[0];
 };
 
 struct ibv_modify_qp_ex {
@@ -342,9 +285,7 @@ struct ibv_modify_qp_ex {
 };
 
 struct ibv_destroy_qp {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 qp_handle;
 	__u32 reserved;
@@ -378,9 +319,7 @@ struct ibv_kern_spec {
 };
 
 struct ibv_post_send {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 qp_handle;
 	__u32 wr_count;
@@ -390,9 +329,7 @@ struct ibv_post_send {
 };
 
 struct ibv_post_recv {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 qp_handle;
 	__u32 wr_count;
@@ -402,9 +339,7 @@ struct ibv_post_recv {
 };
 
 struct ibv_post_srq_recv {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 srq_handle;
 	__u32 wr_count;
@@ -414,9 +349,7 @@ struct ibv_post_srq_recv {
 };
 
 struct ibv_create_ah {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u64 user_handle;
 	__u32 pd_handle;
@@ -425,21 +358,16 @@ struct ibv_create_ah {
 };
 
 struct ibv_destroy_ah {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u32 ah_handle;
 };
 
 struct ibv_attach_mcast {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u8  gid[16];
 	__u32 qp_handle;
 	__u16 mlid;
 	__u16 reserved;
-	__u64 driver_data[0];
 };
 
 struct ibv_create_flow  {
@@ -456,33 +384,25 @@ struct ibv_destroy_flow  {
 };
 
 struct ibv_detach_mcast {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u8  gid[16];
 	__u32 qp_handle;
 	__u16 mlid;
 	__u16 reserved;
-	__u64 driver_data[0];
 };
 
 struct ibv_create_srq {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u64 user_handle;
 	__u32 pd_handle;
 	__u32 max_wr;
 	__u32 max_sge;
 	__u32 srq_limit;
-	__u64 driver_data[0];
 };
 
 struct ibv_create_xsrq {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u64 user_handle;
 	__u32 srq_type;
@@ -493,50 +413,38 @@ struct ibv_create_xsrq {
 	__u32 max_num_tags;
 	__u32 xrcd_handle;
 	__u32 cq_handle;
-	__u64 driver_data[0];
 };
 
 struct ibv_modify_srq {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u32 srq_handle;
 	__u32 attr_mask;
 	__u32 max_wr;
 	__u32 srq_limit;
-	__u64 driver_data[0];
 };
 
 struct ibv_query_srq {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 srq_handle;
 	__u32 reserved;
-	__u64 driver_data[0];
 };
 
 struct ibv_destroy_srq {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u64 response;
 	__u32 srq_handle;
 	__u32 reserved;
 };
 
 struct ibv_modify_srq_v3 {
-	__u32 command;
-	__u16 in_words;
-	__u16 out_words;
+	struct ib_uverbs_cmd_hdr hdr;
 	__u32 srq_handle;
 	__u32 attr_mask;
 	__u32 max_wr;
 	__u32 max_sge;
 	__u32 srq_limit;
 	__u32 reserved;
-	__u64 driver_data[0];
 };
 
 struct ibv_create_qp_resp_v3 {
diff --git a/providers/rxe/rxe.c b/providers/rxe/rxe.c
index c6ec95c2bcf80d..5978df3abfa7b5 100644
--- a/providers/rxe/rxe.c
+++ b/providers/rxe/rxe.c
@@ -672,9 +672,9 @@ static int post_send_db(struct ibv_qp *ibqp)
 	struct ibv_post_send cmd;
 	struct ib_uverbs_post_send_resp resp;
 
-	cmd.command	= IB_USER_VERBS_CMD_POST_SEND;
-	cmd.in_words	= sizeof(cmd)/4;
-	cmd.out_words	= sizeof(resp)/4;
+	cmd.hdr.command	= IB_USER_VERBS_CMD_POST_SEND;
+	cmd.hdr.in_words = sizeof(cmd) / 4;
+	cmd.hdr.out_words = sizeof(resp) / 4;
 	cmd.response	= (uintptr_t)&resp;
 	cmd.qp_handle	= ibqp->handle;
 	cmd.wr_count	= 0;
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH rdma-core 02/17] verbs: Include rdma/ib_user_verbs.h in kern-abi.h
       [not found]     ` <20180111221340.965-3-jgg-uk2M96/98Pc@public.gmane.org>
@ 2018-01-12  6:34       ` Leon Romanovsky
       [not found]         ` <20180112063433.GH15760-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 28+ messages in thread
From: Leon Romanovsky @ 2018-01-12  6:34 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Jason Gunthorpe

[-- Attachment #1: Type: text/plain, Size: 3631 bytes --]

On Thu, Jan 11, 2018 at 03:13:25PM -0700, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> There are a few overlapping definitions that are identical in both
> headers, delete them from kern-abi.h to make them includable.
>
> Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  libibverbs/kern-abi.h | 62 ++++++---------------------------------------------
>  1 file changed, 7 insertions(+), 55 deletions(-)
>
> diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
> index f53e22fce5303b..d7acdaa9a4bca9 100644
> --- a/libibverbs/kern-abi.h
> +++ b/libibverbs/kern-abi.h
> @@ -37,9 +37,14 @@
>
>  #include <linux/types.h>
>
> +#include <rdma/ib_user_verbs.h>
> +
>  /*
> - * This file must be kept in sync with the kernel's version of
> - * drivers/infiniband/include/ib_user_verbs.h
> + * This file contains copied data from the kernel's include/uapi/rdma/ib_user_verbs.h,
> + * now included above.
> + *
> + * Whenever possible use the definition from the kernel header and avoid
> + * copying from that header into this file.
>   */
>
>  /*
> @@ -48,59 +53,6 @@
>  #define IB_USER_VERBS_MIN_ABI_VERSION	3
>  #define IB_USER_VERBS_MAX_ABI_VERSION	6
>
> -#define IB_USER_VERBS_CMD_THRESHOLD    50
> -
> -enum {
> -	IB_USER_VERBS_CMD_GET_CONTEXT,
> -	IB_USER_VERBS_CMD_QUERY_DEVICE,
> -	IB_USER_VERBS_CMD_QUERY_PORT,
> -	IB_USER_VERBS_CMD_ALLOC_PD,
> -	IB_USER_VERBS_CMD_DEALLOC_PD,
> -	IB_USER_VERBS_CMD_CREATE_AH,
> -	IB_USER_VERBS_CMD_MODIFY_AH,
> -	IB_USER_VERBS_CMD_QUERY_AH,
> -	IB_USER_VERBS_CMD_DESTROY_AH,
> -	IB_USER_VERBS_CMD_REG_MR,
> -	IB_USER_VERBS_CMD_REG_SMR,
> -	IB_USER_VERBS_CMD_REREG_MR,
> -	IB_USER_VERBS_CMD_QUERY_MR,
> -	IB_USER_VERBS_CMD_DEREG_MR,
> -	IB_USER_VERBS_CMD_ALLOC_MW,
> -	IB_USER_VERBS_CMD_BIND_MW,
> -	IB_USER_VERBS_CMD_DEALLOC_MW,
> -	IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL,
> -	IB_USER_VERBS_CMD_CREATE_CQ,
> -	IB_USER_VERBS_CMD_RESIZE_CQ,
> -	IB_USER_VERBS_CMD_DESTROY_CQ,
> -	IB_USER_VERBS_CMD_POLL_CQ,
> -	IB_USER_VERBS_CMD_PEEK_CQ,
> -	IB_USER_VERBS_CMD_REQ_NOTIFY_CQ,
> -	IB_USER_VERBS_CMD_CREATE_QP,
> -	IB_USER_VERBS_CMD_QUERY_QP,
> -	IB_USER_VERBS_CMD_MODIFY_QP,
> -	IB_USER_VERBS_CMD_DESTROY_QP,
> -	IB_USER_VERBS_CMD_POST_SEND,
> -	IB_USER_VERBS_CMD_POST_RECV,
> -	IB_USER_VERBS_CMD_ATTACH_MCAST,
> -	IB_USER_VERBS_CMD_DETACH_MCAST,
> -	IB_USER_VERBS_CMD_CREATE_SRQ,
> -	IB_USER_VERBS_CMD_MODIFY_SRQ,
> -	IB_USER_VERBS_CMD_QUERY_SRQ,
> -	IB_USER_VERBS_CMD_DESTROY_SRQ,
> -	IB_USER_VERBS_CMD_POST_SRQ_RECV,
> -	IB_USER_VERBS_CMD_OPEN_XRCD,
> -	IB_USER_VERBS_CMD_CLOSE_XRCD,
> -	IB_USER_VERBS_CMD_CREATE_XSRQ,
> -	IB_USER_VERBS_CMD_OPEN_QP
> -};
> -
> -#define IB_USER_VERBS_CMD_COMMAND_MASK		0xff
> -#define IB_USER_VERBS_CMD_FLAGS_MASK		0xff000000u
> -#define IB_USER_VERBS_CMD_FLAGS_SHIFT		24
> -
> -
> -#define IB_USER_VERBS_CMD_FLAG_EXTENDED		0x80ul

This define was added to kernel api (rdma/ib_user_verbs.h) in commit
f21519b23c1b ("IB/core: extended command: an improved infrastructure for uverbs commands")

It means that this proposed commit won't compile on the systems with
kernel dated before 2013. I don't think that it is real issue, but worth
to mention it in commit message/comment.

Thanks

> -
>  /* use this mask for creating extended commands */
>  #define IB_USER_VERBS_CMD_EXTENDED_MASK \
>  	(IB_USER_VERBS_CMD_FLAG_EXTENDED << \
> --
> 2.15.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH rdma-core 02/17] verbs: Include rdma/ib_user_verbs.h in kern-abi.h
       [not found]         ` <20180112063433.GH15760-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2018-01-12 16:28           ` Jason Gunthorpe
  0 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-12 16:28 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Fri, Jan 12, 2018 at 08:34:33AM +0200, Leon Romanovsky wrote:

> > -#define IB_USER_VERBS_CMD_FLAG_EXTENDED		0x80ul
> 
> This define was added to kernel api (rdma/ib_user_verbs.h) in commit
> f21519b23c1b ("IB/core: extended command: an improved infrastructure for uverbs commands")
> 
> It means that this proposed commit won't compile on the systems with
> kernel dated before 2013. I don't think that it is real issue, but worth
> to mention it in commit message/comment.

The very first patch in the series updates the internal copy of the
kernel header to 4.15-rc7 and ensures that systems with old distro
copies use the internal header instead.

Just as we have been doing for other kernel headers for a long time.

So it should build on everything. There are far newer needed symbols
than the one above as well..

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH rdma-core 07/17] verbs: Use kernel uapi names for identical structs
       [not found]     ` <20180111221340.965-8-jgg-uk2M96/98Pc@public.gmane.org>
@ 2018-01-15 16:48       ` Yishai Hadas
       [not found]         ` <2f04c4d8-bc14-9293-2e03-b29074e08637-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 28+ messages in thread
From: Yishai Hadas @ 2018-01-15 16:48 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Jason Gunthorpe, Yishai Hadas

On 1/12/2018 12:13 AM, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> And delete the duplicates from kern-abi.h
> 
> A script was made to find the trivially duplicate structs, which
> produced this sed script:
> 
> $ sed -i \
>   -e 's/struct[ \t]ibv_alloc_mw_resp\([ \t,]\)/struct ib_uverbs_alloc_mw_resp\1/g' \
>   -e 's/struct[ \t]ibv_alloc_pd_resp\([ \t,]\)/struct ib_uverbs_alloc_pd_resp\1/g' \
>   -e 's/struct[ \t]ibv_comp_event\([ \t,]\)/struct ib_uverbs_comp_event_desc\1/g' \
>   -e 's/struct[ \t]ibv_create_comp_channel_resp\([ \t,]\)/struct ib_uverbs_create_comp_channel_resp\1/g' \
>   -e 's/struct[ \t]ibv_create_cq_resp\([ \t,]\)/struct ib_uverbs_create_cq_resp\1/g' \
>   -e 's/struct[ \t]ibv_create_cq_resp_ex\([ \t,]\)/struct ib_uverbs_ex_create_cq_resp\1/g' \
>   -e 's/struct[ \t]ibv_create_flow_resp\([ \t,]\)/struct ib_uverbs_destroy_flow \1/g' \
>   -e 's/struct[ \t]ibv_create_qp_resp\([ \t,]\)/struct ib_uverbs_create_qp_resp\1/g' \
>   -e 's/struct[ \t]ibv_create_qp_resp_ex\([ \t,]\)/struct ib_uverbs_ex_create_qp_resp\1/g' \
>   -e 's/struct[ \t]ibv_create_rwq_ind_table_resp\([ \t,]\)/struct ib_uverbs_ex_create_rwq_ind_table_resp\1/g' \
>   -e 's/struct[ \t]ibv_create_srq_resp\([ \t,]\)/struct ib_uverbs_create_srq_resp\1/g' \
>   -e 's/struct[ \t]ibv_create_wq_resp\([ \t,]\)/struct ib_uverbs_ex_create_wq_resp\1/g' \
>   -e 's/struct[ \t]ibv_destroy_cq_resp\([ \t,]\)/struct ib_uverbs_destroy_cq_resp\1/g' \
>   -e 's/struct[ \t]ibv_destroy_qp_resp\([ \t,]\)/struct ib_uverbs_destroy_qp_resp\1/g' \
>   -e 's/struct[ \t]ibv_destroy_srq_resp\([ \t,]\)/struct ib_uverbs_destroy_qp_resp\1/g' \
>   -e 's/struct[ \t]ibv_destroy_wq_resp\([ \t,]\)/struct ib_uverbs_ex_destroy_wq_resp\1/g' \
>   -e 's/struct[ \t]ibv_get_context_resp\([ \t,]\)/struct ib_uverbs_get_context_resp\1/g' \
>   -e 's/struct[ \t]ibv_kern_ah_attr\([ \t,]\)/struct ib_uverbs_ah_attr\1/g' \
>   -e 's/struct[ \t]ibv_kern_async_event\([ \t,]\)/struct ib_uverbs_async_event_desc\1/g' \
>   -e 's/struct[ \t]ibv_kern_eth_filter\([ \t,]\)/struct ib_uverbs_flow_eth_filter\1/g' \
>   -e 's/struct[ \t]ibv_kern_flow_attr\([ \t,]\)/struct ib_uverbs_flow_attr\1/g' \
>   -e 's/struct[ \t]ibv_kern_global_route\([ \t,]\)/struct ib_uverbs_global_route\1/g' \
>   -e 's/struct[ \t]ibv_kern_ipv4_ext_filter\([ \t,]\)/struct ib_uverbs_flow_ipv4_filter\1/g' \
>   -e 's/struct[ \t]ibv_kern_ipv6_filter\([ \t,]\)/struct ib_uverbs_flow_ipv6_filter\1/g' \
>   -e 's/struct[ \t]ibv_kern_modify_cq_attr\([ \t,]\)/struct ib_uverbs_cq_moderation\1/g' \
>   -e 's/struct[ \t]ibv_kern_qp_attr\([ \t,]\)/struct ib_uverbs_qp_attr\1/g' \
>   -e 's/struct[ \t]ibv_kern_recv_wr\([ \t,]\)/struct ib_uverbs_recv_wr\1/g' \
>   -e 's/struct[ \t]ibv_kern_tcp_udp_filter\([ \t,]\)/struct ib_uverbs_flow_tcp_udp_filter\1/g' \
>   -e 's/struct[ \t]ibv_kern_tunnel_filter\([ \t,]\)/struct ib_uverbs_flow_tunnel_filter\1/g' \
>   -e 's/struct[ \t]ibv_modify_qp_resp_ex\([ \t,]\)/struct ib_uverbs_ex_modify_qp_resp\1/g' \
>   -e 's/struct[ \t]ibv_odp_caps_resp\([ \t,]\)/struct ib_uverbs_odp_caps\1/g' \
>   -e 's/struct[ \t]ibv_open_xrcd_resp\([ \t,]\)/struct ib_uverbs_close_xrcd\1/g' \
>   -e 's/struct[ \t]ibv_post_recv_resp\([ \t,]\)/struct ib_uverbs_post_send_resp\1/g' \
>   -e 's/struct[ \t]ibv_post_send_resp\([ \t,]\)/struct ib_uverbs_post_send_resp\1/g' \
>   -e 's/struct[ \t]ibv_post_srq_recv_resp\([ \t,]\)/struct ib_uverbs_post_recv_resp\1/g' \
>   -e 's/struct[ \t]ibv_qp_dest\([ \t,]\)/struct ib_uverbs_qp_dest\1/g' \
>   -e 's/struct[ \t]ibv_query_device_resp\([ \t,]\)/struct ib_uverbs_query_device_resp\1/g' \
>   -e 's/struct[ \t]ibv_query_port_resp\([ \t,]\)/struct ib_uverbs_query_port_resp\1/g' \
>   -e 's/struct[ \t]ibv_query_qp_resp\([ \t,]\)/struct ib_uverbs_query_qp_resp\1/g' \
>   -e 's/struct[ \t]ibv_query_srq_resp\([ \t,]\)/struct ib_uverbs_query_srq_resp\1/g' \
>   -e 's/struct[ \t]ibv_reg_mr_resp\([ \t,]\)/struct ib_uverbs_reg_mr_resp\1/g' \
>   -e 's/struct[ \t]ibv_rereg_mr_resp\([ \t,]\)/struct ib_uverbs_rereg_mr_resp\1/g' \
>   -e 's/struct[ \t]ibv_resize_cq_resp\([ \t,]\)/struct ib_uverbs_resize_cq_resp\1/g' \
>   -e 's/struct[ \t]ibv_rss_caps_resp\([ \t,]\)/struct ib_uverbs_rss_caps\1/g' \
>   -e 's/struct[ \t]ibv_tm_caps_resp\([ \t,]\)/struct ib_uverbs_tm_caps\1/g' \
>   `git ls-files`
> 
> Followed by hand checking and removing the changed structs from
> kern-abi.h and fixing the trivial residual compiler errors.
> 
> Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>   libibcm/cm.c                          |   2 +-
>   libibverbs/cmd.c                      |  82 +++---
>   libibverbs/device.c                   |   2 +-
>   libibverbs/driver.h                   |  36 +--
>   libibverbs/kern-abi.h                 | 453 ++--------------------------------
>   libibverbs/marshall.c                 |   4 +-
>   libibverbs/marshall.h                 |   4 +-
>   libibverbs/verbs.c                    |   4 +-
>   librdmacm/cma.c                       |   2 +-
>   librdmacm/rdma_cma_abi.h              |   2 +-
>   providers/bnxt_re/bnxt_re-abi.h       |  10 +-
>   providers/cxgb3/iwch-abi.h            |  12 +-
>   providers/cxgb4/cxgb4-abi.h           |  10 +-
>   providers/cxgb4/verbs.c               |   4 +-
>   providers/hfi1verbs/hfi-abi.h         |  10 +-
>   providers/hfi1verbs/hfiverbs.c        |   2 +-
>   providers/hfi1verbs/verbs.c           |  12 +-
>   providers/hns/hns_roce_u_abi.h        |   6 +-
>   providers/hns/hns_roce_u_verbs.c      |   6 +-
>   providers/i40iw/i40iw-abi.h           |   8 +-
>   providers/i40iw/i40iw_uverbs.c        |   6 +-
>   providers/ipathverbs/ipath-abi.h      |  10 +-
>   providers/ipathverbs/ipathverbs.c     |   2 +-
>   providers/ipathverbs/verbs.c          |  12 +-
>   providers/mlx4/mlx4-abi.h             |  14 +-
>   providers/mlx4/verbs.c                |  18 +-
>   providers/mlx5/mlx5-abi.h             |  18 +-
>   providers/mlx5/verbs.c                |  10 +-
>   providers/mthca/mthca-abi.h           |   8 +-
>   providers/mthca/verbs.c               |   6 +-
>   providers/nes/nes-abi.h               |   8 +-
>   providers/nes/nes_uverbs.c            |   6 +-
>   providers/ocrdma/ocrdma_abi.h         |  12 +-
>   providers/ocrdma/ocrdma_verbs.c       |   2 +-
>   providers/qedr/qelr_abi.h             |  10 +-
>   providers/rxe/rxe-abi.h               |  10 +-
>   providers/rxe/rxe.c                   |   8 +-
>   providers/vmw_pvrdma/pvrdma-abi-fix.h |   8 +-
>   providers/vmw_pvrdma/qp.c             |   4 +-
>   providers/vmw_pvrdma/verbs.c          |   2 +-
>   40 files changed, 217 insertions(+), 628 deletions(-)
> 
> diff --git a/libibcm/cm.c b/libibcm/cm.c
> index 4fd3fdd6510a2f..ec9252673bdb5b 100644
> --- a/libibcm/cm.c
> +++ b/libibcm/cm.c
> @@ -335,7 +335,7 @@ int ib_cm_init_qp_attr(struct ib_cm_id *cm_id,
>   		       struct ibv_qp_attr *qp_attr,
>   		       int *qp_attr_mask)
>   {
> -	struct ibv_kern_qp_attr *resp;
> +	struct ib_uverbs_qp_attr *resp;
>   	struct ib_ucm_init_qp_attr *cmd;
>   	void *msg;
>   	int result;
> diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
> index fbd87d475a2751..a675bfb7d02fd3 100644
> --- a/libibverbs/cmd.c
> +++ b/libibverbs/cmd.c
> @@ -46,7 +46,7 @@
>   
>   int ibv_cmd_get_context(struct verbs_context *context_ex,
>   			struct ibv_get_context *cmd, size_t cmd_size,
> -			struct ibv_get_context_resp *resp, size_t resp_size)
> +			struct ib_uverbs_get_context_resp *resp, size_t resp_size)
>   {
>   	IBV_INIT_CMD_RESP(cmd, cmd_size, GET_CONTEXT, resp, resp_size);
>   
> @@ -62,7 +62,7 @@ int ibv_cmd_get_context(struct verbs_context *context_ex,
>   }
>   
>   static void copy_query_dev_fields(struct ibv_device_attr *device_attr,
> -				  struct ibv_query_device_resp *resp,
> +				  struct ib_uverbs_query_device_resp *resp,
>   				  uint64_t *raw_fw_ver)
>   {
>   	*raw_fw_ver				= resp->fw_ver;
> @@ -112,7 +112,7 @@ int ibv_cmd_query_device(struct ibv_context *context,
>   			 uint64_t *raw_fw_ver,
>   			 struct ibv_query_device *cmd, size_t cmd_size)
>   {
> -	struct ibv_query_device_resp resp;
> +	struct ib_uverbs_query_device_resp resp;
>   
>   	IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_DEVICE, &resp, sizeof resp);
>   
> @@ -269,7 +269,7 @@ int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num,
>   		       struct ibv_port_attr *port_attr,
>   		       struct ibv_query_port *cmd, size_t cmd_size)
>   {
> -	struct ibv_query_port_resp resp;
> +	struct ib_uverbs_query_port_resp resp;
>   
>   	IBV_INIT_CMD_RESP(cmd, cmd_size, QUERY_PORT, &resp, sizeof resp);
>   	cmd->port_num = port_num;
> @@ -306,7 +306,7 @@ int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num,
>   
>   int ibv_cmd_alloc_pd(struct ibv_context *context, struct ibv_pd *pd,
>   		     struct ibv_alloc_pd *cmd, size_t cmd_size,
> -		     struct ibv_alloc_pd_resp *resp, size_t resp_size)
> +		     struct ib_uverbs_alloc_pd_resp *resp, size_t resp_size)
>   {
>   	IBV_INIT_CMD_RESP(cmd, cmd_size, ALLOC_PD, resp, resp_size);
>   
> @@ -338,7 +338,7 @@ int ibv_cmd_open_xrcd(struct ibv_context *context, struct verbs_xrcd *xrcd,
>   		      int vxrcd_size,
>   		      struct ibv_xrcd_init_attr *attr,
>   		      struct ibv_open_xrcd *cmd, size_t cmd_size,
> -		      struct ibv_open_xrcd_resp *resp, size_t resp_size)
> +		      struct ib_uverbs_close_xrcd *resp, size_t resp_size)

This had to be ib_uverbs_open_xrcd_resp, correct ? need to fix in the 
drivers' code that uses this as well.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH rdma-core 07/17] verbs: Use kernel uapi names for identical structs
       [not found]         ` <2f04c4d8-bc14-9293-2e03-b29074e08637-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2018-01-15 17:01           ` Jason Gunthorpe
  0 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-15 17:01 UTC (permalink / raw)
  To: Yishai Hadas; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas

On Mon, Jan 15, 2018 at 06:48:06PM +0200, Yishai Hadas wrote:
> >  	IBV_INIT_CMD_RESP(cmd, cmd_size, ALLOC_PD, resp, resp_size);
> >@@ -338,7 +338,7 @@ int ibv_cmd_open_xrcd(struct ibv_context *context, struct verbs_xrcd *xrcd,
> >  		      int vxrcd_size,
> >  		      struct ibv_xrcd_init_attr *attr,
> >  		      struct ibv_open_xrcd *cmd, size_t cmd_size,
> >-		      struct ibv_open_xrcd_resp *resp, size_t resp_size)
> >+		      struct ib_uverbs_close_xrcd *resp, size_t resp_size)
> 
> This had to be ib_uverbs_open_xrcd_resp, correct ? need to fix in the
> drivers' code that uses this as well.

For clarity, yes. I will fix it.. I manually caught many others like
this but missed this one

The two structs are identical, which is why they got conflated
together, so it doesn't create a bug - just confusion:

struct ib_uverbs_open_xrcd_resp {
        __u32 xrcd_handle;
};

struct ib_uverbs_close_xrcd {
        __u32 xrcd_handle;
};
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH rdma-core 01/17] Update rdma/ib_user_verbs.h
       [not found]     ` <20180111221340.965-2-jgg-uk2M96/98Pc@public.gmane.org>
@ 2018-01-15 17:01       ` Yishai Hadas
       [not found]         ` <fe2337a1-b02d-cc01-c55d-e6e493ec30ef-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 28+ messages in thread
From: Yishai Hadas @ 2018-01-15 17:01 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Jason Gunthorpe, Yishai Hadas

On 1/12/2018 12:13 AM, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> To let us use definitions from the latest kernel headers in followup
> patches.
> 
>  From v4.15-rc7
> 
> Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>   buildlib/RDMA_LinuxHeaders.cmake            |    2 +-
>   buildlib/fixup-include/rdma-ib_user_verbs.h | 1176 +++++++++++++++++++++++++++
>   2 files changed, 1177 insertions(+), 1 deletion(-)
>   create mode 100644 buildlib/fixup-include/rdma-ib_user_verbs.h
> 
> diff --git a/buildlib/RDMA_LinuxHeaders.cmake b/buildlib/RDMA_LinuxHeaders.cmake
> index ea60b9b55844ea..aa2a89a53d0c2d 100644
> --- a/buildlib/RDMA_LinuxHeaders.cmake
> +++ b/buildlib/RDMA_LinuxHeaders.cmake
> @@ -86,7 +86,7 @@ function(rdma_report_missing_kheaders)
>   endfunction()
>   
>   # This list is topologically sorted
> -rdma_check_kheader("rdma/ib_user_verbs.h" "${DEFAULT_TEST}" NO_SHIM OPTIONAL)
> +rdma_check_kheader("rdma/ib_user_verbs.h" "int main(int argc,const char *argv[]) { return IB_USER_VERBS_EX_CMD_MODIFY_CQ; }")

Any future change in this kernel header will require a change in this 
check as well and also a commit into fixup-include/rdma-ib_user_verbs.h 
with the new kernel code, correct ?

How will people be aware of that and won't miss it ? can we have some 
script that will warn/suggest the expected change upon a kernel change ?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH rdma-core 01/17] Update rdma/ib_user_verbs.h
       [not found]         ` <fe2337a1-b02d-cc01-c55d-e6e493ec30ef-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2018-01-15 17:10           ` Jason Gunthorpe
       [not found]             ` <20180115171033.GA2206-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-15 17:10 UTC (permalink / raw)
  To: Yishai Hadas; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas

On Mon, Jan 15, 2018 at 07:01:13PM +0200, Yishai Hadas wrote:
> On 1/12/2018 12:13 AM, Jason Gunthorpe wrote:
> >From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >
> >To let us use definitions from the latest kernel headers in followup
> >patches.
> >
> > From v4.15-rc7
> >
> >Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >  buildlib/RDMA_LinuxHeaders.cmake            |    2 +-
> >  buildlib/fixup-include/rdma-ib_user_verbs.h | 1176 +++++++++++++++++++++++++++
> >  2 files changed, 1177 insertions(+), 1 deletion(-)
> >  create mode 100644 buildlib/fixup-include/rdma-ib_user_verbs.h
> >
> >diff --git a/buildlib/RDMA_LinuxHeaders.cmake b/buildlib/RDMA_LinuxHeaders.cmake
> >index ea60b9b55844ea..aa2a89a53d0c2d 100644
> >+++ b/buildlib/RDMA_LinuxHeaders.cmake
> >@@ -86,7 +86,7 @@ function(rdma_report_missing_kheaders)
> >  endfunction()
> >  # This list is topologically sorted
> >-rdma_check_kheader("rdma/ib_user_verbs.h" "${DEFAULT_TEST}" NO_SHIM OPTIONAL)
> >+rdma_check_kheader("rdma/ib_user_verbs.h" "int main(int argc,const char *argv[]) { return IB_USER_VERBS_EX_CMD_MODIFY_CQ; }")
> 
> Any future change in this kernel header will require a change in this check
> as well and also a commit into fixup-include/rdma-ib_user_verbs.h with the
> new kernel code, correct ?

Yes.

> How will people be aware of that and won't miss it ? can we have some script
> that will warn/suggest the expected change upon a kernel change ?

Keeping the header up to date is not a big problem, there is no way to
get new symbols otherwise so people patching in new features have to
do it.

travis always does compiles using these headers as well.

Keeping the check quoted above broadly correct is more difficult. I
can't think of how to automate that, other than to manually inspect
patches that update the header to make sure they update the check as
well.

We could also switch to a more iproute like model where we just
unconditionally use our copies of the kernel headers..

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH rdma-core 01/17] Update rdma/ib_user_verbs.h
       [not found]             ` <20180115171033.GA2206-uk2M96/98Pc@public.gmane.org>
@ 2018-01-22 10:48               ` Yishai Hadas
       [not found]                 ` <c4ee82a7-f235-4370-cf64-d5c73a79bd1b-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 28+ messages in thread
From: Yishai Hadas @ 2018-01-22 10:48 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas, Matan Barak

On 1/15/2018 7:10 PM, Jason Gunthorpe wrote:
> On Mon, Jan 15, 2018 at 07:01:13PM +0200, Yishai Hadas wrote:
>> On 1/12/2018 12:13 AM, Jason Gunthorpe wrote:
>>> From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>>>
>>> To let us use definitions from the latest kernel headers in followup
>>> patches.
>>>
>>>  From v4.15-rc7
>>>
>>> Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>>>   buildlib/RDMA_LinuxHeaders.cmake            |    2 +-
>>>   buildlib/fixup-include/rdma-ib_user_verbs.h | 1176 +++++++++++++++++++++++++++
>>>   2 files changed, 1177 insertions(+), 1 deletion(-)
>>>   create mode 100644 buildlib/fixup-include/rdma-ib_user_verbs.h
>>>
>>> diff --git a/buildlib/RDMA_LinuxHeaders.cmake b/buildlib/RDMA_LinuxHeaders.cmake
>>> index ea60b9b55844ea..aa2a89a53d0c2d 100644
>>> +++ b/buildlib/RDMA_LinuxHeaders.cmake
>>> @@ -86,7 +86,7 @@ function(rdma_report_missing_kheaders)
>>>   endfunction()
>>>   # This list is topologically sorted
>>> -rdma_check_kheader("rdma/ib_user_verbs.h" "${DEFAULT_TEST}" NO_SHIM OPTIONAL)
>>> +rdma_check_kheader("rdma/ib_user_verbs.h" "int main(int argc,const char *argv[]) { return IB_USER_VERBS_EX_CMD_MODIFY_CQ; }")
>>
>> Any future change in this kernel header will require a change in this check
>> as well and also a commit into fixup-include/rdma-ib_user_verbs.h with the
>> new kernel code, correct ?
> 
> Yes.
> 
>> How will people be aware of that and won't miss it ? can we have some script
>> that will warn/suggest the expected change upon a kernel change ?
> 
> Keeping the header up to date is not a big problem, there is no way to
> get new symbols otherwise so people patching in new features have to
> do it.
> 
> travis always does compiles using these headers as well.
> 
> Keeping the check quoted above broadly correct is more difficult. I
> can't think of how to automate that, other than to manually inspect
> patches that update the header to make sure they update the check as
> well.
> 
> We could also switch to a more iproute like model where we just
> unconditionally use our copies of the kernel headers..

Are you referring to drop the cmake linux header check and always use a 
private copy of the latest kernel UAPI file in rdma-core ? it can make 
more sense comparing to current candidate code.

It can reside in a folder named 'rdma' and not installed by rdma-core as 
applications don't use this file. If so we can drop the fixup file and 
its matching check.

What do you think ?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH rdma-core 01/17] Update rdma/ib_user_verbs.h
       [not found]                 ` <c4ee82a7-f235-4370-cf64-d5c73a79bd1b-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2018-01-22 15:42                   ` Jason Gunthorpe
       [not found]                     ` <20180122154206.GC14372-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-22 15:42 UTC (permalink / raw)
  To: Yishai Hadas; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas, Matan Barak

On Mon, Jan 22, 2018 at 12:48:48PM +0200, Yishai Hadas wrote:

> >We could also switch to a more iproute like model where we just
> >unconditionally use our copies of the kernel headers..
> 
> Are you referring to drop the cmake linux header check and always use a
> private copy of the latest kernel UAPI file in rdma-core ? it can make more
> sense comparing to current candidate code.

Yes

> It can reside in a folder named 'rdma' and not installed by rdma-core as
> applications don't use this file. If so we can drop the fixup file and its
> matching check.
>
> What do you think ?

It seems worth doing now, but not as part of this series

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH rdma-core 01/17] Update rdma/ib_user_verbs.h
       [not found]                     ` <20180122154206.GC14372-uk2M96/98Pc@public.gmane.org>
@ 2018-01-22 15:56                       ` Yishai Hadas
  0 siblings, 0 replies; 28+ messages in thread
From: Yishai Hadas @ 2018-01-22 15:56 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas, Matan Barak,
	Majd Dibbiny

On 1/22/2018 5:42 PM, Jason Gunthorpe wrote:
> On Mon, Jan 22, 2018 at 12:48:48PM +0200, Yishai Hadas wrote:
> 
>>> We could also switch to a more iproute like model where we just
>>> unconditionally use our copies of the kernel headers..
>>
>> Are you referring to drop the cmake linux header check and always use a
>> private copy of the latest kernel UAPI file in rdma-core ? it can make more
>> sense comparing to current candidate code.
> 
> Yes
> 
>> It can reside in a folder named 'rdma' and not installed by rdma-core as
>> applications don't use this file. If so we can drop the fixup file and its
>> matching check.
>>
>> What do you think ?
> 
> It seems worth doing now, but not as part of this series

OK, so let's go ahead, merge the series and do that just later with some 
refactoring series to have the solution as part of this rdma-core release.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH rdma-core 00/17] Use the kernel ABI header instead of kern-abi.h
       [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (16 preceding siblings ...)
  2018-01-11 22:13   ` [PATCH rdma-core 17/17] verbs: Tidy up the remaining structs in kern-abi.h Jason Gunthorpe
@ 2018-01-22 17:37   ` Jason Gunthorpe
  17 siblings, 0 replies; 28+ messages in thread
From: Jason Gunthorpe @ 2018-01-22 17:37 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Thu, Jan 11, 2018 at 03:13:23PM -0700, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> This substantially eliminates most of kern-abi.h. All that remains are the
> structs that have been modified by appending the header.
> 
> Much of the hard work was done via an automatic script.
> 
> I've been threatening to do this for some time, but forthcoming work on the
> kabi has now made it timely.
> 
> This is a github pull request:
> 
> https://github.com/linux-rdma/rdma-core/pull/282

Merged. ops_fix as well.

Unfortunately the merge message went awry from the github UI and
didn't get word wrapped :(

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2018-01-22 17:37 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-11 22:13 [PATCH rdma-core 00/17] Use the kernel ABI header instead of kern-abi.h Jason Gunthorpe
     [not found] ` <20180111221340.965-1-jgg-uk2M96/98Pc@public.gmane.org>
2018-01-11 22:13   ` [PATCH rdma-core 01/17] Update rdma/ib_user_verbs.h Jason Gunthorpe
     [not found]     ` <20180111221340.965-2-jgg-uk2M96/98Pc@public.gmane.org>
2018-01-15 17:01       ` Yishai Hadas
     [not found]         ` <fe2337a1-b02d-cc01-c55d-e6e493ec30ef-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2018-01-15 17:10           ` Jason Gunthorpe
     [not found]             ` <20180115171033.GA2206-uk2M96/98Pc@public.gmane.org>
2018-01-22 10:48               ` Yishai Hadas
     [not found]                 ` <c4ee82a7-f235-4370-cf64-d5c73a79bd1b-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2018-01-22 15:42                   ` Jason Gunthorpe
     [not found]                     ` <20180122154206.GC14372-uk2M96/98Pc@public.gmane.org>
2018-01-22 15:56                       ` Yishai Hadas
2018-01-11 22:13   ` [PATCH rdma-core 02/17] verbs: Include rdma/ib_user_verbs.h in kern-abi.h Jason Gunthorpe
     [not found]     ` <20180111221340.965-3-jgg-uk2M96/98Pc@public.gmane.org>
2018-01-12  6:34       ` Leon Romanovsky
     [not found]         ` <20180112063433.GH15760-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-12 16:28           ` Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 03/17] verbs: Delete extended command definitions from kern-abi.h Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 04/17] verbs: Remove unused structs Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 05/17] verbs: Remove kernel ABI v2 compat cruft Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 06/17] verbs: Add missing endian annotations to kern-abi.h Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 07/17] verbs: Use kernel uapi names for identical structs Jason Gunthorpe
     [not found]     ` <20180111221340.965-8-jgg-uk2M96/98Pc@public.gmane.org>
2018-01-15 16:48       ` Yishai Hadas
     [not found]         ` <2f04c4d8-bc14-9293-2e03-b29074e08637-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2018-01-15 17:01           ` Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 08/17] verbs: Use kernel uapi header for ibv_cq_moderation_caps_resp Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 09/17] verbs: Use kernel uapi header for ibv_query_device_resp_ex Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 10/17] verbs: Use kernel uapi header for ibv_kern_wc and ibv_poll_cq_resp Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 11/17] verbs: Use kernel uapi header for ibv_create_ah_resp Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 12/17] verbs: Use kernel uapi header for ibv_kern_send_wr Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 13/17] verbs: Use kernel uapi header for IBV_CREATE_QP_EX_KERNEL_MASK_IND_TABLE Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 14/17] verbs: Use kernel uapi header for flow steering types Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 15/17] verbs: Use kernel uapi header for ibv_modify_qp_common Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 16/17] verb: Use kernel uapi header in struct ex_hdr Jason Gunthorpe
2018-01-11 22:13   ` [PATCH rdma-core 17/17] verbs: Tidy up the remaining structs in kern-abi.h Jason Gunthorpe
2018-01-22 17:37   ` [PATCH rdma-core 00/17] Use the kernel ABI header instead of kern-abi.h Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.