From patchwork Sun Feb 10 10:45:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Shaia X-Patchwork-Id: 10804725 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 1C9876C2 for ; Sun, 10 Feb 2019 10:51:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C37129EA1 for ; Sun, 10 Feb 2019 10:51:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 009C52A05A; Sun, 10 Feb 2019 10:51:23 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7FE3629EA1 for ; Sun, 10 Feb 2019 10:51:23 +0000 (UTC) Received: from localhost ([127.0.0.1]:57666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsmhm-0002VX-PX for patchwork-qemu-devel@patchwork.kernel.org; Sun, 10 Feb 2019 05:51:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsmdD-0008WC-1V for qemu-devel@nongnu.org; Sun, 10 Feb 2019 05:46:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsmd7-0007RG-VP for qemu-devel@nongnu.org; Sun, 10 Feb 2019 05:46:37 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:53764) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gsmd6-0007Og-04 for qemu-devel@nongnu.org; Sun, 10 Feb 2019 05:46:32 -0500 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 x1AAdQcq088825; Sun, 10 Feb 2019 10:46:30 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=givnvMmU80vH67PespiidFRPoTXGzy/chS6VP+rgDzc=; b=HXLNBOHE9jklQ2ZT//KP6OmqzJ7B68I9+ZnjPodWviFHKODnYqam/jwMxbhDvZG6zsyW JSA/mjE3qcnax7H4C90oJjIgANKB2l9l1aAYZ+xNrA+tdLtax8axACq4D7zv/1lK/6PF ZfJn6ZS8u/wnY5kwC/ZHMiYBVPXL5qyWXjRT46/pzfUcw4BFEakYUkopT5mKacNVVJug qUz4KRf1q7k4Wy2hnWL/ZlT6PPCeHWbdRW7FDbDh3fK9wF4Kn9oD9nEPKQP83S4y1XAO juQVHSzsnl1xxchyR2lntnm6NsyhIDCDxY9Nw+AY24vAi1YcUEioie1h5tbrUwbTvG62 Rg== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2qhredj6sg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 10 Feb 2019 10:46:30 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x1AAkNOu026943 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 10 Feb 2019 10:46:24 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1AAkNk5021101; Sun, 10 Feb 2019 10:46:23 GMT Received: from localhost.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 10 Feb 2019 02:46:22 -0800 From: Yuval Shaia To: dgilbert@redhat.com, marcel.apfelbaum@gmail.com, armbru@redhat.com, qemu-devel@nongnu.org, eblake@redhat.com Date: Sun, 10 Feb 2019 12:45:35 +0200 Message-Id: <20190210104537.1488-8-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190210104537.1488-1-yuval.shaia@oracle.com> References: <20190210104537.1488-1-yuval.shaia@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9162 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902100083 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.85 Subject: [Qemu-devel] [PATCH v1 7/9] hw/pvrdma: Delete unneeded function argument X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yuval Shaia Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The function argument rdma_dev_res is not needed as it is stored in the backend_dev object at init. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 13 ++++++------- hw/rdma/rdma_backend.h | 1 - hw/rdma/vmw/pvrdma_qp_ops.c | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index 11cc13596a..bb3c2d71a1 100644 --- a/hw/rdma/rdma_backend.c +++ b/hw/rdma/rdma_backend.c @@ -593,7 +593,6 @@ static unsigned int save_mad_recv_buffer(RdmaBackendDev *backend_dev, } void rdma_backend_post_recv(RdmaBackendDev *backend_dev, - RdmaDeviceResources *rdma_dev_res, RdmaBackendQP *qp, uint8_t qp_type, struct ibv_sge *sge, uint32_t num_sge, void *ctx) { @@ -612,9 +611,9 @@ void rdma_backend_post_recv(RdmaBackendDev *backend_dev, rc = save_mad_recv_buffer(backend_dev, sge, num_sge, ctx); if (rc) { complete_work(IBV_WC_GENERAL_ERR, rc, ctx); - rdma_dev_res->stats.mad_rx_bufs_err++; + backend_dev->rdma_dev_res->stats.mad_rx_bufs_err++; } else { - rdma_dev_res->stats.mad_rx_bufs++; + backend_dev->rdma_dev_res->stats.mad_rx_bufs++; } } return; @@ -624,7 +623,7 @@ void rdma_backend_post_recv(RdmaBackendDev *backend_dev, bctx->up_ctx = ctx; bctx->backend_qp = qp; - rc = rdma_rm_alloc_cqe_ctx(rdma_dev_res, &bctx_id, bctx); + rc = rdma_rm_alloc_cqe_ctx(backend_dev->rdma_dev_res, &bctx_id, bctx); if (unlikely(rc)) { complete_work(IBV_WC_GENERAL_ERR, VENDOR_ERR_NOMEM, ctx); goto err_free_bctx; @@ -632,7 +631,7 @@ void rdma_backend_post_recv(RdmaBackendDev *backend_dev, rdma_locked_glist_append_int32(&qp->cqe_ctx_list, bctx_id); - rc = build_host_sge_array(rdma_dev_res, new_sge, sge, num_sge, + rc = build_host_sge_array(backend_dev->rdma_dev_res, new_sge, sge, num_sge, &backend_dev->rdma_dev_res->stats.rx_bufs_len); if (rc) { complete_work(IBV_WC_GENERAL_ERR, rc, ctx); @@ -651,13 +650,13 @@ void rdma_backend_post_recv(RdmaBackendDev *backend_dev, } atomic_inc(&backend_dev->rdma_dev_res->stats.missing_cqe); - rdma_dev_res->stats.rx_bufs++; + backend_dev->rdma_dev_res->stats.rx_bufs++; return; err_dealloc_cqe_ctx: backend_dev->rdma_dev_res->stats.rx_bufs_err++; - rdma_rm_dealloc_cqe_ctx(rdma_dev_res, bctx_id); + rdma_rm_dealloc_cqe_ctx(backend_dev->rdma_dev_res, bctx_id); err_free_bctx: g_free(bctx); diff --git a/hw/rdma/rdma_backend.h b/hw/rdma/rdma_backend.h index cb5efa2a3a..5d507a1c41 100644 --- a/hw/rdma/rdma_backend.h +++ b/hw/rdma/rdma_backend.h @@ -111,7 +111,6 @@ void rdma_backend_post_send(RdmaBackendDev *backend_dev, union ibv_gid *dgid, uint32_t dqpn, uint32_t dqkey, void *ctx); void rdma_backend_post_recv(RdmaBackendDev *backend_dev, - RdmaDeviceResources *rdma_dev_res, RdmaBackendQP *qp, uint8_t qp_type, struct ibv_sge *sge, uint32_t num_sge, void *ctx); diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index 16db726dac..508d8fca3c 100644 --- a/hw/rdma/vmw/pvrdma_qp_ops.c +++ b/hw/rdma/vmw/pvrdma_qp_ops.c @@ -231,8 +231,7 @@ void pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle) continue; } - rdma_backend_post_recv(&dev->backend_dev, &dev->rdma_dev_res, - &qp->backend_qp, qp->qp_type, + rdma_backend_post_recv(&dev->backend_dev, &qp->backend_qp, qp->qp_type, (struct ibv_sge *)&wqe->sge[0], wqe->hdr.num_sge, comp_ctx);