[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] vhost-user: Do not wait for reply for not sent VHOST_USER
|
From: |
BillXiang |
|
Subject: |
Re: [PATCH v3] vhost-user: Do not wait for reply for not sent VHOST_USER_SET_LOG_BASE |
|
Date: |
Thu, 01 Aug 2024 23:01:51 +0800 |
> From: "Michael S. Tsirkin"<mst@redhat.com>
> Date: Thu, Aug 1, 2024, 22:13
> Subject: Re: [PATCH v3] vhost-user: Do not wait for reply for not sent
> VHOST_USER_SET_LOG_BASE
> To: "BillXiang"<xiangwencheng@dayudpu.com>
> Cc: <qemu-devel@nongnu.org>
> On Thu, Aug 01, 2024 at 08:45:40PM +0800, BillXiang wrote:
> > From: BillXiang <xiangwencheng@dayudpu.com>
> >
> > Currently, we have added VHOST_USER_SET_LOG_BASE to
> > vhost_user_per_device_request in commit 7c211eb078c4
> > ("vhost-user: Skip unnecessary duplicated VHOST_USER_SET_LOG_BASE
> > requests"),
> > as a result, VHOST_USER_SET_LOG_BASE will be sent only once
> > when 'vq_index == 0'.
> > In this patch we add the check of 'vq_index == 0' before
> > vhost_user_read, such that we do not wait for reply for not
> > sent VHOST_USER_SET_LOG_BASE.
> >
> > Signed-off-by: BillXiang <xiangwencheng@dayudpu.com>
> > ---
> > hw/virtio/vhost-user.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> > index 00561daa06..fd12992d15 100644
> > --- a/hw/virtio/vhost-user.c
> > +++ b/hw/virtio/vhost-user.c
> > @@ -460,7 +460,7 @@ static int vhost_user_set_log_base(struct vhost_dev
> > *dev, uint64_t base,
> > return ret;
> > }
> >
> > - if (shmfd) {
> > + if (shmfd && (dev->vq_index == 0)) {
> > msg.hdr.size = 0;
> > ret = vhost_user_read(dev, &msg);
> > if (ret < 0) {
>
>
>
> How do things work now after 7c211eb078c4 then?
It does not really work after 7c211eb078c4 and it's my mistake.
I forgot to submit the code to check vq_index in 7c211eb078c4.
>
> > --
> > 2.30.0
- [PATCH v3] vhost-user: Do not wait for reply for not sent VHOST_USER_SET_LOG_BASE, BillXiang, 2024/08/01
- Re: [PATCH v3] vhost-user: Do not wait for reply for not sent VHOST_USER_SET_LOG_BASE, Michael S. Tsirkin, 2024/08/01
- Re: [PATCH v3] vhost-user: Do not wait for reply for not sent VHOST_USER_SET_LOG_BASE,
BillXiang <=
- Re: [PATCH v3] vhost-user: Do not wait for reply for not sent VHOST_USER_SET_LOG_BASE, Prasad Pandit, 2024/08/27
- Re: [PATCH v3] vhost-user: Do not wait for reply for not sent VHOST_USER_SET_LOG_BASE, BillXiang, 2024/08/27
- Re: [PATCH v3] vhost-user: Do not wait for reply for not sent VHOST_USER_SET_LOG_BASE, Prasad Pandit, 2024/08/27
- Re: [PATCH v3] vhost-user: Do not wait for reply for not sent VHOST_USER_SET_LOG_BASE, BillXiang, 2024/08/27
- Re: [PATCH v3] vhost-user: Do not wait for reply for not sent VHOST_USER_SET_LOG_BASE, Michael S. Tsirkin, 2024/08/27