[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v9 1/5] Allow vu_message_read to be replaced
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v9 1/5] Allow vu_message_read to be replaced |
Date: |
Wed, 24 Jun 2020 14:24:02 +0200 |
Am 24.06.2020 um 05:36 hat Coiby Xu geschrieben:
> On Thu, Jun 18, 2020 at 12:43:47PM +0200, Kevin Wolf wrote:
> > Am 14.06.2020 um 20:39 hat Coiby Xu geschrieben:
> > > Allow vu_message_read to be replaced by one which will make use of the
> > > QIOChannel functions. Thus reading vhost-user message won't stall the
> > > guest.
> > >
> > > Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
> >
> > _vu_queue_notify() still has a direct call of vu_message_read() instead
> > of using the pointer. Is this intentional?
>
> This is a mistake. Thank you for reminding me!
>
> > Renaming the function would make sure that such semantic merge conflicts
> > don't stay unnoticed.
>
> Thank you for this tip! Do you suggest renaming the function only for
> the purpose of testing or should I adopt a name when submitting the
> patch? For the latter case, I will change it to vu_message_read_default
> then.
I think I would rename it permanently and keep the new name for the
actual submission. The reason is that if someone else is working on a
series adding new references, the compiler would catch it there, too.
vu_message_read_default() sounds good to me.
> > > @@ -1704,6 +1702,7 @@ vu_deinit(VuDev *dev)
> > > }
> > >
> > > if (vq->kick_fd != -1) {
> > > + dev->remove_watch(dev, vq->kick_fd);
> > > close(vq->kick_fd);
> > > vq->kick_fd = -1;
> > > }
> >
> > This hunk looks unrelated.
>
> In v4, I made the comment to explain why it's needed. But libvhost-user
> is supposed to be independent from QEMU, so Stefan suggested to remove it,
Yes, I saw the reason why you need it in later patches.
If you can remove it completely, that is even better, but otherwise I
would make the addition only later (either in the patch that actually
needs it or in a new separate patch) because it's not really part of
"allowing vu_message_read to be replaced", as the commit message says.
Kevin
- [PATCH v9 0/5] vhost-user block device backend implementation, Coiby Xu, 2020/06/14
- [PATCH v9 2/5] generic vhost user server, Coiby Xu, 2020/06/14
- Re: [PATCH v9 2/5] generic vhost user server, Kevin Wolf, 2020/06/18
- [PATCH 1/6] vhost-user-server: fix VHOST_MEMORY_MAX_REGIONS compiler error, Stefan Hajnoczi, 2020/06/19
- [PATCH 3/6] vhost-user-server: adjust vhost_user_server_set_aio_context() arguments, Stefan Hajnoczi, 2020/06/19
- [PATCH 2/6] vhost-user-server: drop unused #include <eventfd.h>, Stefan Hajnoczi, 2020/06/19
- [PATCH 5/6] vhost-user-server: fix s/initialized/initialize/ typo, Stefan Hajnoczi, 2020/06/19
- [PATCH 6/6] vhost-user-server: use DevicePanicNotifierFn everywhere, Stefan Hajnoczi, 2020/06/19
- [PATCH 4/6] vhost-user-server: mark fd handlers "external", Stefan Hajnoczi, 2020/06/19
- Re: [PATCH v9 2/5] generic vhost user server, Stefan Hajnoczi, 2020/06/19
- [PATCH v9 3/5] move logical block size check function to a common utility function, Coiby Xu, 2020/06/14