From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, eperezma@redhat.com
Subject: Re: [PATCH RFC v5 13/13] vhost: drop head based APIs
Date: Mon, 8 Jun 2020 02:45:50 -0400 [thread overview]
Message-ID: <20200608023311-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <8e3f5b6f-a47b-73cd-e8e3-959d40f6c91c@redhat.com>
On Mon, Jun 08, 2020 at 11:57:48AM +0800, Jason Wang wrote:
>
> On 2020/6/7 下午10:11, Michael S. Tsirkin wrote:
> > Everyone's using buf APIs, no need for head based ones anymore.
> >
> > Signed-off-by: Michael S. Tsirkin<mst@redhat.com>
> > ---
> > drivers/vhost/vhost.c | 36 ++++++++----------------------------
> > drivers/vhost/vhost.h | 12 ------------
> > 2 files changed, 8 insertions(+), 40 deletions(-)
> >
> > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > index 72ee55c810c4..e6931b760b61 100644
> > --- a/drivers/vhost/vhost.c
> > +++ b/drivers/vhost/vhost.c
> > @@ -2299,12 +2299,12 @@ static int fetch_buf(struct vhost_virtqueue *vq)
> > return 1;
> > }
> > -/* Reverse the effect of vhost_get_vq_desc. Useful for error handling. */
> > +/* Revert the effect of fetch_buf. Useful for error handling. */
> > +static
> > void vhost_discard_vq_desc(struct vhost_virtqueue *vq, int n)
> > {
> > vq->last_avail_idx -= n;
> > }
> > -EXPORT_SYMBOL_GPL(vhost_discard_vq_desc);
>
>
> The same question as previous version.
>
> Do we need to rewind cached descriptor here?
>
> Thanks
Good point. This needs more thought, we need to also
rewind the avail idx each time we flush the descriptor cache.
--
MST
prev parent reply other threads:[~2020-06-08 6:45 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-07 14:11 [PATCH RFC v5 00/13] vhost: ring format independence Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 01/13] vhost: option to fetch descriptors through an independent struct Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 02/13] vhost: use batched version by default Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 03/13] vhost: batching fetches Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 04/13] vhost: cleanup fetch_buf return code handling Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 05/13] vhost/net: pass net specific struct pointer Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 06/13] vhost: reorder functions Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 07/13] vhost: format-independent API for used buffers Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 08/13] vhost/net: convert to new API: heads->bufs Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 09/13] vhost/net: avoid iov length math Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 10/13] vhost/test: convert to the buf API Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-07 14:11 ` [PATCH RFC v5 11/13] vhost/scsi: switch to buf APIs Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-08 9:57 ` Stefan Hajnoczi
2020-06-08 9:57 ` Stefan Hajnoczi
2020-06-07 14:11 ` [PATCH RFC v5 12/13] vhost/vsock: switch to the buf API Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-08 9:57 ` Stefan Hajnoczi
2020-06-08 9:57 ` Stefan Hajnoczi
2020-06-08 10:17 ` Stefano Garzarella
2020-06-08 13:30 ` Michael S. Tsirkin
2020-06-08 16:26 ` Stefano Garzarella
2020-06-08 16:26 ` Stefano Garzarella
2020-06-07 14:11 ` [PATCH RFC v5 13/13] vhost: drop head based APIs Michael S. Tsirkin
2020-06-07 14:11 ` Michael S. Tsirkin
2020-06-08 3:57 ` Jason Wang
2020-06-08 6:45 ` Michael S. Tsirkin [this message]
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=20200608023311-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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.