From patchwork Thu Feb 7 16:44:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shamir Rabinovitch X-Patchwork-Id: 10801477 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 8EA7C1575 for ; Thu, 7 Feb 2019 16:45:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AF8D2DA4D for ; Thu, 7 Feb 2019 16:45:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EF4E2DA52; Thu, 7 Feb 2019 16:45:54 +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 105D92DA4D for ; Thu, 7 Feb 2019 16:45:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726442AbfBGQpx (ORCPT ); Thu, 7 Feb 2019 11:45:53 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:60640 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbfBGQpx (ORCPT ); Thu, 7 Feb 2019 11:45:53 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x17Gjkfe111505; Thu, 7 Feb 2019 16:45:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=4aDbcgFLOckkTEpg/SWdICT8dYTcYCieBfGdSJYnfCY=; b=1lF9Rf+kX3f1ZIWHFwut5TRAB8Im6zVu5p+lVAyZUFvqHwFeLDw5jvP2f9aIvlZ4vxmy AKphmkP+JnQhnwiZ6YKM+CsnC9z0zQ8scoMVB5c3bLj8spDSE3Zb5bfVxVkSLEWKwm3o roDMa+6iQXM3I2Sy8w/JXjw/PRXVvulEfIYzArin7HkjAmuhi052uYWpyT9wyq5nGSiM JaUhvVCRjfJkptrNap0rfi68H69MPz5X/lDkxbnQcH9ldoRPnMuSCii+q80tOgnVMQcT L981nMbPpmLjsHCuSzMQtLsueswW73eqE9dVzc/YqXabHzP2Fdfxvhc8GvWL6BfT34AX Ow== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2qd9arr2x4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Feb 2019 16:45:46 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x17GjixI024373 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Feb 2019 16:45:44 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x17Gjhq2021687; Thu, 7 Feb 2019 16:45:44 GMT Received: from localhost.localdomain (/10.175.56.120) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 Feb 2019 08:45:43 -0800 From: Shamir Rabinovitch To: linux-rdma@vger.kernel.org Cc: dledford@redhat.com, jgg@mellanox.com, shamir.rabinovitch@oracle.com Subject: [PATCH for-next v3 0/3] IB/{hw,sw}: remove 'uobject->context' dependency APIs Date: Thu, 7 Feb 2019 18:44:46 +0200 Message-Id: <20190207164511.21401-1-shamir.rabinovitch@oracle.com> X-Mailer: git-send-email 2.17.2 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9160 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=735 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902070127 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 Jason RFC patch. This patch set clean only the ib_xxx creation APIs because those APIs do have ib_udata. The final goal of this cleanup is to remove the dependency in the IB code in the ib_xxx->uobject pointer as step toward shared ib_xxx objects. Changelog: v3: - Jason: Modify helper rdma_udata_to_drv_context - Jason: Remove helper rdma_get_ucontext - Christoph Hellwig: Leave ib_udata as center of the user/kernel control flow v2: - Jason: Add the ib_ucontext to the attr bundle and make sure rdma_get_ucontext can't fail - Jason: Add helper macro to the the driver's context out of ib_udata - Leon: Un needed tests in mlx4_ib_db_unmap_user Shamir Rabinovitch (3): IB/uverbs: add ib_ucontext to uverbs_attr_bundle sent from ioctl and cmd flows IB/verbs: add helper function rdma_udata_to_drv_context IB/{hw,sw}: remove 'uobject->context' dependency in object creation APIs drivers/infiniband/core/rdma_core.c | 36 ++++++++++ drivers/infiniband/core/umem.c | 10 ++- drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/core/uverbs_ioctl.c | 3 + drivers/infiniband/core/uverbs_main.c | 25 +------ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 24 ++++--- drivers/infiniband/hw/cxgb3/iwch_provider.c | 4 +- drivers/infiniband/hw/cxgb4/qp.c | 10 +-- drivers/infiniband/hw/hns/hns_roce_qp.c | 22 +++--- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 11 +-- drivers/infiniband/hw/mlx4/mr.c | 11 ++- drivers/infiniband/hw/mlx4/qp.c | 74 +++++++++++--------- drivers/infiniband/hw/mlx4/srq.c | 10 ++- drivers/infiniband/hw/mlx5/qp.c | 54 ++++++++------ drivers/infiniband/hw/mlx5/srq.c | 9 +-- drivers/infiniband/hw/mthca/mthca_provider.c | 23 +++--- drivers/infiniband/hw/mthca/mthca_qp.c | 14 ++-- drivers/infiniband/hw/mthca/mthca_srq.c | 23 +++--- drivers/infiniband/hw/nes/nes_verbs.c | 14 ++-- drivers/infiniband/hw/qedr/verbs.c | 7 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 6 +- drivers/infiniband/sw/rdmavt/qp.c | 10 ++- drivers/infiniband/sw/rdmavt/srq.c | 10 ++- drivers/infiniband/sw/rxe/rxe_qp.c | 8 ++- drivers/infiniband/sw/rxe/rxe_verbs.c | 6 +- include/rdma/ib_verbs.h | 16 ++++- include/rdma/uverbs_ioctl.h | 1 + include/rdma/uverbs_std_types.h | 18 +++-- 28 files changed, 285 insertions(+), 176 deletions(-)