All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: mst@redhat.com, jasowang@redhat.com
Cc: kvm@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	maxime.coquelin@redhat.com
Subject: [PATCH V3 09/15] vhost: do not export vhost_add_used_n() and vhost_add_used_and_signal_n()
Date: Wed, 17 Jul 2019 06:52:49 -0400	[thread overview]
Message-ID: <20190717105255.63488-10-jasowang__28388.7134328083$1563360893$gmane$org@redhat.com> (raw)
In-Reply-To: <20190717105255.63488-1-jasowang@redhat.com>

We would request device to use shadow used ring API. Then there's no
need for exposing those to device.

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/vhost/vhost.c | 13 +++++++------
 drivers/vhost/vhost.h |  4 ----
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 5bfca5b76b05..50ba382f0981 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -2883,8 +2883,9 @@ EXPORT_SYMBOL_GPL(vhost_get_shadow_used_count);
 
 /* After we've used one of their buffers, we tell them about it.  We'll then
  * want to notify the guest, using eventfd. */
-int vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads,
-		     unsigned count)
+static int vhost_add_used_n(struct vhost_virtqueue *vq,
+			    struct vring_used_elem *heads,
+			    unsigned count)
 {
 	int start, n, r;
 
@@ -2988,14 +2989,14 @@ void vhost_add_used_and_signal(struct vhost_dev *dev,
 EXPORT_SYMBOL_GPL(vhost_add_used_and_signal);
 
 /* multi-buffer version of vhost_add_used_and_signal */
-void vhost_add_used_and_signal_n(struct vhost_dev *dev,
-				 struct vhost_virtqueue *vq,
-				 struct vring_used_elem *heads, unsigned count)
+static void vhost_add_used_and_signal_n(struct vhost_dev *dev,
+					struct vhost_virtqueue *vq,
+					struct vring_used_elem *heads,
+					unsigned count)
 {
 	vhost_add_used_n(vq, heads, count);
 	vhost_signal(dev, vq);
 }
-EXPORT_SYMBOL_GPL(vhost_add_used_and_signal_n);
 
 void vhost_flush_shadow_used_and_signal(struct vhost_virtqueue *vq)
 
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 175eb5ebf954..481baba20c3d 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -240,13 +240,9 @@ void vhost_discard_vq_desc(struct vhost_virtqueue *, int n);
 
 int vhost_vq_init_access(struct vhost_virtqueue *);
 int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int len);
-int vhost_add_used_n(struct vhost_virtqueue *, struct vring_used_elem *heads,
-		     unsigned count);
 
 void vhost_add_used_and_signal(struct vhost_dev *, struct vhost_virtqueue *,
 			       unsigned int id, int len);
-void vhost_add_used_and_signal_n(struct vhost_dev *, struct vhost_virtqueue *,
-			       struct vring_used_elem *heads, unsigned count);
 
 /* Zerocopy shadow used ring API */
 void vhost_set_zc_used_len(struct vhost_virtqueue *vq,
-- 
2.18.1

  parent reply	other threads:[~2019-07-17 10:52 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17 10:52 [PATCH V3 00/15] Packed virtqueue support for vhost Jason Wang
2019-07-17 10:52 ` [PATCH V3 01/15] vhost: simplify meta data pointer accessing Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 02/15] vhost: remove the unnecessary parameter of vhost_vq_avail_empty() Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 03/15] vhost: remove unnecessary parameter of vhost_enable_notify()/vhost_disable_notify Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 04/15] vhost-net: don't use vhost_add_used_n() for zerocopy Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 05/15] vhost: introduce helpers to manipulate shadow used ring Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 06/15] vhost_net: switch TX to use shadow used ring API Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 07/15] vhost_net: calculate last used length once for mergeable buffer Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 08/15] vhost_net: switch to use shadow used ring API for RX Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 09/15] vhost: do not export vhost_add_used_n() and vhost_add_used_and_signal_n() Jason Wang
2019-07-17 10:52 ` Jason Wang [this message]
2019-07-17 10:52 ` [PATCH V3 10/15] vhost: hide used ring layout from device Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 11/15] vhost: do not use vring_used_elem Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 12/15] vhost: vhost_put_user() can accept metadata type Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 13/15] vhost: packed ring support Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 14/15] vhost: event suppression for packed ring Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 10:52 ` [PATCH V3 15/15] vhost: enable packed virtqueues Jason Wang
2019-07-17 10:52 ` Jason Wang
2019-07-17 11:02 ` [PATCH V3 00/15] Packed virtqueue support for vhost Michael S. Tsirkin
2019-07-17 11:02 ` Michael S. Tsirkin
2019-07-17 12:27   ` Jason Wang
2019-07-17 12:27   ` Jason Wang
2019-07-17 14:28     ` Michael S. Tsirkin
2019-07-17 14:28     ` Michael S. Tsirkin

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='20190717105255.63488-10-jasowang__28388.7134328083$1563360893$gmane$org@redhat.com' \
    --to=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.