Export vendors specific ABIs
Subsystems (5)
v2 cover Export vendors specific ABIs
The consolidate library revealed the fact that vendor specific structures and defines are copy/pasted between kernel and user-space.
This patch set moves these headers from internal driver directory to common place and unifies their name to be drivername-abi.h, so it will be easily shared by numerous libraries supported in https://github.com/linux-rdma/rdma-core.git.
The drivers which were NOT handled in this patch set are hfi, qib, rxe, usnic and i40iw.
Available in the "topic/uapi-abi" topic branch of this git repo:git://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git
Or for browsing:
https://git.kernel.org/cgit/linux/kernel/git/leon/linux-rdma.git/log/?h=topic/uapi-abi
Thanks
Changelog v1->v2:
* Added Steve's ROB tags for cxgb3/cxgb4
* Added mthca driver to the list of exposed drivers
Leon Romanovsky (9):
IB/mlx5: Move and decouple user vendor structures IB/cxgb3: Move user vendor structures IB/cxgb4: Move user vendor structures IB/mlx4: Move user vendor structures IB/ocrdma: Move user vendor structures IB/nes: Move user vendor structures IB/mthca: Move user vendor structures IB/core: Export vendor specific structures
MAINTAINERS: Update RDMA vendor specific UAPI files
MAINTAINERS | 6 + drivers/infiniband/hw/cxgb3/iwch.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_user.h | 74 ------- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +- drivers/infiniband/hw/cxgb4/user.h | 80 -------- drivers/infiniband/hw/mlx4/cq.c | 2 +- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx4/srq.c | 2 +- drivers/infiniband/hw/mlx4/user.h | 107 ---------- drivers/infiniband/hw/mlx5/cq.c | 1 - drivers/infiniband/hw/mlx5/main.c | 1 - drivers/infiniband/hw/mlx5/mlx5_ib.h | 37 ++++ drivers/infiniband/hw/mlx5/mr.c | 1 - drivers/infiniband/hw/mlx5/qp.c | 1 - drivers/infiniband/hw/mlx5/srq.c | 1 - drivers/infiniband/hw/mlx5/user.h | 281 --------------------------- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- drivers/infiniband/hw/nes/nes.h | 2 +- drivers/infiniband/hw/nes/nes_user.h | 114 ----------- drivers/infiniband/hw/ocrdma/ocrdma_abi.h | 149 -------------- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- include/uapi/rdma/Kbuild | 7 + include/uapi/rdma/cxgb3-abi.h | 76 ++++++++ include/uapi/rdma/cxgb4-abi.h | 81 ++++++++ include/uapi/rdma/mlx4-abi.h | 107 ++++++++++ include/uapi/rdma/mlx5-abi.h | 242 +++++++++++++++++++++++ include/uapi/rdma/mthca-abi.h | 111 +++++++++++ include/uapi/rdma/nes-abi.h | 114 +++++++++++ include/uapi/rdma/ocrdma-abi.h | 151 ++++++++++++++ 32 files changed, 943 insertions(+), 821 deletions(-) delete mode 100644 drivers/infiniband/hw/cxgb3/iwch_user.h delete mode 100644 drivers/infiniband/hw/cxgb4/user.h delete mode 100644 drivers/infiniband/hw/mlx4/user.h delete mode 100644 drivers/infiniband/hw/mlx5/user.h delete mode 100644 drivers/infiniband/hw/nes/nes_user.h delete mode 100644 drivers/infiniband/hw/ocrdma/ocrdma_abi.h create mode 100644 include/uapi/rdma/cxgb3-abi.h create mode 100644 include/uapi/rdma/cxgb4-abi.h create mode 100644 include/uapi/rdma/mlx4-abi.h create mode 100644 include/uapi/rdma/mlx5-abi.h create mode 100644 include/uapi/rdma/mthca-abi.h create mode 100644 include/uapi/rdma/nes-abi.h create mode 100644 include/uapi/rdma/ocrdma-abi.h
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1474554679-21953-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
PATCH v2 1/9 IB/mlx5: Move and decouple user vendor structures
This patch decouples and moves vendors specific structures to common UAPI folder which will be visible to all consumers.
These structures are used by user-space library driver (libmlx5) and currently manually copied to that library.
This move will allow cross-compile against these files and simplify introduction of vendor specific data.
--- drivers/infiniband/hw/mlx5/cq.c | 1 - drivers/infiniband/hw/mlx5/main.c | 1 - drivers/infiniband/hw/mlx5/mlx5_ib.h | 37 +++++ drivers/infiniband/hw/mlx5/mr.c | 1 - drivers/infiniband/hw/mlx5/qp.c | 1 - drivers/infiniband/hw/mlx5/srq.c | 1 - drivers/infiniband/hw/mlx5/user.h | 281 ----------------------------------- include/uapi/rdma/mlx5-abi.h | 242 ++++++++++++++++++++++++++++++ 8 files changed, 279 insertions(+), 286 deletions(-) delete mode 100644 drivers/infiniband/hw/mlx5/user.h create mode 100644 include/uapi/rdma/mlx5-abi.h
drivers/infiniband/hw/mlx5/cq.c +0 -1
@@ -35,7 +35,6 @@#include <rdma/ib_user_verbs.h> #include <rdma/ib_cache.h> #include "mlx5_ib.h" -#include "user.h" static void mlx5_ib_cq_comp (struct mlx5_core_cq *cq) {
drivers/infiniband/hw/mlx5/main.c +0 -1
@@ -53,7 +53,6 @@#include <linux/in.h> #include <linux/etherdevice.h> #include <linux/mlx5/fs.h> -#include "user.h" #include "mlx5_ib.h" #define DRIVER_NAME "mlx5_ib"
drivers/infiniband/hw/mlx5/mlx5_ib.h +37 -0
@@ -44,6 +44,7 @@#include <linux/types.h> #include <linux/mlx5/transobj.h> #include <rdma/ib_user_verbs.h> +#include <rdma/mlx5-abi.h> #define mlx5_ib_dbg(dev, format, arg...) \ pr_debug("%s:%s:%d:(pid %d): " format, (dev)->ib_dev.name, __func__, \
@@ -946,4 +947,40 @@ static inline int verify_assign_uidx(u8 cqe_version, u32 cmd_uidx,return 0 ; } + +static inline int get_qp_user_index (struct mlx5_ib_ucontext *ucontext, +struct mlx5_ib_create_qp *ucmd, +int inlen, +u32 *user_index) +{ +u8 cqe_version = ucontext->cqe_version; + + if (field_avail(struct mlx5_ib_create_qp, uidx, inlen) && + !cqe_version && (ucmd->uidx ==MLX5_IB_DEFAULT_UIDX )) +return 0 ; + + if (!!(field_avail(struct mlx5_ib_create_qp, uidx, inlen) != + !!cqe_version)) +return -EINVAL ; + +return verify_assign_uidx (cqe_version, ucmd->uidx, user_index); +} + +static inline int get_srq_user_index (struct mlx5_ib_ucontext *ucontext, +struct mlx5_ib_create_srq *ucmd, +int inlen, +u32 *user_index) +{ +u8 cqe_version = ucontext->cqe_version; + + if (field_avail(struct mlx5_ib_create_srq, uidx, inlen) && + !cqe_version && (ucmd->uidx ==MLX5_IB_DEFAULT_UIDX )) +return 0 ; + + if (!!(field_avail(struct mlx5_ib_create_srq, uidx, inlen) != + !!cqe_version)) +return -EINVAL ; + +return verify_assign_uidx (cqe_version, ucmd->uidx, user_index); +}#endif /* MLX5_IB_H */
drivers/infiniband/hw/mlx5/mr.c +0 -1
@@ -40,7 +40,6 @@#include <rdma/ib_umem_odp.h> #include <rdma/ib_verbs.h> #include "mlx5_ib.h" -#include "user.h" enum {MAX_PENDING_REG_MR =8 ,
drivers/infiniband/hw/mlx5/qp.c +0 -1
@@ -35,7 +35,6 @@#include <rdma/ib_cache.h> #include <rdma/ib_user_verbs.h> #include "mlx5_ib.h" -#include "user.h" /* not supported currently */ static int wq_signature;
drivers/infiniband/hw/mlx5/srq.c +0 -1
@@ -38,7 +38,6 @@#include <rdma/ib_user_verbs.h> #include "mlx5_ib.h" -#include "user.h" /* not supported currently */ static int srq_signature;
drivers/infiniband/hw/mlx5/user.h deleted +0 -281
281 lines not on this page · raw message
include/uapi/rdma/mlx5-abi.h new file +242 -0
242 lines not on this page · raw message
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 2/9 IB/cxgb3: Move user vendor structures
In reply to a message not in the archiveThis patch moves cxgb3 vendor's specific structures to common UAPI folder which will be visible to all consumers.
These structures are used by user-space library driver (libcxgb3) and currently manually copied to that library.
This move will allow cross-compile against these files and simplify introduction of vendor specific data.
--- drivers/infiniband/hw/cxgb3/iwch.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_user.h | 74 ---------------------------- include/uapi/rdma/cxgb3-abi.h | 76 +++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 76 deletions(-) delete mode 100644 drivers/infiniband/hw/cxgb3/iwch_user.h create mode 100644 include/uapi/rdma/cxgb3-abi.h
drivers/infiniband/hw/cxgb3/iwch.c +1 -1
@@ -36,7 +36,7 @@#include "cxgb3_offload.h" #include "iwch_provider.h" -#include "iwch_user.h" +#include <rdma/cxgb3-abi.h> #include "iwch.h" #include "iwch_cm.h"
drivers/infiniband/hw/cxgb3/iwch_provider.c +1 -1
@@ -58,7 +58,7 @@#include "iwch.h" #include "iwch_provider.h" #include "iwch_cm.h" -#include "iwch_user.h" +#include <rdma/cxgb3-abi.h> #include "common.h" static struct ib_ah *iwch_ah_create(struct ib_pd *pd,
drivers/infiniband/hw/cxgb3/iwch_user.h deleted +0 -74
74 lines not on this page · raw message
include/uapi/rdma/cxgb3-abi.h new file +76 -0
76 lines not on this page · raw message
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 3/9 IB/cxgb4: Move user vendor structures
In reply to a message not in the archiveThis patch moves cxgb4 vendor's specific structures to common UAPI folder which will be visible to all consumers.
These structures are used by user-space library driver (libcxgb4) and currently manually copied to that library.
This move will allow cross-compile against these files and simplify introduction of vendor specific data.
--- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +- drivers/infiniband/hw/cxgb4/user.h | 80 --------------------------------- include/uapi/rdma/cxgb4-abi.h | 81 ++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 81 deletions(-) delete mode 100644 drivers/infiniband/hw/cxgb4/user.h create mode 100644 include/uapi/rdma/cxgb4-abi.h
drivers/infiniband/hw/cxgb4/iw_cxgb4.h +1 -1
@@ -58,7 +58,7 @@#include "cxgb4.h" #include "cxgb4_uld.h" #include "l2t.h" -#include "user.h" +#include <rdma/cxgb4-abi.h> #define DRV_NAME "iw_cxgb4"#define MOD DRV_NAME ":"
drivers/infiniband/hw/cxgb4/user.h deleted +0 -80
80 lines not on this page · raw message
include/uapi/rdma/cxgb4-abi.h new file +81 -0
81 lines not on this page · raw message
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 4/9 IB/mlx4: Move user vendor structures
In reply to a message not in the archiveThis patch moves mlx4 vendor's specific structures to common UAPI folder which will be visible to all consumers.
These structures are used by user-space library driver (libmlx4) and currently manually copied to that library.
This move will allow cross-compile against these files and simplify introduction of vendor specific data.
--- drivers/infiniband/hw/mlx4/cq.c | 2 +- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx4/srq.c | 2 +- drivers/infiniband/hw/mlx4/user.h | 107 -------------------------------------- include/uapi/rdma/mlx4-abi.h | 107 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 111 insertions(+), 111 deletions(-) delete mode 100644 drivers/infiniband/hw/mlx4/user.h create mode 100644 include/uapi/rdma/mlx4-abi.h
drivers/infiniband/hw/mlx4/cq.c +1 -1
@@ -37,7 +37,7 @@#include <linux/slab.h> #include "mlx4_ib.h" -#include "user.h" +#include <rdma/mlx4-abi.h> static void mlx4_ib_cq_comp (struct mlx4_cq *cq) {
drivers/infiniband/hw/mlx4/main.c +1 -1
@@ -55,7 +55,7 @@#include <linux/mlx4/qp.h> #include "mlx4_ib.h" -#include "user.h" +#include <rdma/mlx4-abi.h> #define DRV_NAME MLX4_IB_DRV_NAME#define DRV_VERSION "2.2-1"
drivers/infiniband/hw/mlx4/qp.c +1 -1
@@ -47,7 +47,7 @@#include <linux/mlx4/qp.h> #include "mlx4_ib.h" -#include "user.h" +#include <rdma/mlx4-abi.h> static void mlx4_ib_lock_cqs (struct mlx4_ib_cq *send_cq,struct mlx4_ib_cq *recv_cq);
drivers/infiniband/hw/mlx4/srq.c +1 -1
@@ -37,7 +37,7 @@#include <linux/vmalloc.h> #include "mlx4_ib.h" -#include "user.h" +#include <rdma/mlx4-abi.h> static void *get_wqe (struct mlx4_ib_srq *srq,int n) {
drivers/infiniband/hw/mlx4/user.h deleted +0 -107
107 lines not on this page · raw message
include/uapi/rdma/mlx4-abi.h new file +107 -0
107 lines not on this page · raw message
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 5/9 IB/ocrdma: Move user vendor structures
In reply to a message not in the archiveThis patch moves ocrdma vendor's specific structures to common UAPI folder which will be visible to all consumers.
These structures are used by user-space library driver (libmlx4) and currently manually copied to that library.
This move will allow cross-compile against these files and simplify introduction of vendor specific data.
In addition, it changes types to be __uXX instead of uXX.
--- drivers/infiniband/hw/ocrdma/ocrdma_abi.h | 149 --------------------------- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- include/uapi/rdma/ocrdma-abi.h | 151 ++++++++++++++++++++++++++++ 4 files changed, 153 insertions(+), 151 deletions(-) delete mode 100644 drivers/infiniband/hw/ocrdma/ocrdma_abi.h create mode 100644 include/uapi/rdma/ocrdma-abi.h
drivers/infiniband/hw/ocrdma/ocrdma_abi.h deleted +0 -149
@@ -1,149 +0,0 @@ -/* This file is part of the Emulex RoCE Device Driver for -* RoCE (RDMA over Converged Ethernet) adapters. -* Copyright (C) 2012-2015 Emulex. All rights reserved. -* EMULEX and SLI are trademarks of Emulex. -* www.emulex.com -* -* 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 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. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* Contact Information: -* [email protected] -* -* Emulex -* 3333 Susan Street -* Costa Mesa, CA 92626 -*/ - -#ifndef __OCRDMA_ABI_H__ -#define __OCRDMA_ABI_H__ - -#define OCRDMA_ABI_VERSION 2 -#define OCRDMA_BE_ROCE_ABI_VERSION 1 -/* user kernel communication data structures. */ - -struct ocrdma_alloc_ucontext_resp { -u32 dev_id; -u32 wqe_size; -u32 max_inline_data; -u32 dpp_wqe_size; -u64 ah_tbl_page; -u32 ah_tbl_len; -u32 rqe_size; -u8 fw_ver[32 ]; -/* for future use/new features in progress */ -u64 rsvd1; -u64 rsvd2; -}; - -struct ocrdma_alloc_pd_ureq { -u64 rsvd1; -}; - -struct ocrdma_alloc_pd_uresp { -u32 id; -u32 dpp_enabled; -u32 dpp_page_addr_hi; -u32 dpp_page_addr_lo; -u64 rsvd1; -}; - -struct ocrdma_create_cq_ureq { -u32 dpp_cq; -u32 rsvd;/* pad */ -}; - -#define MAX_CQ_PAGES 8 -struct ocrdma_create_cq_uresp { -u32 cq_id; -u32 page_size; -u32 num_pages; -u32 max_hw_cqe; -u64 page_addr[MAX_CQ_PAGES ]; -u64 db_page_addr; -u32 db_page_size; -u32 phase_change; -/* for future use/new features in progress */ -u64 rsvd1; -u64 rsvd2; -}; - -#define MAX_QP_PAGES 8 -#define MAX_UD_AV_PAGES 8 - -struct ocrdma_create_qp_ureq { -u8 enable_dpp_cq; -u8 rsvd; -u16 dpp_cq_id; -u32 rsvd1;/* pad */ -}; - -struct ocrdma_create_qp_uresp { -u16 qp_id; -u16 sq_dbid; -u16 rq_dbid; -u16 resv0;/* pad */ -u32 sq_page_size; -u32 rq_page_size; -u32 num_sq_pages; -u32 num_rq_pages; -u64 sq_page_addr[MAX_QP_PAGES ]; -u64 rq_page_addr[MAX_QP_PAGES ]; -u64 db_page_addr; -u32 db_page_size; -u32 dpp_credit; -u32 dpp_offset; -u32 num_wqe_allocated; -u32 num_rqe_allocated; -u32 db_sq_offset; -u32 db_rq_offset; -u32 db_shift; -u64 rsvd[11 ]; -} __packed; - -struct ocrdma_create_srq_uresp { -u16 rq_dbid; -u16 resv0;/* pad */ -u32 resv1; - -u32 rq_page_size; -u32 num_rq_pages; - -u64 rq_page_addr[MAX_QP_PAGES ]; -u64 db_page_addr; - -u32 db_page_size; -u32 num_rqe_allocated; -u32 db_rq_offset; -u32 db_shift; - -u64 rsvd2; -u64 rsvd3; -}; - -#endif /* __OCRDMA_ABI_H__ */
drivers/infiniband/hw/ocrdma/ocrdma_main.c +1 -1
@@ -56,7 +56,7 @@#include "be_roce.h" #include "ocrdma_hw.h" #include "ocrdma_stats.h" -#include "ocrdma_abi.h" +#include <rdma/ocrdma-abi.h> MODULE_VERSION (OCRDMA_ROCE_DRV_VERSION );MODULE_DESCRIPTION (OCRDMA_ROCE_DRV_DESC " " OCRDMA_ROCE_DRV_VERSION );
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1 -1
@@ -51,7 +51,7 @@#include "ocrdma.h" #include "ocrdma_hw.h" #include "ocrdma_verbs.h" -#include "ocrdma_abi.h" +#include <rdma/ocrdma-abi.h> int ocrdma_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) {
include/uapi/rdma/ocrdma-abi.h new file +151 -0
151 lines not on this page · raw message
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1474554679-21953-6-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Devesh Sharma
Acked-byRe: [PATCH rdma-next V2 5/9] IB/ocrdma: Move user vendor structures
Quoted 362 lines · Leon Romanovsky
This patch moves ocrdma vendor's specific structures to common UAPI folder which will be visible to all consumers.
These structures are used by user-space library driver (libmlx4) and currently manually copied to that library.
This move will allow cross-compile against these files and simplify introduction of vendor specific data.
In addition, it changes types to be
__uXXinstead of uXX.Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/hw/ocrdma/ocrdma_abi.h | 149 --------------------------- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- include/uapi/rdma/ocrdma-abi.h | 151 ++++++++++++++++++++++++++++ 4 files changed, 153 insertions(+), 151 deletions(-) delete mode 100644 drivers/infiniband/hw/ocrdma/ocrdma_abi.h create mode 100644 include/uapi/rdma/ocrdma-abi.hdrivers/infiniband/hw/ocrdma/ocrdma_abi.h deleted +0
-149@@ -1,149 +0,0 @@ -/* This file is part of the Emulex RoCE Device Driver for -* RoCE (RDMA over Converged Ethernet) adapters. -* Copyright (C) 2012-2015 Emulex. All rights reserved. -* EMULEX and SLI are trademarks of Emulex. -* www.emulex.com -* -* 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 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. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* Contact Information: -* [email protected] -* -* Emulex -* 3333 Susan Street -* Costa Mesa, CA 92626 -*/ - -#ifndef __OCRDMA_ABI_H__ -#define __OCRDMA_ABI_H__ - -#define OCRDMA_ABI_VERSION 2 -#define OCRDMA_BE_ROCE_ABI_VERSION 1 -/* user kernel communication data structures. */ - -struct ocrdma_alloc_ucontext_resp { -u32 dev_id; -u32 wqe_size; -u32 max_inline_data; -u32 dpp_wqe_size; -u64 ah_tbl_page; -u32 ah_tbl_len; -u32 rqe_size; -u8 fw_ver[32 ]; -/* for future use/new features in progress */ -u64 rsvd1; -u64 rsvd2; -}; - -struct ocrdma_alloc_pd_ureq { -u64 rsvd1; -}; - -struct ocrdma_alloc_pd_uresp { -u32 id; -u32 dpp_enabled; -u32 dpp_page_addr_hi; -u32 dpp_page_addr_lo; -u64 rsvd1; -}; - -struct ocrdma_create_cq_ureq { -u32 dpp_cq; -u32 rsvd;/* pad */ -}; - -#define MAX_CQ_PAGES 8 -struct ocrdma_create_cq_uresp { -u32 cq_id; -u32 page_size; -u32 num_pages; -u32 max_hw_cqe; -u64 page_addr[MAX_CQ_PAGES ]; -u64 db_page_addr; -u32 db_page_size; -u32 phase_change; -/* for future use/new features in progress */ -u64 rsvd1; -u64 rsvd2; -}; - -#define MAX_QP_PAGES 8 -#define MAX_UD_AV_PAGES 8 - -struct ocrdma_create_qp_ureq { -u8 enable_dpp_cq; -u8 rsvd; -u16 dpp_cq_id; -u32 rsvd1;/* pad */ -}; - -struct ocrdma_create_qp_uresp { -u16 qp_id; -u16 sq_dbid; -u16 rq_dbid; -u16 resv0;/* pad */ -u32 sq_page_size; -u32 rq_page_size; -u32 num_sq_pages; -u32 num_rq_pages; -u64 sq_page_addr[MAX_QP_PAGES ]; -u64 rq_page_addr[MAX_QP_PAGES ]; -u64 db_page_addr; -u32 db_page_size; -u32 dpp_credit; -u32 dpp_offset; -u32 num_wqe_allocated; -u32 num_rqe_allocated; -u32 db_sq_offset; -u32 db_rq_offset; -u32 db_shift; -u64 rsvd[11 ]; -} __packed; - -struct ocrdma_create_srq_uresp { -u16 rq_dbid; -u16 resv0;/* pad */ -u32 resv1; - -u32 rq_page_size; -u32 num_rq_pages; - -u64 rq_page_addr[MAX_QP_PAGES ]; -u64 db_page_addr; - -u32 db_page_size; -u32 num_rqe_allocated; -u32 db_rq_offset; -u32 db_shift; - -u64 rsvd2; -u64 rsvd3; -}; - -#endif /* __OCRDMA_ABI_H__ */ drivers/infiniband/hw/ocrdma/ocrdma_main.c +1
-1@@ -56,7 +56,7 @@#include "be_roce.h" #include "ocrdma_hw.h" #include "ocrdma_stats.h" -#include "ocrdma_abi.h" +#include <rdma/ocrdma-abi.h> MODULE_VERSION (OCRDMA_ROCE_DRV_VERSION );MODULE_DESCRIPTION (OCRDMA_ROCE_DRV_DESC " " OCRDMA_ROCE_DRV_VERSION );drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1
-1@@ -51,7 +51,7 @@#include "ocrdma.h" #include "ocrdma_hw.h" #include "ocrdma_verbs.h" -#include "ocrdma_abi.h" +#include <rdma/ocrdma-abi.h> int ocrdma_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) {include/uapi/rdma/ocrdma-abi.h new file +151
-1@@ -0,0 +1,151 @@ +/* This file is part of the Emulex RoCE Device Driver for +* RoCE (RDMA over Converged Ethernet) adapters. +* Copyright (C) 2012-2015 Emulex. All rights reserved. +* EMULEX and SLI are trademarks of Emulex. +* www.emulex.com +* +* 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 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. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* Contact Information: +* [email protected] +* +* Emulex +* 3333 Susan Street +* Costa Mesa, CA 92626 +*/ + +#ifndef OCRDMA_ABI_USER_H +#define OCRDMA_ABI_USER_H + +#include <linux/types.h> + +#define OCRDMA_ABI_VERSION 2 +#define OCRDMA_BE_ROCE_ABI_VERSION 1 +/* user kernel communication data structures. */ + +struct ocrdma_alloc_ucontext_resp { +__u32 dev_id; +__u32 wqe_size; +__u32 max_inline_data; +__u32 dpp_wqe_size; +__u64 ah_tbl_page; +__u32 ah_tbl_len; +__u32 rqe_size; +__u8 fw_ver[32 ]; +/* for future use/new features in progress */ +__u64 rsvd1; +__u64 rsvd2; +}; + +struct ocrdma_alloc_pd_ureq { +__u64 rsvd1; +}; + +struct ocrdma_alloc_pd_uresp { +__u32 id; +__u32 dpp_enabled; +__u32 dpp_page_addr_hi; +__u32 dpp_page_addr_lo; +__u64 rsvd1; +}; + +struct ocrdma_create_cq_ureq { +__u32 dpp_cq; +__u32 rsvd;/* pad */ +}; + +#define MAX_CQ_PAGES 8 +struct ocrdma_create_cq_uresp { +__u32 cq_id; +__u32 page_size; +__u32 num_pages; +__u32 max_hw_cqe; +__u64 page_addr[MAX_CQ_PAGES ]; +__u64 db_page_addr; +__u32 db_page_size; +__u32 phase_change; +/* for future use/new features in progress */ +__u64 rsvd1; +__u64 rsvd2; +}; + +#define MAX_QP_PAGES 8 +#define MAX_UD_AV_PAGES 8 + +struct ocrdma_create_qp_ureq { +__u8 enable_dpp_cq; +__u8 rsvd; +__u16 dpp_cq_id; +__u32 rsvd1;/* pad */ +}; + +struct ocrdma_create_qp_uresp { +__u16 qp_id; +__u16 sq_dbid; +__u16 rq_dbid; +__u16 resv0;/* pad */ +__u32 sq_page_size; +__u32 rq_page_size; +__u32 num_sq_pages; +__u32 num_rq_pages; +__u64 sq_page_addr[MAX_QP_PAGES ]; +__u64 rq_page_addr[MAX_QP_PAGES ]; +__u64 db_page_addr; +__u32 db_page_size; +__u32 dpp_credit; +__u32 dpp_offset; +__u32 num_wqe_allocated; +__u32 num_rqe_allocated; +__u32 db_sq_offset; +__u32 db_rq_offset; +__u32 db_shift; +__u64 rsvd[11 ]; +} __packed; + +struct ocrdma_create_srq_uresp { +__u16 rq_dbid; +__u16 resv0;/* pad */ +__u32 resv1; + +__u32 rq_page_size; +__u32 num_rq_pages; + +__u64 rq_page_addr[MAX_QP_PAGES ]; +__u64 db_page_addr; + +__u32 db_page_size; +__u32 num_rqe_allocated; +__u32 db_rq_offset; +__u32 db_shift; + +__u64 rsvd2; +__u64 rsvd3; +}; + +#endif /* OCRDMA_ABI_USER_H */ --2.7.4
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 6/9 IB/nes: Move user vendor structures
In reply to a message not in the archiveThis patch moves nes vendor's specific structures to common UAPI folder which will be visible to all consumers.
These structures are used by user-space library driver (libmlx4) and currently manually copied to that library.
This move will allow cross-compile against these files and simplify introduction of vendor specific data.
--- drivers/infiniband/hw/nes/nes.h | 2 +- drivers/infiniband/hw/nes/nes_user.h | 114 ----------------------------------- include/uapi/rdma/nes-abi.h | 114 +++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+), 115 deletions(-) delete mode 100644 drivers/infiniband/hw/nes/nes_user.h create mode 100644 include/uapi/rdma/nes-abi.h
drivers/infiniband/hw/nes/nes.h +1 -1
@@ -165,7 +165,7 @@ do { \#include "nes_hw.h" #include "nes_verbs.h" #include "nes_context.h" -#include "nes_user.h" +#include <rdma/nes-abi.h> #include "nes_cm.h" #include "nes_mgt.h"
drivers/infiniband/hw/nes/nes_user.h deleted +0 -114
114 lines not on this page · raw message
include/uapi/rdma/nes-abi.h new file +114 -0
114 lines not on this page · raw message
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 7/9 IB/mthca: Move user vendor structures
In reply to a message not in the archiveThis patch moves mthca vendor's specific structures to common UAPI folder which will be visible to all consumers.
These structures are used by user-space library driver (libmthca) and currently manually copied to that library.
This move will allow cross-compile against these files and simplify introduction of vendor specific data.
--- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- include/uapi/rdma/mthca-abi.h | 111 +++++++++++++++++++++++++++ 2 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 include/uapi/rdma/mthca-abi.h
drivers/infiniband/hw/mthca/mthca_provider.c +1 -1
@@ -46,7 +46,7 @@#include "mthca_dev.h" #include "mthca_cmd.h" -#include "mthca_user.h" +#include <rdma/mthca-abi.h> #include "mthca_memfree.h" static void init_query_mad (struct ib_smp *mad)
include/uapi/rdma/mthca-abi.h new file +111 -0
111 lines not on this page · raw message
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 8/9 IB/core: Export vendor specific structures
In reply to a message not in the archiveExport following drivers:
* mlx5, mlx4, cxgb3, cxgb4, ocrdma, nes and mthca.
--- include/uapi/rdma/Kbuild | 7 +++++++ 1 file changed, 7 insertions(+)
include/uapi/rdma/Kbuild +7 -0
@@ -7,3 +7,10 @@ header-y += rdma_netlink.h header-y += rdma_user_cm.h header-y += hfi/ header-y += rdma_user_rxe.h +header-y += mlx4-abi.h +header-y += mlx5-abi.h +header-y += cxgb3-abi.h +header-y += cxgb4-abi.h +header-y += ocrdma-abi.h +header-y += nes-abi.h +header-y += mthca-abi.h
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 9/9 MAINTAINERS: Update RDMA vendor specific UAPI files
In reply to a message not in the archiveUpdate following drivers:
* mlx5, mlx4, cxgb3, cxgb4, ocrdma and nes.
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -3461,6 +3461,7 @@ L: [email protected] W: http://www.openfabrics.org S: Supported F: drivers/infiniband/hw/cxgb3/ +F: include/uapi/rdma/cxgb3-abi.h CXGB4 ETHERNET DRIVER (CXGB4) M: Hariprasad S <[email protected]>
@@ -3482,6 +3483,7 @@ L: [email protected] W: http://www.openfabrics.org S: Supported F: drivers/infiniband/hw/cxgb4/ +F: include/uapi/rdma/cxgb4-abi.h CXGB4VF ETHERNET DRIVER (CXGB4VF) M: Casey Leedom <[email protected]>
@@ -7807,6 +7809,7 @@ Q: http://patchwork.kernel.org/project/linux-rdma/list/ S: Supported F: drivers/infiniband/hw/mlx4/ F: include/linux/mlx4/ +F: include/uapi/rdma/mlx4-abi.h MELLANOX MLX5 core VPI driver M: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/[email protected]>
@@ -7828,6 +7831,7 @@ Q: http://patchwork.kernel.org/project/linux-rdma/list/ S: Supported F: drivers/infiniband/hw/mlx5/ F: include/linux/mlx5/ +F: include/uapi/rdma/mlx5-abi.h MELEXIS MLX90614 DRIVER M: Crt Mori <[email protected]>
@@ -8081,6 +8085,7 @@ L: [email protected] W: http://www.intel.com/Products/Server/Adapters/Server-Cluster/Server-Cluster-overview.htm S: Supported F: drivers/infiniband/hw/nes/ +F: include/uapi/rdma/nes-abi.h NETEM NETWORK EMULATOR M: Stephen Hemminger <[email protected]>
@@ -10595,6 +10600,7 @@ L: [email protected] W: http://www.emulex.com S: Supported F: drivers/infiniband/hw/ocrdma/ +F: include/uapi/rdma/ocrdma-abi.h SFC NETWORK DRIVER M: Solarflare linux maintainers <linux-net-drivers-s/n/[email protected]>
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Christoph Hellwig
Acked-byHi Leon,
this series look good to me:
Although I would have removed patch 8 and add the Kconfig changes to each individual driver change instead.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Christoph Hellwig
Hi Leon,
this series look good to me:
Thanks, I'm going to pick up your old UAPI redesign series and will start from there.
Quoted 2 lines
Although I would have removed patch 8
I'm not sure about it, but anyway it is separate patch which can be easily dropped by Doug when he will apply it.
Quoted 2 lines
and add the
Kconfigchanges to
each individual driver change instead.
I want logically separate move part and export part of this patch series.
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20160922160924.GI4088-2ukJVAZIZ/[email protected]
Quoted 5 lines · Leon Romanovsky
Quoted 1 line · Christoph Hellwig
Although I would have removed patch 8
I'm not sure about it, but anyway it is separate patch which can be easily dropped by Doug when he will apply it.
Mostly easily, yes.
Quoted 5 lines
Quoted 2 lines
and add the
Kconfigchanges to
each individual driver change instead.I want logically separate move part and export part of this patch series.
There's no reason to separate them. And it leaves dangling uapi header files that are in the uapi directory but not listed in the Kconfig. I squashed the Kconfig changes and also the MAINTAINERS changes down into the main patches, so the series is now only 7 patches.
Signature · 2 lines
Doug Ledford <[email protected]> GPG Key ID: 0E572FDD
A message that is not in the archive (sent off-list or not yet received): 701c2cd1-a47a-807d-41dc-c8057dd073bd-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Quoted 12 lines · Doug Ledford
Quoted 5 lines · Leon Romanovsky
Quoted 1 line · Christoph Hellwig
Although I would have removed patch 8
I'm not sure about it, but anyway it is separate patch which can be easily dropped by Doug when he will apply it.
Mostly easily, yes.
Quoted 3 lines
Quoted 2 lines
and add the
Kconfigchanges to
each individual driver change instead.
Quoted 7 lines
Quoted 2 lines
I want logically separate move part and export part of this patch series.
There's no reason to separate them. And it leaves dangling uapi header files that are in the uapi directory but not listed in the
Kconfig. I squashed theKconfigchanges and also theMAINTAINERSchanges down into the main patches, so the series is now only 7 patches.
Thanks.
Quoted 5 lines
--
Doug Ledford <[email protected]>
GPG Key ID: 0E572FDD