From patchwork Sun Oct 7 08:14:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shamir Rabinovitch X-Patchwork-Id: 10629407 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 9E20214BD for ; Sun, 7 Oct 2018 08:14:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D22529193 for ; Sun, 7 Oct 2018 08:14:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81092291A0; Sun, 7 Oct 2018 08:14:34 +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 1725629193 for ; Sun, 7 Oct 2018 08:14:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726836AbeJGPVB (ORCPT ); Sun, 7 Oct 2018 11:21:01 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:55382 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726637AbeJGPVB (ORCPT ); Sun, 7 Oct 2018 11:21:01 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9789HwA187714; Sun, 7 Oct 2018 08:14:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=Nbi5XDkPTDbvlbXgbLfUUGLfKWzWM/fD35JpWoF/ylo=; b=enHjfBM5K1v5KdUCAc/QZEvZS59qFGU1DMqrxOO0eC9kjuFlkXu/5fGQ7qBsgmCMDdKu qug1gdR/J+HW7MeqCb+8+8plEKoM7X7sPxvly9C1bQoychSxFdbH90+IgAX1wIrQvmMX YqYNLQGp+iAn5kn+cfMWpCuGbvIDtpIZRSHxZOwFh2qaO9rweDjbgNyND/28DlVsGe7f xLXCT/+Welg8EXGt9AwM/WZ2nmqK3P02tst9bP+2yUhO06WF1lg5zFNiGp0Gh8qfDei3 8/kKkawYaeT4lEFZad7rK3hAVLnrCfJI850alofrO6NmCQ//d9pIpvHTyRz9NDIxxZ9A Xw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2mxnpqj47t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 07 Oct 2018 08:14:29 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w978ESTd013010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 7 Oct 2018 08:14:28 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w978ESL5024753; Sun, 7 Oct 2018 08:14:28 GMT Received: from localhost.localdomain (/10.175.55.174) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 07 Oct 2018 08:14:27 +0000 From: Shamir Rabinovitch To: linux-rdma@vger.kernel.org Cc: dledford@redhat.com, jgg@ziepe.ca, leon@kernel.org, santosh.shilimkar@oracle.com, shamir.rabinovitch@oracle.com Subject: [PATCH 4/4] IB/verbs: remove ib_pd uobject pointer Date: Sun, 7 Oct 2018 11:14:06 +0300 Message-Id: <20181007081406.9734-5-shamir.rabinovitch@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181007081406.9734-1-shamir.rabinovitch@oracle.com> References: <20181007081406.9734-1-shamir.rabinovitch@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9038 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810070087 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 prepare the code for shared ib_pd model. having uobject pointer in ib_pd is not correct in shared ib_pd model. in shared ib_pd model, ib_pd can belong to 1 or more uobject. prior patches removed the dependency in the code for uobject pointer from ib_pd. now it's good time to complete the work and get rid of the uobject pointer in the ib_pd! Signed-off-by: Shamir Rabinovitch --- drivers/infiniband/core/uverbs_cmd.c | 1 - drivers/infiniband/core/verbs.c | 1 - drivers/infiniband/hw/mlx5/main.c | 1 - include/rdma/ib_verbs.h | 1 - 4 files changed, 4 deletions(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 45bd746f03ff..b2091c3fe2df 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -371,7 +371,6 @@ ssize_t ib_uverbs_alloc_pd(struct ib_uverbs_file *file, } pd->device = ib_dev; - pd->uobject = uobj; pd->__internal_mr = NULL; atomic_set(&pd->usecnt, 0); diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 3766d00ebbfc..071cb753683d 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -248,7 +248,6 @@ struct ib_pd *__ib_alloc_pd(struct ib_device *device, unsigned int flags, return pd; pd->device = device; - pd->uobject = NULL; pd->__internal_mr = NULL; atomic_set(&pd->usecnt, 0); pd->flags = flags; diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 5c1591d2eb75..1c4e62362fe2 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -4572,7 +4572,6 @@ static int create_dev_resources(struct mlx5_ib_resources *devr) goto error0; } devr->p0->device = &dev->ib_dev; - devr->p0->uobject = NULL; atomic_set(&devr->p0->usecnt, 0); devr->c0 = mlx5_ib_create_cq(&dev->ib_dev, &cq_attr, NULL, NULL); diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 718a88216433..7c17fbdc02d2 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1539,7 +1539,6 @@ struct ib_pd { u32 local_dma_lkey; u32 flags; struct ib_device *device; - struct ib_uobject *uobject; atomic_t usecnt; /* count all resources */ u32 unsafe_global_rkey;