From patchwork Tue Oct 22 20:05:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adit Ranadive X-Patchwork-Id: 11205321 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B11A1747 for ; Tue, 22 Oct 2019 20:06:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F2692064A for ; Tue, 22 Oct 2019 20:06:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=vmware.com header.i=@vmware.com header.b="0FUNkya0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733008AbfJVUF6 (ORCPT ); Tue, 22 Oct 2019 16:05:58 -0400 Received: from mail-eopbgr680068.outbound.protection.outlook.com ([40.107.68.68]:10926 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731806AbfJVUF6 (ORCPT ); Tue, 22 Oct 2019 16:05:58 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oqggk30s6DvlPNmstpQMh3UxBeBsJ8zXkOW2aJrs2QSwCbirlbCwKS5Bam5WvMbG8pjp3sE0vRsMfnb/H5PUK34zpCz4QqSrCSs24i/ihP7ZUAGJl/yK2mWp6KJPclDqxON4XPKy3KsMHQKoShWhPj8229wKB4Gh1TdpedM672ZzlgeR6H2QwYJTCY8mUM7THMnmRClHKu5Foer5pkCy3UwFyEStrklRGXAB3cvIYFs9sqjxdqW4iyAb6mqB+VfbVcPVqh6KJDxFtep5nDLDVXmhsquFzMZsctZT5RLLVv4FMVxYtzR90ivqGv+Pkd1+87oVmKQj3BbOAyz66ucyAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WxdNgXdUh3b90EvBvlLF5VtPUWA2wLYeUYgUKSIinqM=; b=cS53I+++GsHe8WOQXxCdETobemlmuncgTOysa5fLsjhB4Xva8MEQKqwwfXzXdxF/T6iHv2/+Ctu+AVCPSMDlNtojlub06kJo+Fr53BsogrCQgjZE42f5mgevs1rtDJo+UciLVCzsO9PgZztcCI/SRVwN1PUzkV8Mj1Rk92HREzgeDr7Zmr+rayItgKaAFJtiPsfQAmhEcj+FiuKhaJTGoBXRryEwP9N/QRCMMwQZHWdrOwVwP9XZ/RUYtETBgLfbuUYAFbdWf8k7TVbRqiXHXF5f8B0aX6PHUlVpgWpOoAQ291fnPpouddIQzB8j+imn7bw4yTFmRsHe8D+2YMNumQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WxdNgXdUh3b90EvBvlLF5VtPUWA2wLYeUYgUKSIinqM=; b=0FUNkya0uHm+YDTkPUx53hqqCrAaMrhOF+CkS9dSyTMpdjjFoiustp9vNI1344+U9ptdsmTXmUuUDi74m6M2Ou2l7wRATN+KAnkf8a2TBDwfHDCDkEChoqXPqtQfZ/YaAr2jaf61yKEcHMLovMMCUCPYrxuW4OC7SkUkjV0NPOY= Received: from BYAPR05MB5511.namprd05.prod.outlook.com (20.177.186.28) by BYAPR05MB5173.namprd05.prod.outlook.com (20.177.229.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.14; Tue, 22 Oct 2019 20:05:54 +0000 Received: from BYAPR05MB5511.namprd05.prod.outlook.com ([fe80::c992:3ec7:35ca:d345]) by BYAPR05MB5511.namprd05.prod.outlook.com ([fe80::c992:3ec7:35ca:d345%7]) with mapi id 15.20.2387.016; Tue, 22 Oct 2019 20:05:54 +0000 From: Adit Ranadive To: "jgg@mellanox.com" , "leon@kernel.org" , "linux-rdma@vger.kernel.org" CC: Adit Ranadive Subject: [PATCH rdma-core v3 1/3] Update kernel headers Thread-Topic: [PATCH rdma-core v3 1/3] Update kernel headers Thread-Index: AQHViRQceZJdFjUS8U6X2LLqqK+lOA== Date: Tue, 22 Oct 2019 20:05:54 +0000 Message-ID: <4998e00880dc741386ecfc9c1540011ecffe2b9b.1571774292.git.aditr@vmware.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR02CA0047.namprd02.prod.outlook.com (2603:10b6:a03:54::24) To BYAPR05MB5511.namprd05.prod.outlook.com (2603:10b6:a03:1a::28) x-mailer: git-send-email 2.18.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=aditr@vmware.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [66.170.99.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c52ea79f-2243-4203-7fd1-08d7572b3eb8 x-ms-traffictypediagnostic: BYAPR05MB5173:|BYAPR05MB5173: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 01986AE76B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(346002)(396003)(376002)(366004)(136003)(199004)(189003)(71200400001)(110136005)(26005)(6116002)(7736002)(66066001)(6512007)(2501003)(71190400001)(52116002)(2906002)(102836004)(99286004)(6506007)(305945005)(76176011)(386003)(3846002)(6486002)(186003)(5660300002)(486006)(6436002)(476003)(2616005)(11346002)(446003)(14444005)(8676002)(66446008)(64756008)(66556008)(66476007)(66946007)(4326008)(81166006)(81156014)(8936002)(50226002)(316002)(256004)(36756003)(86362001)(25786009)(2201001)(118296001)(478600001)(107886003)(14454004)(15650500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR05MB5173;H:BYAPR05MB5511.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MJi9yFY+o8jKlrNXvL4MAPRjp0Hvt4DKeX4F7bkX6eUB6qiX7RAJSsgo3olp9j0EdPqfFa6vMPA7Y0arCqZSgX21ylkzkdEya8S79MZAKh4do4MEmmrsOeEmfEhrBwnmhW35o8icGpReqwu4Mokx8vvFv36xatStUeBjnNn0xk/6rHm4yLTeJtSloY/l6qZua3wu+VdVw0T1VSrQFKow9w8l0Xf+AwRfS+KTJFHcIi1lGvxE7adtj1Txdbsya53P0hx2FFY/7XsiDcK7VCVl66HJwGFIO6Yc5P6zOCM/ZYnWv5Y2OuhGLjCIciUHRQG+fTqOvl2SDbjNggkkLc71t+5AqmRjEjRKBB7QtWF4Erfx0XqszzB0n0yev/CGnNPuLk3JBtvUd/BG5cDR0QLf9F/4Rmi0wGx5wkugNr7Tgr9t3NKL9uWA0tU1HbLAnRSU MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: c52ea79f-2243-4203-7fd1-08d7572b3eb8 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2019 20:05:54.6371 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YuFzlxj766gfhBHcm6DzYPBi7J+l055oxaR2mTpwKB8DQPV8yDEusv3xL+Q+oWfqQh4AYV5Q43dZ5m6gX3AyWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB5173 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org To commit ?? ("RDMA/vmw_pvrdma: Use resource ids from physical device if available") Signed-off-by: Adit Ranadive --- kernel-headers/CMakeLists.txt | 2 +- kernel-headers/rdma/cxgb3-abi.h | 82 ---------------------- kernel-headers/rdma/ib_user_ioctl_verbs.h | 22 ++++++ kernel-headers/rdma/rdma_user_ioctl_cmds.h | 22 ------ kernel-headers/rdma/rvt-abi.h | 66 +++++++++++++++++ kernel-headers/rdma/vmw_pvrdma-abi.h | 5 ++ 6 files changed, 94 insertions(+), 105 deletions(-) delete mode 100644 kernel-headers/rdma/cxgb3-abi.h create mode 100644 kernel-headers/rdma/rvt-abi.h diff --git a/kernel-headers/CMakeLists.txt b/kernel-headers/CMakeLists.txt index 50bc77e6ab6e..543e0ea1408a 100644 --- a/kernel-headers/CMakeLists.txt +++ b/kernel-headers/CMakeLists.txt @@ -1,6 +1,5 @@ publish_internal_headers(rdma rdma/bnxt_re-abi.h - rdma/cxgb3-abi.h rdma/cxgb4-abi.h rdma/efa-abi.h rdma/hns-abi.h @@ -23,6 +22,7 @@ publish_internal_headers(rdma rdma/rdma_user_ioctl.h rdma/rdma_user_ioctl_cmds.h rdma/rdma_user_rxe.h + rdma/rvt-abi.h rdma/siw-abi.h rdma/vmw_pvrdma-abi.h ) diff --git a/kernel-headers/rdma/cxgb3-abi.h b/kernel-headers/rdma/cxgb3-abi.h deleted file mode 100644 index 85aed672f43e..000000000000 --- a/kernel-headers/rdma/cxgb3-abi.h +++ /dev/null @@ -1,82 +0,0 @@ -/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ -/* - * Copyright (c) 2006 Chelsio, Inc. 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 CXGB3_ABI_USER_H -#define CXGB3_ABI_USER_H - -#include - -#define IWCH_UVERBS_ABI_VERSION 1 - -/* - * 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). - * In particular do not use pointer types -- pass pointers in __aligned_u64 - * instead. - */ -struct iwch_create_cq_req { - __aligned_u64 user_rptr_addr; -}; - -struct iwch_create_cq_resp_v0 { - __aligned_u64 key; - __u32 cqid; - __u32 size_log2; -}; - -struct iwch_create_cq_resp { - __aligned_u64 key; - __u32 cqid; - __u32 size_log2; - __u32 memsize; - __u32 reserved; -}; - -struct iwch_create_qp_resp { - __aligned_u64 key; - __aligned_u64 db_key; - __u32 qpid; - __u32 size_log2; - __u32 sq_size_log2; - __u32 rq_size_log2; -}; - -struct iwch_reg_user_mr_resp { - __u32 pbl_addr; -}; - -struct iwch_alloc_pd_resp { - __u32 pdid; -}; - -#endif /* CXGB3_ABI_USER_H */ diff --git a/kernel-headers/rdma/ib_user_ioctl_verbs.h b/kernel-headers/rdma/ib_user_ioctl_verbs.h index 72c7fc75f960..9019b2d906ea 100644 --- a/kernel-headers/rdma/ib_user_ioctl_verbs.h +++ b/kernel-headers/rdma/ib_user_ioctl_verbs.h @@ -173,4 +173,26 @@ struct ib_uverbs_query_port_resp_ex { __u8 reserved[6]; }; +enum rdma_driver_id { + RDMA_DRIVER_UNKNOWN, + RDMA_DRIVER_MLX5, + RDMA_DRIVER_MLX4, + RDMA_DRIVER_CXGB3, + RDMA_DRIVER_CXGB4, + RDMA_DRIVER_MTHCA, + RDMA_DRIVER_BNXT_RE, + RDMA_DRIVER_OCRDMA, + RDMA_DRIVER_NES, + RDMA_DRIVER_I40IW, + RDMA_DRIVER_VMW_PVRDMA, + RDMA_DRIVER_QEDR, + RDMA_DRIVER_HNS, + RDMA_DRIVER_USNIC, + RDMA_DRIVER_RXE, + RDMA_DRIVER_HFI1, + RDMA_DRIVER_QIB, + RDMA_DRIVER_EFA, + RDMA_DRIVER_SIW, +}; + #endif diff --git a/kernel-headers/rdma/rdma_user_ioctl_cmds.h b/kernel-headers/rdma/rdma_user_ioctl_cmds.h index b8bb285f6b2a..7b1ec806f8f9 100644 --- a/kernel-headers/rdma/rdma_user_ioctl_cmds.h +++ b/kernel-headers/rdma/rdma_user_ioctl_cmds.h @@ -84,26 +84,4 @@ struct ib_uverbs_ioctl_hdr { struct ib_uverbs_attr attrs[0]; }; -enum rdma_driver_id { - RDMA_DRIVER_UNKNOWN, - RDMA_DRIVER_MLX5, - RDMA_DRIVER_MLX4, - RDMA_DRIVER_CXGB3, - RDMA_DRIVER_CXGB4, - RDMA_DRIVER_MTHCA, - RDMA_DRIVER_BNXT_RE, - RDMA_DRIVER_OCRDMA, - RDMA_DRIVER_NES, - RDMA_DRIVER_I40IW, - RDMA_DRIVER_VMW_PVRDMA, - RDMA_DRIVER_QEDR, - RDMA_DRIVER_HNS, - RDMA_DRIVER_USNIC, - RDMA_DRIVER_RXE, - RDMA_DRIVER_HFI1, - RDMA_DRIVER_QIB, - RDMA_DRIVER_EFA, - RDMA_DRIVER_SIW, -}; - #endif diff --git a/kernel-headers/rdma/rvt-abi.h b/kernel-headers/rdma/rvt-abi.h new file mode 100644 index 000000000000..7c05a02d2be5 --- /dev/null +++ b/kernel-headers/rdma/rvt-abi.h @@ -0,0 +1,66 @@ +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ + +/* + * This file contains defines, structures, etc. that are used + * to communicate between kernel and user code. + */ + +#ifndef RVT_ABI_USER_H +#define RVT_ABI_USER_H + +#include +#include +#ifndef RDMA_ATOMIC_UAPI +#define RDMA_ATOMIC_UAPI(_type, _name) struct{ _type val; } _name +#endif + +struct rvt_wqe_sge { + __aligned_u64 addr; + __u32 length; + __u32 lkey; +}; + +/* + * This structure is used to contain the head pointer, tail pointer, + * and completion queue entries as a single memory allocation so + * it can be mmap'ed into user space. + */ +struct rvt_cq_wc { + /* index of next entry to fill */ + RDMA_ATOMIC_UAPI(__u32, head); + /* index of next ib_poll_cq() entry */ + RDMA_ATOMIC_UAPI(__u32, tail); + + /* these are actually size ibcq.cqe + 1 */ + struct ib_uverbs_wc uqueue[]; +}; + +/* + * Receive work request queue entry. + * The size of the sg_list is determined when the QP (or SRQ) is created + * and stored in qp->r_rq.max_sge (or srq->rq.max_sge). + */ +struct rvt_rwqe { + __u64 wr_id; + __u8 num_sge; + __u8 padding[7]; + struct rvt_wqe_sge sg_list[]; +}; + +/* + * This structure is used to contain the head pointer, tail pointer, + * and receive work queue entries as a single memory allocation so + * it can be mmap'ed into user space. + * Note that the wq array elements are variable size so you can't + * just index into the array to get the N'th element; + * use get_rwqe_ptr() for user space and rvt_get_rwqe_ptr() + * for kernel space. + */ +struct rvt_rwq { + /* new work requests posted to the head */ + RDMA_ATOMIC_UAPI(__u32, head); + /* receives pull requests from here. */ + RDMA_ATOMIC_UAPI(__u32, tail); + struct rvt_rwqe wq[]; +}; +#endif /* RVT_ABI_USER_H */ diff --git a/kernel-headers/rdma/vmw_pvrdma-abi.h b/kernel-headers/rdma/vmw_pvrdma-abi.h index 6e73f0274e41..f8b638c73371 100644 --- a/kernel-headers/rdma/vmw_pvrdma-abi.h +++ b/kernel-headers/rdma/vmw_pvrdma-abi.h @@ -179,6 +179,11 @@ struct pvrdma_create_qp { __aligned_u64 qp_addr; }; +struct pvrdma_create_qp_resp { + __u32 qpn; + __u32 qp_handle; +}; + /* PVRDMA masked atomic compare and swap */ struct pvrdma_ex_cmp_swap { __aligned_u64 swap_val; From patchwork Tue Oct 22 20:05:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adit Ranadive X-Patchwork-Id: 11205323 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B71081951 for ; Tue, 22 Oct 2019 20:06:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9496F2064A for ; Tue, 22 Oct 2019 20:06:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=vmware.com header.i=@vmware.com header.b="w6TmVzDM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733010AbfJVUGA (ORCPT ); Tue, 22 Oct 2019 16:06:00 -0400 Received: from mail-eopbgr680068.outbound.protection.outlook.com ([40.107.68.68]:10926 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733005AbfJVUF7 (ORCPT ); Tue, 22 Oct 2019 16:05:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kM5GF5EbjkkAOkxuo3tp49FdLWb3BY+4ANGs51bpASvQjoV2CaMITjTq7ytnLcOLOgODnMDvfHG0Z+ywrf/4tQiovHIZErxo2xXePZCQExZy6TKNLYTLdMK0l8Q6O68jI8KIK6RuKoRwx2gnBva4ZhOJZArEfdvf7i4HZEVvxLJGXSPD/axV+Xc3N8v56e34hFEKq6pHolPlyBWrpy+BTu3eYnQ5PNKXxwPVtVywHW2hqiiCZuPcTPQYAxyhnVKaV82HtfZz6I8M3rVYo7Sm1qyUQYwKser/EzZ6cyUlQ1KcGiqNtJjWeU7utcr9zZoBoMhINIZJl090JePZKlzqfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=63LCgOirOwLCQAYQuEc5nAE2y+XVC7CsUoHUrqTVn7M=; b=LHdKOCS6QLDXtoSzoRm0nALSmlCXlK+pFk5VZhn9MebbrN2couM/bs2OJ24dPzFTuGHymMdhp5v6IBPgYBGTwRGBFbnxn4b4Dna7g+7QsAbNAWqinrQDZhPAfLpo5+2qeiHCm3F5PRFBZa9RLRIAgx46WWEs52CF3I/syrCEWytqtKmSweWD7EDNFpt0S796715Ir83+f1F+afrw4NuZtRTBjkBomD8Gdk5fy3NaQC7VOn+pZnCPzna1suM2zQH4aBYup17E+4yn9A3cdLsfZbVtUENiTQ9j8XFRZYFY+IhFcWDsaVN63R+dGiEU/+o260B5wpsAvY77RkeGSE++qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=63LCgOirOwLCQAYQuEc5nAE2y+XVC7CsUoHUrqTVn7M=; b=w6TmVzDMOikMAVVoBHSiQVUa0VrHsx5fnz4wuS2jffPKcsXvaJLSabIGIQIfAlrEgW3bdZpKcCeZ0f4dImPSvseKTcye7RxDh4q+hquAAqka3E4E/q7OTYh+wrqAqZNbbg8Z4jf2JOrTwqShVY5sdJELCkls4mKIJrxh6WNzkSw= Received: from BYAPR05MB5511.namprd05.prod.outlook.com (20.177.186.28) by BYAPR05MB5173.namprd05.prod.outlook.com (20.177.229.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.14; Tue, 22 Oct 2019 20:05:57 +0000 Received: from BYAPR05MB5511.namprd05.prod.outlook.com ([fe80::c992:3ec7:35ca:d345]) by BYAPR05MB5511.namprd05.prod.outlook.com ([fe80::c992:3ec7:35ca:d345%7]) with mapi id 15.20.2387.016; Tue, 22 Oct 2019 20:05:57 +0000 From: Adit Ranadive To: "jgg@mellanox.com" , "leon@kernel.org" , "linux-rdma@vger.kernel.org" CC: Adit Ranadive Subject: [PATCH rdma-core v3 2/3] kernel-headers: Remove cxgb3-abi.h Thread-Topic: [PATCH rdma-core v3 2/3] kernel-headers: Remove cxgb3-abi.h Thread-Index: AQHViRQd3oZInVL2Jk+oou7mWT8orQ== Date: Tue, 22 Oct 2019 20:05:56 +0000 Message-ID: <1dbb166d74d71f5968ae695c42d96d6acfefe3f3.1571774292.git.aditr@vmware.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR02CA0047.namprd02.prod.outlook.com (2603:10b6:a03:54::24) To BYAPR05MB5511.namprd05.prod.outlook.com (2603:10b6:a03:1a::28) x-mailer: git-send-email 2.18.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=aditr@vmware.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [66.170.99.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2ac500b8-490d-4aec-50b7-08d7572b3fe4 x-ms-traffictypediagnostic: BYAPR05MB5173:|BYAPR05MB5173: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2201; x-forefront-prvs: 01986AE76B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(346002)(396003)(376002)(366004)(136003)(199004)(189003)(71200400001)(110136005)(26005)(4744005)(6116002)(7736002)(66066001)(6512007)(2501003)(71190400001)(52116002)(2906002)(102836004)(99286004)(6506007)(305945005)(76176011)(386003)(3846002)(6486002)(186003)(5660300002)(486006)(6436002)(476003)(2616005)(11346002)(446003)(14444005)(8676002)(66446008)(64756008)(66556008)(66476007)(66946007)(4326008)(81166006)(81156014)(8936002)(50226002)(316002)(256004)(36756003)(86362001)(25786009)(2201001)(118296001)(478600001)(107886003)(14454004);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR05MB5173;H:BYAPR05MB5511.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rl01qBLXuSta4/K6eZwRu6L0KQ/TIKWbVXNXh5VdWMhjJQqiXLtmmuTt/GI1IpqeFmGk/sPa9D09Jxz2YEVcqUIrcrgzQdQAJqWIssmhvlVnQHzeC67E/OBhXWZkqgLCj/H261mNGD8b1GTNqyu4KfD1fLyyJ3JHyQMmDSMx8cpoXsanb/p+FB5iegv8BiXFxrRZ4YRwuF6UwYcSlgcdJ+o/x+XeQT7+AOXX/q08okoXcZeBsn7OuZx1mjFTM90uTR8jP4y1IMnoedknV4FNMEicquispzmXJ65NcAK2fNsVXCg5rQrmV4WtN27QTvnng3I4zX/ItAfvsuNHUEc5bNcAHx35yJVxHS840G9T/wp+iiJV0n94AqSyMkJkJZa6EpJ/HhByKmvw7bI7XVEK5moUUvucaejGbg0IHJhDb0C5J3SILtKXf4fQEbiOwYMh MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ac500b8-490d-4aec-50b7-08d7572b3fe4 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2019 20:05:57.1327 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: UBpIe0Ai/x2JT1t+uixfTCAFigcLlSe2guEurerO4DBpLxbFjlFhzY17UQ7GszmHsfMGwZFmLIiOhuV9pyRAsw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB5173 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Driver is removed from kernel. Also, update cmake to not build library. Signed-off-by: Adit Ranadive --- CMakeLists.txt | 1 - kernel-headers/CMakeLists.txt | 1 - 2 files changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc17ef36cf24..cdc8d5444e70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -616,7 +616,6 @@ add_subdirectory(librdmacm/man) # Providers if (HAVE_COHERENT_DMA) add_subdirectory(providers/bnxt_re) -add_subdirectory(providers/cxgb3) # NO SPARSE add_subdirectory(providers/cxgb4) # NO SPARSE add_subdirectory(providers/efa) add_subdirectory(providers/efa/man) diff --git a/kernel-headers/CMakeLists.txt b/kernel-headers/CMakeLists.txt index 543e0ea1408a..c4464c579320 100644 --- a/kernel-headers/CMakeLists.txt +++ b/kernel-headers/CMakeLists.txt @@ -59,7 +59,6 @@ endfunction() # Transform the kernel ABIs used by the providers rdma_kernel_provider_abi( rdma/bnxt_re-abi.h - rdma/cxgb3-abi.h rdma/cxgb4-abi.h rdma/efa-abi.h rdma/hns-abi.h From patchwork Tue Oct 22 20:05:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adit Ranadive X-Patchwork-Id: 11205325 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9311514E5 for ; Tue, 22 Oct 2019 20:06:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 678912064A for ; Tue, 22 Oct 2019 20:06:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=vmware.com header.i=@vmware.com header.b="Xt2DgTqu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733005AbfJVUGB (ORCPT ); Tue, 22 Oct 2019 16:06:01 -0400 Received: from mail-eopbgr680068.outbound.protection.outlook.com ([40.107.68.68]:10926 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731806AbfJVUGB (ORCPT ); Tue, 22 Oct 2019 16:06:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b314GpVVQwoZ/RGyp8NhYAnnoFgeUaDF1Cdc6/LX1ePKCauoMmy6xLlEGjSfXuQ/YRu7sJ1kroE0k83ChbZ6m8xMfsYL0xUa0kTYeOLrqsl8bmczW6VpthGkQeYszP2Xy4hy9Q7nIvJcVs1p+TrPVRCeK1VC4HfRDM1eisuFJ5d/8ASfDppZ256fDCKuwI8E2cTVYlfGyiAcZf5ldmpXX3wykj1FmoCToGjKC0YFgFaa8vaacpylNkwEj1u28RJsFZkpyc8jspdGfAigvqjpQ2VhfIa2NjTcQBkyDkN97EzMV8B5o8H6YJKy99EY9Lf9X6EN684t2m89u5FpiKBwdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s5Gz3wUeHAVZJu/VBZv7HZmC4xqDQRT9uwhaarpTr08=; b=RO2KwjHBpr1wq43sUBSPGnfFVXljVUBhZ9MnpnSwfD9aF+OK21PY9sH+J/IqaMJltH/t3NSbOz/ojEcZQhndCwssuK6zP1S9vW0t3f+MLp5PMnbZmwK/hRcRBGM7MZ3E2hjfzRI0FWYqt/Mu/TgBWccBZ7PuThg49ynIDIZ07QNCQpzAFI6QiSyDzPpOlf27vKbGmJBEd5Dgun/lU3pjQlCI2Lolq2S61Wn9ZXBpDQ0SLivUXXnkS5DCwtNZkNR3m0TZPhdUatK/Hwl+M6+95j3z6vGsT4FnGmUICm6iBE+JZw5J/g4yUNYRq3YXiNk6b0fg/xA+uEtE/2108yisTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s5Gz3wUeHAVZJu/VBZv7HZmC4xqDQRT9uwhaarpTr08=; b=Xt2DgTqu1HagDtlaIH5zyrUvoSns/mCOuFPuROClVB2THwRxCALKlre4yhf+ivkPx2xWOipW7QmYcaaqxdHwnc7FdV8QYS8cTk6ewqtygjFiDxUPPzH3ryCBGVTAqdo244USxY3iW3QcWbUZSnuPMjvK9Y3MxOluj3tAIzVXsJI= Received: from BYAPR05MB5511.namprd05.prod.outlook.com (20.177.186.28) by BYAPR05MB5173.namprd05.prod.outlook.com (20.177.229.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.14; Tue, 22 Oct 2019 20:05:58 +0000 Received: from BYAPR05MB5511.namprd05.prod.outlook.com ([fe80::c992:3ec7:35ca:d345]) by BYAPR05MB5511.namprd05.prod.outlook.com ([fe80::c992:3ec7:35ca:d345%7]) with mapi id 15.20.2387.016; Tue, 22 Oct 2019 20:05:58 +0000 From: Adit Ranadive To: "jgg@mellanox.com" , "leon@kernel.org" , "linux-rdma@vger.kernel.org" CC: Bryan Tan , Adit Ranadive Subject: [PATCH rdma-core v3 3/3] vmw_pvrdma: Use resource ids from physical device if available Thread-Topic: [PATCH rdma-core v3 3/3] vmw_pvrdma: Use resource ids from physical device if available Thread-Index: AQHViRQe6BA3CRim/069+55xPVLXVw== Date: Tue, 22 Oct 2019 20:05:58 +0000 Message-ID: <2cffaf5538cc1a738c37b7982217bc349d643261.1571774292.git.aditr@vmware.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR02CA0047.namprd02.prod.outlook.com (2603:10b6:a03:54::24) To BYAPR05MB5511.namprd05.prod.outlook.com (2603:10b6:a03:1a::28) x-mailer: git-send-email 2.18.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=aditr@vmware.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [66.170.99.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2aa1e2e0-d397-424b-422d-08d7572b40f0 x-ms-traffictypediagnostic: BYAPR05MB5173:|BYAPR05MB5173: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:619; x-forefront-prvs: 01986AE76B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(346002)(396003)(376002)(366004)(136003)(199004)(189003)(71200400001)(110136005)(26005)(6116002)(7736002)(66066001)(6512007)(2501003)(71190400001)(52116002)(2906002)(102836004)(99286004)(6506007)(305945005)(76176011)(386003)(3846002)(6486002)(186003)(5660300002)(486006)(6436002)(476003)(2616005)(11346002)(446003)(14444005)(8676002)(66446008)(64756008)(66556008)(66476007)(66946007)(4326008)(81166006)(81156014)(8936002)(50226002)(316002)(256004)(36756003)(86362001)(25786009)(2201001)(118296001)(478600001)(107886003)(14454004)(54906003);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR05MB5173;H:BYAPR05MB5511.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LnE1Hu/4cMUAc68q92ZClYApRyJbZYnnzhw5dHCiE7DjpeRKGz5R9wSTaY0C6eDRBEavyF56dYizqfUFxkA9rO7k8bFdEqrZr5C9gBA9287yMYMtbqU/a0wwd7HZq39pjW0ZptHqZ7X1F/SpNCE6MHnz/0jlQhYwv0shkT8kNnnIn3qpy4/hUZedRnI0TGmJ7w5NtW3B3RmK0sP3VvxTZVvJsN4VHc2+8FSx8iCyZw2t1N+7NF25fpREqfsBinoiAwMpWXvpl8joTdPge+dE/ZgUzswiuZWzZq8QCQDTF2+Y7Ue4y42yTObTlc/BVA6nyI6T3YSrH7fw75jhxkQIEV9UyBoiLoi5lh5VwrufcVJSp5WYRSXZ29IQGYdnYz4vnbi/vSsac1Wm4UkLxqt6EcuYAC7yi7un7v+381hZPaL6ZJU2URVHtNceGHsTb1EU MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2aa1e2e0-d397-424b-422d-08d7572b40f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2019 20:05:58.3540 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lJURx3Sv5nq7XjCpfX5OuEm/flQwzz+0BG0IK9dh36csas9vAfCKyeKCQ3GKHT1QWDO6MzWuueV6/ifOGCOUow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB5173 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Bryan Tan This is the accompanying userspace change to allow applications use physical resource ids if provided by the driver/device. Reviewed-by: Jorgen Hansen Signed-off-by: Adit Ranadive Signed-off-by: Bryan Tan --- providers/vmw_pvrdma/pvrdma-abi.h | 2 +- providers/vmw_pvrdma/pvrdma.h | 1 + providers/vmw_pvrdma/qp.c | 23 ++++++++++++----------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/providers/vmw_pvrdma/pvrdma-abi.h b/providers/vmw_pvrdma/pvrdma-abi.h index 77db9ddd1bb7..1a4c3c8a98f2 100644 --- a/providers/vmw_pvrdma/pvrdma-abi.h +++ b/providers/vmw_pvrdma/pvrdma-abi.h @@ -55,7 +55,7 @@ DECLARE_DRV_CMD(user_pvrdma_alloc_pd, IB_USER_VERBS_CMD_ALLOC_PD, DECLARE_DRV_CMD(user_pvrdma_create_cq, IB_USER_VERBS_CMD_CREATE_CQ, pvrdma_create_cq, pvrdma_create_cq_resp); DECLARE_DRV_CMD(user_pvrdma_create_qp, IB_USER_VERBS_CMD_CREATE_QP, - pvrdma_create_qp, empty); + pvrdma_create_qp, pvrdma_create_qp_resp); DECLARE_DRV_CMD(user_pvrdma_create_srq, IB_USER_VERBS_CMD_CREATE_SRQ, pvrdma_create_srq, pvrdma_create_srq_resp); DECLARE_DRV_CMD(user_pvrdma_alloc_ucontext, IB_USER_VERBS_CMD_GET_CONTEXT, diff --git a/providers/vmw_pvrdma/pvrdma.h b/providers/vmw_pvrdma/pvrdma.h index d90bd8096664..bb4a2db08d14 100644 --- a/providers/vmw_pvrdma/pvrdma.h +++ b/providers/vmw_pvrdma/pvrdma.h @@ -170,6 +170,7 @@ struct pvrdma_qp { struct pvrdma_wq sq; struct pvrdma_wq rq; int is_srq; + uint32_t qp_handle; }; struct pvrdma_ah { diff --git a/providers/vmw_pvrdma/qp.c b/providers/vmw_pvrdma/qp.c index ef429db93a43..10784314f5b5 100644 --- a/providers/vmw_pvrdma/qp.c +++ b/providers/vmw_pvrdma/qp.c @@ -211,9 +211,8 @@ 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 ib_uverbs_create_qp_resp resp; + struct user_pvrdma_create_qp_resp resp = {}; struct pvrdma_qp *qp; - int ret; int is_srq = !!(attr->srq); attr->cap.max_send_sge = max_t(uint32_t, 1U, attr->cap.max_send_sge); @@ -282,14 +281,16 @@ struct ibv_qp *pvrdma_create_qp(struct ibv_pd *pd, cmd.rbuf_size = qp->rbuf.length; cmd.qp_addr = (uintptr_t) qp; - ret = ibv_cmd_create_qp(pd, &qp->ibv_qp, attr, - &cmd.ibv_cmd, sizeof(cmd), - &resp, sizeof(resp)); - - if (ret) + if (ibv_cmd_create_qp(pd, &qp->ibv_qp, attr, &cmd.ibv_cmd, sizeof(cmd), + &resp.ibv_resp, sizeof(resp))) goto err_free; - to_vctx(pd->context)->qp_tbl[qp->ibv_qp.qp_num & 0xFFFF] = qp; + if (resp.drv_payload.qp_handle != 0) + qp->qp_handle = resp.drv_payload.qp_handle; + else + qp->qp_handle = qp->ibv_qp.qp_num; + + to_vctx(pd->context)->qp_tbl[qp->qp_handle & 0xFFFF] = qp; /* If set, each WR submitted to the SQ generate a completion entry */ if (attr->sq_sig_all) @@ -414,7 +415,7 @@ int pvrdma_destroy_qp(struct ibv_qp *ibqp) free(qp->rq.wrid); pvrdma_free_buf(&qp->rbuf); pvrdma_free_buf(&qp->sbuf); - ctx->qp_tbl[ibqp->qp_num & 0xFFFF] = NULL; + ctx->qp_tbl[qp->qp_handle & 0xFFFF] = NULL; free(qp); return 0; @@ -547,7 +548,7 @@ out: if (nreq) { udma_to_device_barrier(); pvrdma_write_uar_qp(ctx->uar, - PVRDMA_UAR_QP_SEND | ibqp->qp_num); + PVRDMA_UAR_QP_SEND | qp->qp_handle); } pthread_spin_unlock(&qp->sq.lock); @@ -630,7 +631,7 @@ int pvrdma_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr, out: if (nreq) pvrdma_write_uar_qp(ctx->uar, - PVRDMA_UAR_QP_RECV | ibqp->qp_num); + PVRDMA_UAR_QP_RECV | qp->qp_handle); pthread_spin_unlock(&qp->rq.lock); return ret;