From: Yuval Shaia <yuval.shaia@oracle.com>
To: dgilbert@redhat.com, yuval.shaia@oracle.com,
marcel.apfelbaum@gmail.com, armbru@redhat.com,
qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 10/10] hw/pvrdma: Delete unneeded function argument
Date: Thu, 31 Jan 2019 15:08:50 +0200 [thread overview]
Message-ID: <20190131130850.6850-11-yuval.shaia@oracle.com> (raw)
In-Reply-To: <20190131130850.6850-1-yuval.shaia@oracle.com>
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 <yuval.shaia@oracle.com>
---
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 3283461b15..544b7d6148 100644
--- a/hw/rdma/rdma_backend.c
+++ b/hw/rdma/rdma_backend.c
@@ -586,7 +586,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)
{
@@ -605,9 +604,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;
@@ -617,7 +616,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;
@@ -626,7 +625,7 @@ void rdma_backend_post_recv(RdmaBackendDev *backend_dev,
qp->cqe_ctx_list = g_slist_append(qp->cqe_ctx_list,
GINT_TO_POINTER(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);
@@ -644,13 +643,13 @@ void rdma_backend_post_recv(RdmaBackendDev *backend_dev,
goto err_dealloc_cqe_ctx;
}
- 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 798a12f28f..160b9e74db 100644
--- a/hw/rdma/rdma_backend.h
+++ b/hw/rdma/rdma_backend.h
@@ -112,7 +112,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 5d650a4943..4ec1dacfd1 100644
--- a/hw/rdma/vmw/pvrdma_qp_ops.c
+++ b/hw/rdma/vmw/pvrdma_qp_ops.c
@@ -241,8 +241,7 @@ void pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle)
}
atomic_inc(&cq->missing_cqe);
- 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);
--
2.17.2
next prev parent reply other threads:[~2019-01-31 13:09 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 13:08 [Qemu-devel] [PATCH 00/10] Misc fixes to pvrdma device Yuval Shaia
2019-01-31 13:08 ` [Qemu-devel] [PATCH 01/10] hw/rdma: Switch to generic error reporting way Yuval Shaia
2019-02-01 12:36 ` Dr. David Alan Gilbert
2019-02-03 7:32 ` Yuval Shaia
2019-01-31 13:08 ` [Qemu-devel] [PATCH 02/10] hw/rdma: Introduce locked qlist Yuval Shaia
2019-02-07 9:05 ` Marcel Apfelbaum
2019-02-07 10:28 ` Yuval Shaia
2019-01-31 13:08 ` [Qemu-devel] [PATCH 03/10] hw/rdma: Warn when too many consecutive poll CQ triggered on an empty CQ Yuval Shaia
2019-02-06 10:14 ` Marcel Apfelbaum
2019-02-06 14:59 ` Yuval Shaia
2019-02-06 15:02 ` Yuval Shaia
2019-01-31 13:08 ` [Qemu-devel] [PATCH 04/10] hw/rdma: Protect against concurrent execution of poll_cq Yuval Shaia
2019-02-05 20:14 ` Marcel Apfelbaum
2019-01-31 13:08 ` [Qemu-devel] [PATCH 05/10] hw/pvrdma: Add device statistics counters Yuval Shaia
2019-02-06 10:17 ` Marcel Apfelbaum
2019-02-06 14:44 ` Yuval Shaia
2019-01-31 13:08 ` [Qemu-devel] [PATCH 06/10] hw/pvrdma: Dump device statistics counters to file Yuval Shaia
2019-02-04 13:03 ` Markus Armbruster
2019-02-04 16:14 ` Yuval Shaia
2019-02-04 18:21 ` Markus Armbruster
2019-01-31 13:08 ` [Qemu-devel] [PATCH 07/10] monitor: Expose pvrdma device statistics counters Yuval Shaia
2019-01-31 13:17 ` Eric Blake
2019-01-31 20:08 ` Yuval Shaia
2019-01-31 20:52 ` Eric Blake
2019-02-01 7:33 ` Markus Armbruster
2019-02-01 11:42 ` Dr. David Alan Gilbert
2019-02-03 7:12 ` Yuval Shaia
2019-02-03 7:06 ` Yuval Shaia
2019-02-04 8:23 ` Markus Armbruster
2019-02-04 16:07 ` Yuval Shaia
2019-02-05 7:21 ` Markus Armbruster
2019-02-04 8:00 ` Markus Armbruster
2019-01-31 13:08 ` [Qemu-devel] [PATCH 08/10] hw/rdma: Free all MAD receive buffers when device is closed Yuval Shaia
2019-02-06 10:19 ` Marcel Apfelbaum
2019-01-31 13:08 ` [Qemu-devel] [PATCH 09/10] hw/rdma: Free all receive buffers when QP is destroyed Yuval Shaia
2019-02-06 10:23 ` Marcel Apfelbaum
2019-02-06 15:55 ` Yuval Shaia
2019-01-31 13:08 ` Yuval Shaia [this message]
2019-02-05 20:16 ` [Qemu-devel] [PATCH 10/10] hw/pvrdma: Delete unneeded function argument Marcel Apfelbaum
2019-02-02 13:50 ` [Qemu-devel] [PATCH 00/10] Misc fixes to pvrdma device no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190131130850.6850-11-yuval.shaia@oracle.com \
--to=yuval.shaia@oracle.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).