From patchwork Mon Mar 25 09:42:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shamir Rabinovitch X-Patchwork-Id: 10868597 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 ECE0F1390 for ; Mon, 25 Mar 2019 09:43:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D920D2911A for ; Mon, 25 Mar 2019 09:43:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCFB929190; Mon, 25 Mar 2019 09:43:59 +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 3D20D2911A for ; Mon, 25 Mar 2019 09:43:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730438AbfCYJnw (ORCPT ); Mon, 25 Mar 2019 05:43:52 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:32784 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730354AbfCYJnu (ORCPT ); Mon, 25 Mar 2019 05:43:50 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2P9dJoO007795; Mon, 25 Mar 2019 09:43:44 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=MJNhePuQG38rrFiw3ySBcLIa5qKQ3zEXJPMQn8pCDsc=; b=KAxR8AuQyvwGNGieX8jb5Fg5AHHMNHusNACdICTrhru/NOCEHjgwbIxlrDsHOkf/aKx6 Aiq+Gq/98Vhw6bIFugFNKKZvplvuFjx2H2YcFo5ajufhPV5YV4Y7VsRIB29TBpgGOq5P hieh3hRaHrhL3OaV7tPpvFIvGGKndNi71KLgNDb1+pfseRr4LV46ervLmrPC4Axl3pso pNr8hxxdtiFf+XFS70wR5Jt1pWZxFcRRe0wm2kJR3C5rPwrrRz6enkARkDeQL19g1ikk MMiQro7U1VIvTtXTpnCW1U5Ic1qLslZZeH3W/96KOgNSu8pMxYQ/LlN4IgD+kSqDqbmD Yw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2re6g0jxc9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Mar 2019 09:43:44 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x2P9hinr008900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Mar 2019 09:43:44 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x2P9hhmm031780; Mon, 25 Mar 2019 09:43:43 GMT Received: from localhost.localdomain (/10.175.47.69) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 25 Mar 2019 02:43:43 -0700 From: Shamir Rabinovitch To: linux-rdma@vger.kernel.org Cc: dledford@redhat.com, jgg@mellanox.com, shamir.rabinovitch@oracle.com Subject: [PATCH rdma/for-next v2 0/5] IB/{hw,sw}: remove 'uobject->context' dependency APIs Date: Mon, 25 Mar 2019 11:42:57 +0200 Message-Id: <20190325094316.9269-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=9205 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=882 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903250073 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: 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 | 33 ++- drivers/infiniband/hw/hns/hns_roce_device.h | 14 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 7 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.h | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 22 +- drivers/infiniband/hw/hns/hns_roce_mr.c | 4 +- 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, 1173 insertions(+), 818 deletions(-)