qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vhsot-user: Remove redundant judgment
@ 2024-07-10  7:40 BillXiang
  2024-07-20 19:13 ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: BillXiang @ 2024-07-10  7:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: mst, alex.bennee, BillXiang

From: BillXiang <xiangwencheng@dayudpu.com>

Send only once has been supported in vhost_user_write by vhost_user_per_device_request

Signed-off-by: BillXiang <xiangwencheng@dayudpu.com>
---
 hw/virtio/vhost-user.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 00561daa06..04e3568b7e 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -446,11 +446,6 @@ static int vhost_user_set_log_base(struct vhost_dev *dev, uint64_t base,
         .hdr.size = sizeof(msg.payload.log),
     };
 
-    /* Send only once with first queue pair */
-    if (dev->vq_index != 0) {
-        return 0;
-    }
-
     if (shmfd && log->fd != -1) {
         fds[fd_num++] = log->fd;
     }
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] vhsot-user: Remove redundant judgment
  2024-07-10  7:40 [PATCH] vhsot-user: Remove redundant judgment BillXiang
@ 2024-07-20 19:13 ` Michael S. Tsirkin
  2024-07-21  3:33   ` BillXiang
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2024-07-20 19:13 UTC (permalink / raw)
  To: BillXiang; +Cc: qemu-devel, alex.bennee

On Wed, Jul 10, 2024 at 03:40:41PM +0800, BillXiang wrote:
> From: BillXiang <xiangwencheng@dayudpu.com>
> 
> Send only once has been supported in vhost_user_write by vhost_user_per_device_request
> 
> Signed-off-by: BillXiang <xiangwencheng@dayudpu.com>

I am confused by all the patches. Is it on top of your
other patch or instead of? Because that one added
the vq index check.
If we are going to check vq index it's likely cleaner to
always check it.

And again, typos do not inspire confidence. How was this tested?

> ---
>  hw/virtio/vhost-user.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index 00561daa06..04e3568b7e 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -446,11 +446,6 @@ static int vhost_user_set_log_base(struct vhost_dev *dev, uint64_t base,
>          .hdr.size = sizeof(msg.payload.log),
>      };
>  
> -    /* Send only once with first queue pair */
> -    if (dev->vq_index != 0) {
> -        return 0;
> -    }
> -
>      if (shmfd && log->fd != -1) {
>          fds[fd_num++] = log->fd;
>      }
> -- 
> 2.30.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vhsot-user: Remove redundant judgment
  2024-07-20 19:13 ` Michael S. Tsirkin
@ 2024-07-21  3:33   ` BillXiang
  0 siblings, 0 replies; 3+ messages in thread
From: BillXiang @ 2024-07-21  3:33 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: qemu-devel, alex.bennee


> From: "Michael S. Tsirkin"<mst@redhat.com>
> Date:  Sun, Jul 21, 2024, 03:14
> Subject:  Re: [PATCH] vhsot-user: Remove redundant judgment
> To: "BillXiang"<xiangwencheng@dayudpu.com>
> Cc: <qemu-devel@nongnu.org>, <alex.bennee@linaro.org>
> On Wed, Jul 10, 2024 at 03:40:41PM +0800, BillXiang wrote:
> > From: BillXiang <xiangwencheng@dayudpu.com>
> > 
> > Send only once has been supported in vhost_user_write by vhost_user_per_device_request
> > 
> > Signed-off-by: BillXiang <xiangwencheng@dayudpu.com>
> 
> I am confused by all the patches. Is it on top of your
> other patch or instead of? Because that one added
> the vq index check.
> If we are going to check vq index it's likely cleaner to
> always check it.
> 

Yes, it's on top of commit 7c211eb078c4 
("vhost-user: Skip unnecessary duplicated VHOST_USER_SET_LOG_BASE requests") ,
and the check has been done in vhost_user_write 
after VHOST_USER_SET_LOG_BASE be added 
to vhost_user_per_device_request.

> And again, typos do not inspire confidence. How was this tested?
> 
> > ---
> >  hw/virtio/vhost-user.c | 5 -----
> >  1 file changed, 5 deletions(-)
> > 
> > diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> > index 00561daa06..04e3568b7e 100644
> > --- a/hw/virtio/vhost-user.c
> > +++ b/hw/virtio/vhost-user.c
> > @@ -446,11 +446,6 @@ static int vhost_user_set_log_base(struct vhost_dev *dev, uint64_t base,
> >          .hdr.size = sizeof(msg.payload.log),
> >      };
> >  
> > -    /* Send only once with first queue pair */
> > -    if (dev->vq_index != 0) {
> > -        return 0;
> > -    }
> > -
> >      if (shmfd && log->fd != -1) {
> >          fds[fd_num++] = log->fd;
> >      }
> > -- 
> > 2.30.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-21  3:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10  7:40 [PATCH] vhsot-user: Remove redundant judgment BillXiang
2024-07-20 19:13 ` Michael S. Tsirkin
2024-07-21  3:33   ` BillXiang

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).