If the backend crashes and restarts, the device is broken.
This patch adds reconnect for vhost-user-scsi.
This patch also improves the error messages, and reports some silent errors.
Tested with spdk backend.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 16 +-
hw/scsi/vh
When the vhost-user is reconnecting to the backend, and if the vhost-user fails
at the get_features in vhost_dev_init(), then the reconnect will fail
and it will not be retriggered forever.
The reason is:
When the vhost-user fails at get_features, the vhost_dev_cleanup will be called
immediately.
Multiple devices need this macro, move it to a common header.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/block/vhost-user-blk.c | 4 +---
hw/virtio/vhost-user-gpio.c | 3 +--
include/hw/virtio/vhost.h | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/
Let's keep the same behavior as vhost-user-blk.
Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/scsi/vhost-user-scsi.c | 48 +++
1 file changed, 44 insertions(+), 4 deletions
Currently the get_inflight_fd will be sent every time the device is started, and
the backend will allocate shared memory to save the inflight state. If the
backend finds that it receives the second get_inflight_fd, it will release the
previous shared memory, which breaks inflight working logic.
Th
Changes for v8:
- [PATCH 3/5] vhost-user-scsi: support reconnect to backend
- Fix code style suggested by Manos Pitsidianakis
- [PATCH 4/5] vhost-user-scsi: start vhost when guest kicks
- Use 'DEVICE()' macro in vhost_user_scsi_handle_output to replace the
'parent_obj.parent_obj.parent_obj.
Thanks for your comments, I will submit the v8.
> On 8 Oct 2023, at 6:46 PM, Manos Pitsidianakis
> wrote:
>
> Hello Li, I have some trivial style comments you could possibly address in a
> next version:
>
> On Sun, 08 Oct 2023 12:12, Li Feng wrote:
>> diff --git a/hw/scsi/vhost-user-scsi.c b
On 10/7/23 19:54, Mike Maslenkin wrote:
On Sat, Oct 7, 2023 at 5:30 PM Alexander Ivanov
wrote:
On 10/7/23 13:21, Mike Maslenkin wrote:
On Sat, Oct 7, 2023 at 1:18 PM Alexander Ivanov
wrote:
On 10/6/23 21:43, Mike Maslenkin wrote:
On Mon, Oct 2, 2023 at 12:01 PM Alexander Ivanov
wrot
Hello Li, I have some trivial style comments you could possibly address
in a next version:
On Sun, 08 Oct 2023 12:12, Li Feng wrote:
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index df6b66cc1a..5df24faff4 100644
--- a/hw/scsi/vhost-user-scsi.c
+++ b/hw/scsi/vhost-user-s
Currently the get_inflight_fd will be sent every time the device is started, and
the backend will allocate shared memory to save the inflight state. If the
backend finds that it receives the second get_inflight_fd, it will release the
previous shared memory, which breaks inflight working logic.
Th
When the vhost-user is reconnecting to the backend, and if the vhost-user fails
at the get_features in vhost_dev_init(), then the reconnect will fail
and it will not be retriggered forever.
The reason is:
When the vhost-user fails at get_features, the vhost_dev_cleanup will be called
immediately.
Let's keep the same behavior as vhost-user-blk.
Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/scsi/vhost-user-scsi.c | 48 +++
1 file changed, 44 insertions(+), 4 deletions
If the backend crashes and restarts, the device is broken.
This patch adds reconnect for vhost-user-scsi.
This patch also improves the error messages, and reports some silent errors.
Tested with spdk backend.
Signed-off-by: Li Feng
---
hw/scsi/vhost-scsi-common.c | 16 +-
hw/scsi/vh
Multiple devices need this macro, move it to a common header.
Signed-off-by: Li Feng
Reviewed-by: Raphael Norwitz
---
hw/block/vhost-user-blk.c | 4 +---
hw/virtio/vhost-user-gpio.c | 3 +--
include/hw/virtio/vhost.h | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/
Changes for v7:
- [PATCH 3/5] vhost-user-scsi: support reconnect to backend
- Add reporting the error in vhost-scsi;
- Rebase to master and fix the conflict.
- Add "Reviewed-by" tags.
Changes for v6:
- [PATCH] vhost-user: fix lost reconnect
- Fix missing assign event_cb.
Changes for v5:
- N
On Sun, Oct 8, 2023 at 4:49 PM Michael S. Tsirkin wrote:
>
> On Fri, Sep 22, 2023 at 07:46:10PM +0800, Li Feng wrote:
> > Changes for v6:
> > - [PATCH] vhost-user: fix lost reconnect
> > - Fix missing assign event_cb.
>
>
> Pls don't make vN+1 a reply to vN - start a new thread
> with each versi
On Sun, Oct 8, 2023 at 4:51 PM Michael S. Tsirkin wrote:
>
> On Sun, Oct 08, 2023 at 04:49:05PM +0800, Li Feng wrote:
> > On Fri, Sep 29, 2023 at 8:55 AM Raphael Norwitz
> > wrote:
> > >
> > >
> > >
> > > > On Sep 22, 2023, at 7:46 AM, Li Feng wrote:
> > > >
> > > > Currently the get_inflight_fd
On Fri, Sep 29, 2023 at 8:55 AM Raphael Norwitz
wrote:
>
>
>
> > On Sep 22, 2023, at 7:46 AM, Li Feng wrote:
> >
> > Currently the get_inflight_fd will be sent every time the device is
> > started, and
> > the backend will allocate shared memory to save the inflight state. If the
> > backend fin
On Sun, Oct 08, 2023 at 04:49:05PM +0800, Li Feng wrote:
> On Fri, Sep 29, 2023 at 8:55 AM Raphael Norwitz
> wrote:
> >
> >
> >
> > > On Sep 22, 2023, at 7:46 AM, Li Feng wrote:
> > >
> > > Currently the get_inflight_fd will be sent every time the device is
> > > started, and
> > > the backend w
On Fri, Sep 22, 2023 at 07:46:10PM +0800, Li Feng wrote:
> Changes for v6:
> - [PATCH] vhost-user: fix lost reconnect
> - Fix missing assign event_cb.
Pls don't make vN+1 a reply to vN - start a new thread
with each version please.
> Changes for v5:
> - No logic has been changed, just move par
Sorry, the reply is late due to being on vacation for half a month.
On Fri, Sep 29, 2023 at 8:55 AM Raphael Norwitz
wrote:
>
> One comment on the logging stuff in vhost-scsi. As far as I can tell the
> logging in vhost-user-scsi looks good.
>
> Markus - does this look better to you? Otherwise do
21 matches
Mail list logo