From patchwork Sat Mar 16 14:34:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 10855865 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 A3DD31823 for ; Sat, 16 Mar 2019 14:39:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85D1F28BA7 for ; Sat, 16 Mar 2019 14:39:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79B7C28BFE; Sat, 16 Mar 2019 14:39:12 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI 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 E2FE728BA7 for ; Sat, 16 Mar 2019 14:39:11 +0000 (UTC) Received: from localhost ([127.0.0.1]:42608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5ASt-0004dL-8a for patchwork-qemu-devel@patchwork.kernel.org; Sat, 16 Mar 2019 10:39:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5AOb-0000wd-1V for qemu-devel@nongnu.org; Sat, 16 Mar 2019 10:34:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5AOZ-0000eH-78 for qemu-devel@nongnu.org; Sat, 16 Mar 2019 10:34:45 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:39035) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h5AOY-0000ds-RN for qemu-devel@nongnu.org; Sat, 16 Mar 2019 10:34:43 -0400 Received: by mail-wr1-x432.google.com with SMTP id p8so12458219wrq.6 for ; Sat, 16 Mar 2019 07:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JJOqcp8KkDIwlwLX1ZTlt0FLRymCVd0aYZZPKDeydoY=; b=diNdk539xVYeqqW/6KvvKBJQb0JybSZ4uRYLLsZNbwAdKccKgat8WELFpgN3UjmT45 +nR/tbgR2zjkdammUZyMrtBNGTLfN+O2SFpbtZ2//2VsFa+uxH5gGBBR0deUAe6HPus+ qrm+IGkQSet4L39CYQHdtHYUPQ/foWRvrRFPz4fUsq5k7g5MZ4feaGb2PHeYZJJoy8jI TbXgyUQTZt8zPQ8qAdNXmW21UOSwY+OUhTCcOqeGWP/a+llXTl+jSCTya3+ft4/CRpk9 KPy5P9TUtOdG/m48Ea8Muhj3J2s0B6GWAkXI6kxi2csh6cClm/TNKkWesBSTRd7IB+Sw iGZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JJOqcp8KkDIwlwLX1ZTlt0FLRymCVd0aYZZPKDeydoY=; b=fgYHXViWxLaEUtyQ74pHaOMAog49oOErsgi/fnBJtijrD6mmI/gxr3aBA2NE6E4fIe TX90rOgw5cSgi1+xXClWUiKlFmTy0bmh5qx/WvJMFTQxZ6oFDJCIcDkYGvRtO9Ap1LNG Op4b0qnKpc7pJv0GApNQ8al/bhKU2+TTeImUJ3FJN8X+uqQ14hmi1DT/Rkbm7A96sdNY Q7P5urixApBhoj6YivGM7Xf/RNgBU2mxSZxmEf6f3jDU0jmPwi14MGVRKa7dYJxeaq2Y /FkLUWaXIXXcpn+SonVjkISznuAILwI8hF3QGRAjMgJnIPzO0uTa+IgxjZJMQsGdMEmV EFkw== X-Gm-Message-State: APjAAAW6CNIZ+7VzGRPpei8xc8XNWXlWDZjOyxs2tyCnfVTDl4i7kxBX e5FLkJR14pWXG1cfQ9oGcXD8q+H5 X-Google-Smtp-Source: APXvYqw/YR56Q8/pGeLZq4DHtplzWaZPCiGyuQLdGbn+yfo0zs0Uh5SSE9eJtZ9BPvZ7H4x/a16avg== X-Received: by 2002:adf:eb46:: with SMTP id u6mr5540626wrn.288.1552746881605; Sat, 16 Mar 2019 07:34:41 -0700 (PDT) Received: from localhost.localdomain ([176.228.155.165]) by smtp.gmail.com with ESMTPSA id l8sm7518895wrv.45.2019.03.16.07.34.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Mar 2019 07:34:40 -0700 (PDT) From: Marcel Apfelbaum To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Sat, 16 Mar 2019 16:34:12 +0200 Message-Id: <20190316143421.8194-10-marcel.apfelbaum@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190316143421.8194-1-marcel.apfelbaum@gmail.com> References: <20190316143421.8194-1-marcel.apfelbaum@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::432 Subject: [Qemu-devel] [PATCH PULL 09/18] 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: philmd@redhat.com, kamalheib1@gmail.com, yuval.shaia@oracle.com, dgilbert@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Yuval Shaia The function's 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 Message-Id: <1552300155-25216-9-git-send-email-yuval.shaia@oracle.com> Reviewed-by: Kamal Heib Signed-off-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 e124d8d16b..89279e66e7 100644 --- a/hw/rdma/rdma_backend.c +++ b/hw/rdma/rdma_backend.c @@ -594,7 +594,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) { @@ -613,9 +612,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; @@ -625,7 +624,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; @@ -633,7 +632,7 @@ void rdma_backend_post_recv(RdmaBackendDev *backend_dev, rdma_protected_gslist_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); @@ -652,13 +651,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 c54eaf2e4a..38056d97c7 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);