vhsot-user: Remove redundant judgment
PATCH 1/1 vhsot-user: Remove redundant judgment
From: BillXiang <[email protected]>
Send only once has been supported in vhost_user_write by vhost_user_per_device_request
--- hw/virtio/vhost-user.c | 5 ----- 1 file changed, 5 deletions(-)
hw/virtio/vhost-user.c +0 -5
@@ -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; }
Signature · 1 line
2.30.0
Quoted 5 lines · BillXiang
From: BillXiang <[email protected]>
Send only once has been supported in
vhost_user_writebyvhost_user_per_device_requestSigned-off-by BillXiang <[email protected]>
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?
Quoted 22 lines
--- hw/virtio/vhost-user.c | 5 ----- 1 file changed, 5 deletions(-)hw/virtio/vhost-user.c +0
-5@@ -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; }Signature · 1 line
2.30.0
Quoted 12 lines
From: "Michael S. Tsirkin"<[email protected]>
Date: Sun, Jul 21, 2024, 03:14
Subject: Re: [PATCH] vhsot-user: Remove redundant judgment
To: "BillXiang"<[email protected]>
Cc: <[email protected]>, <[email protected]>Quoted 5 lines · BillXiang
From: BillXiang <[email protected]>
Send only once has been supported invhost_user_writebyvhost_user_per_device_requestSigned-off-by BillXiang <[email protected]>
Quoted 7 lines
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.
Quoted 24 lines
And again, typos do not inspire confidence. How was this tested?
Quoted 22 lines
---
hw/virtio/vhost-user.c| 5 -----1 file changed, 5 deletions(-)hw/virtio/vhost-user.c +0
-0@@ -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