From patchwork Sun Mar 31 16:10:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shamir Rabinovitch X-Patchwork-Id: 10878781 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE97314DE for ; Sun, 31 Mar 2019 16:11:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD2D5285D2 for ; Sun, 31 Mar 2019 16:11:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F7FA28701; Sun, 31 Mar 2019 16:11:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 756E0285D2 for ; Sun, 31 Mar 2019 16:11:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731176AbfCaQLF (ORCPT ); Sun, 31 Mar 2019 12:11:05 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:35296 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731162AbfCaQLF (ORCPT ); Sun, 31 Mar 2019 12:11:05 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2VG4PGq009182; Sun, 31 Mar 2019 16:10:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2018-07-02; bh=0tdUWNM1CiyLQ9cfIFLDcUGahk7YXYVKJhCEWjAdsPw=; b=bmVQy0GK6EN99hJX872hkt2ZWmCc8jsIV2Gha7tciqlF5G01BUAba+BYEm5daw0DnssS MTNMRtiMlllGc/EBJ/nk2EeZuFTdg7QAYUeNHRdTQYh90TRebqswEf1BO9TvR0OblhR3 8PcNYjV3XlDVLdZF7lf2j/xpmq38y7U48IPsLxyQS0kHKvUoeSThJV8AYAYa1qtyyUnK O/GYzKBib4Px27rJ3K7trouJp7uyTqZIERwMNv954masm0dv1Tv7JbGS+P/Fn/WsF386 rP+bznaF6Lpq7YHx7uhHVHAMDgZQq3SRZ6QcSrbEk5bNbt/d0NoFjFlJ9r0Y3sFvhdqM hw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2rj13pubdr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 31 Mar 2019 16:10:54 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x2VGArDI009880 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 31 Mar 2019 16:10:53 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x2VGAqq3030177; Sun, 31 Mar 2019 16:10:52 GMT Received: from localhost.localdomain (/77.126.58.166) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 31 Mar 2019 09:10:51 -0700 From: Shamir Rabinovitch To: linux-rdma@vger.kernel.org Cc: jgg@ziepe.ca, dledford@redhat.com, Shamir Rabinovitch Subject: [rdma/for-next v3 0/5] IB/{hw,sw}: remove 'uobject->context' dependency APIs Date: Sun, 31 Mar 2019 19:10:02 +0300 Message-Id: <20190331161024.31035-1-shamir.rabinovitch@oracle.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9213 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=874 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903310122 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch set continue the cleanup started with prior series. This patch set clean the ib_x destroy APIs. The final goal of this cleanup is to remove the dependency in the IB code in the ib_x->uobject pointer as step toward shared ib_x objects. This series also remove ib_ucontext from functions signature where ib_udata is available. Changelog: v2 -> v3: * Fix HNS compile v1 -> v2: * rebase to latest rdma/for-next * Patch 1/5: Replace the ufile with attrs->ufile ufd_get_read - pass attrs not NULL * Patch 2/5: uverbs_close_fd now pass valid uverbs_attr_bundle __uverbs_cleanup_ufile loop optimize as Jason suggested * Patch 3/5: Use static inline instead of macros * Patch 5/5: New patch to clean-up the functions prototypes that had duplicate ib_ucontext & ib_udata Shamir Rabinovitch (5): IB/{rdma,core}: ucontext should be set properly for all cmd & ioctl paths IB/{core,hw}: pass uverbs_attr_bundle down uobject destroy path IB/{core,hw,sw}: pass uverbs_attr_bundle down ib_x destroy path IB:{core,hw}: remove 'uobject->context' dependency in object destroy APIs IB/{core,hw,sw}: pass only ib_udata in function prototypes drivers/infiniband/core/cq.c | 21 +- drivers/infiniband/core/rdma_core.c | 117 ++++----- drivers/infiniband/core/rdma_core.h | 9 +- drivers/infiniband/core/uverbs.h | 3 +- drivers/infiniband/core/uverbs_cmd.c | 79 +++--- drivers/infiniband/core/uverbs_ioctl.c | 25 +- drivers/infiniband/core/uverbs_std_types.c | 52 ++-- .../core/uverbs_std_types_counters.c | 3 +- drivers/infiniband/core/uverbs_std_types_cq.c | 10 +- drivers/infiniband/core/uverbs_std_types_dm.c | 5 +- .../core/uverbs_std_types_flow_action.c | 3 +- drivers/infiniband/core/uverbs_std_types_mr.c | 8 +- drivers/infiniband/core/verbs.c | 84 +++--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 40 +-- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 18 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 48 ++-- drivers/infiniband/hw/cxgb4/cq.c | 20 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 12 +- drivers/infiniband/hw/cxgb4/mem.c | 5 +- drivers/infiniband/hw/cxgb4/provider.c | 9 +- drivers/infiniband/hw/cxgb4/qp.c | 8 +- drivers/infiniband/hw/hns/hns_roce_ah.c | 2 +- drivers/infiniband/hw/hns/hns_roce_cq.c | 36 ++- drivers/infiniband/hw/hns/hns_roce_device.h | 23 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 23 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.h | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 25 +- drivers/infiniband/hw/hns/hns_roce_mr.c | 6 +- drivers/infiniband/hw/hns/hns_roce_pd.c | 7 +- drivers/infiniband/hw/hns/hns_roce_srq.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_cm.c | 3 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 49 ++-- drivers/infiniband/hw/mlx4/ah.c | 2 +- drivers/infiniband/hw/mlx4/cq.c | 39 +-- drivers/infiniband/hw/mlx4/doorbell.c | 9 +- drivers/infiniband/hw/mlx4/mad.c | 10 +- drivers/infiniband/hw/mlx4/main.c | 10 +- drivers/infiniband/hw/mlx4/mlx4_ib.h | 19 +- drivers/infiniband/hw/mlx4/mr.c | 5 +- drivers/infiniband/hw/mlx4/qp.c | 38 +-- drivers/infiniband/hw/mlx4/srq.c | 14 +- drivers/infiniband/hw/mlx5/ah.c | 2 +- drivers/infiniband/hw/mlx5/cq.c | 51 ++-- drivers/infiniband/hw/mlx5/devx.c | 6 +- drivers/infiniband/hw/mlx5/flow.c | 3 +- drivers/infiniband/hw/mlx5/main.c | 55 ++-- drivers/infiniband/hw/mlx5/mlx5_ib.h | 23 +- drivers/infiniband/hw/mlx5/mr.c | 5 +- drivers/infiniband/hw/mlx5/qp.c | 41 +-- drivers/infiniband/hw/mlx5/srq.c | 21 +- drivers/infiniband/hw/mthca/mthca_provider.c | 102 ++++---- drivers/infiniband/hw/nes/nes_cm.c | 3 +- drivers/infiniband/hw/nes/nes_verbs.c | 68 +++-- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_ah.h | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 75 ++++-- drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 17 +- drivers/infiniband/hw/qedr/verbs.c | 49 ++-- drivers/infiniband/hw/qedr/verbs.h | 18 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 20 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 12 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 20 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c | 4 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 3 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c | 5 +- .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 23 +- .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 18 +- drivers/infiniband/sw/rdmavt/ah.c | 4 +- drivers/infiniband/sw/rdmavt/ah.h | 3 +- drivers/infiniband/sw/rdmavt/cq.c | 7 +- drivers/infiniband/sw/rdmavt/cq.h | 3 +- drivers/infiniband/sw/rdmavt/mmap.c | 14 +- drivers/infiniband/sw/rdmavt/mmap.h | 2 +- drivers/infiniband/sw/rdmavt/mr.c | 5 +- drivers/infiniband/sw/rdmavt/mr.h | 5 +- drivers/infiniband/sw/rdmavt/pd.c | 7 +- drivers/infiniband/sw/rdmavt/pd.h | 5 +- drivers/infiniband/sw/rdmavt/qp.c | 7 +- drivers/infiniband/sw/rdmavt/qp.h | 2 +- drivers/infiniband/sw/rdmavt/srq.c | 7 +- drivers/infiniband/sw/rdmavt/srq.h | 2 +- drivers/infiniband/sw/rxe/rxe_cq.c | 10 +- drivers/infiniband/sw/rxe/rxe_loc.h | 12 +- drivers/infiniband/sw/rxe/rxe_mmap.c | 12 +- drivers/infiniband/sw/rxe/rxe_qp.c | 14 +- drivers/infiniband/sw/rxe/rxe_queue.c | 8 +- drivers/infiniband/sw/rxe/rxe_queue.h | 4 +- drivers/infiniband/sw/rxe/rxe_srq.c | 12 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 29 +-- include/rdma/ib_verbs.h | 242 +++++++++++++++--- include/rdma/uverbs_std_types.h | 39 ++- include/rdma/uverbs_types.h | 18 +- 92 files changed, 1191 insertions(+), 833 deletions(-)