Re: vhost-user-blk reconnect issue

2024-04-10 Thread Yajun Wu
299.git@redhat.com/> New: https://lore.kernel.org/all/20230804052954.2918915-2-fen...@smartx.com/ <https://lore.kernel.org/all/20230804052954.2918915-2-fen...@smartx.com/> Looks good to me. Thanks, Yajun Thanks, Li 2024年4月1日 16:43,Yajun Wu 写道: On 4/1/2024 4:34 PM, L

Re: [PATCH] virtio-net: fix qemu set used ring flag even vhost started

2024-04-02 Thread Yajun Wu
On 4/3/2024 1:10 PM, Michael Tokarev wrote: External email: Use caution opening links or attachments 02.04.2024 07:51, Yajun Wu: When vhost-user or vhost-kernel is handling virtio net datapath, qemu should not touch used ring. But with vhost-user socket reconnect scenario, in a very rare

Re: [PATCH] virtio-net: fix qemu set used ring flag even vhost started

2024-04-02 Thread Yajun Wu
On 4/2/2024 8:11 PM, Philippe Mathieu-Daudé wrote: External email: Use caution opening links or attachments Hi Yajun, On 2/4/24 06:51, Yajun Wu wrote: When vhost-user or vhost-kernel is handling virtio net datapath, qemu "QEMU" Ack. should not touch used ring. But with

[PATCH] virtio-net: fix qemu set used ring flag even vhost started

2024-04-01 Thread Yajun Wu
../chardev/char.c:82 This issue causes guest kernel stop kicking device and traffic stop. Add vhost_started check in virtio_net_handle_tx_bh to fix this wrong VRING_USED_F_NO_NOTIFY set. Signed-off-by: Yajun Wu Reviewed-by: Jiri Pirko --- hw/net/virtio-net.c | 4 1 file changed, 4 insertion

Re: vhost-user-blk reconnect issue

2024-04-01 Thread Yajun Wu
bf105f9e83ff5e763b8fcb6f7ba9be.1697644299.git@redhat.com/> My tests are with this fix, failed in the two scenarios I mentioned. Thanks, Li 2024年4月1日 10:08,Yajun Wu 写道: On 3/27/2024 6:47 PM, Stefano Garzarella wrote: External email: Use caution opening links or attachments Hi Yajun, On Mon,

Re: vhost-user-blk reconnect issue

2024-03-31 Thread Yajun Wu
On 3/27/2024 6:47 PM, Stefano Garzarella wrote: External email: Use caution opening links or attachments Hi Yajun, On Mon, Mar 25, 2024 at 10:54:13AM +, Yajun Wu wrote: Hi experts, With latest QEMU (8.2.90), we find two vhost-user-blk backend reconnect failure scenarios: Do you know

vhost-user-blk reconnect issue

2024-03-25 Thread Yajun Wu
Hi experts, With latest QEMU (8.2.90), we find two vhost-user-blk backend reconnect failure scenarios: 1. Disconnect vhost-user-blk backend before guest driver probe vblk device, then reconnect backend after guest driver probe device. QEMU won't send out any vhost messages to restore backend.

Re: [RFC PATCH 0/5] virtio-net: Introduce LM early load

2023-10-18 Thread Yajun Wu
On 10/18/2023 12:47 AM, Eugenio Perez Martin wrote: External email: Use caution opening links or attachments On Mon, Sep 18, 2023 at 6:51 AM Yajun Wu wrote: This series of patches aims to minimize the downtime during live migration of a virtio-net device with a vhost-user backend

Re: [RFC PATCH 0/5] virtio-net: Introduce LM early load

2023-10-17 Thread Yajun Wu
Ping. On 9/18/2023 12:49 PM, Yajun Wu wrote: This series of patches aims to minimize the downtime during live migration of a virtio-net device with a vhost-user backend. In the case of hardware virtual Data Path Acceleration (vDPA) implementation, the hardware configuration, which includes

Re: [Virtio-fs] (no subject)

2023-10-09 Thread Yajun Wu
On 10/9/2023 5:13 PM, Hanna Czenczek wrote: External email: Use caution opening links or attachments On 09.10.23 11:07, Hanna Czenczek wrote: On 09.10.23 10:21, Hanna Czenczek wrote: On 07.10.23 04:22, Yajun Wu wrote: [...] The main motivation of adding VHOST_USER_SET_STATUS is to let

Re: [Virtio-fs] (no subject)

2023-10-09 Thread Yajun Wu
On 10/9/2023 6:28 PM, German Maglione wrote: External email: Use caution opening links or attachments On Sat, Oct 7, 2023 at 4:23 AM Yajun Wu wrote: On 10/6/2023 6:34 PM, Michael S. Tsirkin wrote: External email: Use caution opening links or attachments On Fri, Oct 06, 2023 at 11:47

Re: [Virtio-fs] (no subject)

2023-10-06 Thread Yajun Wu
downtime). Hanna For better or worse kick is per ring. It's out of spec to start rings that were not kicked but I guess you could do configuration ... Seems somewhat asymmetrical though. Let's wait until next week, hopefully Yajun Wu will answer. The main motivation of adding VHOST_USER_SET_STATUS

[RFC PATCH 2/5] vhost: Add support for presetup

2023-09-17 Thread Yajun Wu
Add New API vhost_dev_start_presetup to notify backend the start and end of presetup. API vhost_dev_presetup to send out the device configurations: 1. acked_features 2. memory table 3. vring information 4. disable host/guest notifier. Signed-off-by: Yajun Wu Reviewed-by: Avihai Horon Reviewed

[RFC PATCH 3/5] vhost-net: Add support for presetup

2023-09-17 Thread Yajun Wu
Introduce New API vhost_net_presetup to send virtio net device configuration to backend in LM setup. Mainly calling vhost_dev_presetup, then sending out vring enable. Signed-off-by: Yajun Wu Reviewed-by: Avihai Horon Reviewed-by: Jiri Pirko --- hw/net/vhost_net.c | 40

[RFC PATCH 0/5] virtio-net: Introduce LM early load

2023-09-17 Thread Yajun Wu
from 191.4 ms to 6.6 ms. References: === [1] https://github.com/Mellanox/dpdk-vhost-vfe/pull/37 Any comments or feedback are highly appreciated. Thanks, Yajun Yajun Wu (5): vhost-user: Add presetup protocol feature and op vhost: Add support for presetup vhost-net: A

[RFC PATCH 1/5] vhost-user: Add presetup protocol feature and op

2023-09-17 Thread Yajun Wu
place in the live migration setup stage. Signed-off-by: Yajun Wu Reviewed-by: Avihai Horon Reviewed-by: Jiri Pirko --- docs/interop/vhost-user.rst | 10 ++ hw/virtio/vhost-user.c| 30 ++ include/hw/virtio/vhost-backend.h | 3 +++ 3 files

[RFC PATCH 5/5] virtio-net: Introduce LM early load

2023-09-17 Thread Yajun Wu
ation" device property to on. Signed-off-by: Yajun Wu Reviewed-by: Avihai Horon Reviewed-by: Jiri Pirko --- hw/net/trace-events| 1 + hw/net/virtio-net.c| 100 + include/hw/virtio/virtio-net.h | 1 + 3 files changed, 102 insertions(+)

[RFC PATCH 4/5] virtio: Add VMState for early load

2023-09-17 Thread Yajun Wu
. Signed-off-by: Yajun Wu Reviewed-by: Avihai Horon Reviewed-by: Jiri Pirko --- hw/virtio/virtio.c | 152 +++-- include/hw/virtio/virtio.h | 10 ++- 2 files changed, 103 insertions(+), 59 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index

[PATCH] docs: vhost-user: VHOST_USER_GET_STATUS require reply

2023-05-04 Thread Yajun Wu
Add VHOST_USER_GET_STATUS to the list of requests that require a reply. Cc: Maxime Coquelin Cc: Michael S. Tsirkin Signed-off-by: Yajun Wu --- docs/interop/vhost-user.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index

Re: [PATCH v2] vhost-user: send SET_STATUS 0 after GET_VRING_BASE

2023-05-03 Thread Yajun Wu
just vhost-user.c now. I ran various online code searches to identify vhost-user backends implementing SET_STATUS. It seems only DPDK implements SET_STATUS and Yajun Wu has confirmed that it is safe to make this change. Fixes: commit 923b8921d210763359e96246a58658ac0db6c645 ("vhos

Re: [PATCH] vhost-user: send SET_STATUS 0 after GET_VRING_BASE

2023-04-20 Thread Yajun Wu
just vhost-user.c now. I ran various online code searches to identify vhost-user backends implementing SET_STATUS. It seems only DPDK implements SET_STATUS and Yajun Wu has confirmed that it is safe to make this change. Cc: Michael S. Tsirkin Cc: Cindy Lu Signed-off-by: Stefan Hajnoczi ---

Re: Move vhost-user SET_STATUS 0 after get vring base?

2023-04-18 Thread Yajun Wu
On 4/18/2023 11:34 PM, Michael S. Tsirkin wrote: On Tue, Apr 18, 2023 at 11:18:11AM -0400, Stefan Hajnoczi wrote: Hi, Cindy's commit ca71db438bdc ("vhost: implement vhost_dev_start method") added SET_STATUS calls to vhost_dev_start() and vhost_dev_stop() for all vhost backends. Eugenio's

[PATCH] chardev/char-socket: set s->listener = NULL in char_socket_finalize

2023-02-14 Thread Yajun Wu
istener freed, event callback function vhost_user_blk_event will be called to handle CHR_EVENT_CLOSED. vhost_user_blk_event is calling qio_net_listener_set_client_func_full which is still using s->listener. Setting s->listener = NULL after object_unref(OBJECT(s->listener)) can solve this issue

RE: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-15 Thread Yajun Wu
cda8) at ../softmmu/main.c:48 -Original Message- From: Maxime Coquelin Sent: Thursday, January 12, 2023 5:26 PM To: Laurent Vivier Cc: qemu-devel@nongnu.org; Peter Maydell ; Yajun Wu ; Parav Pandit ; Michael S. Tsirkin Subject: Re: [PULL v4 76/83] vhost-user: Support vhost_dev_s

RE: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-11 Thread Yajun Wu
(1ULL << VHOST_USER_PROTOCOL_F_STATUS)) Remove VHOST_USER_PROTOCOL_F_STATUS can disable VHOST_USER_SET/GET_STATUS message. Should W.A. this issue. Thanks, Yajun -Original Message- From: Laurent Vivier Sent: Wednesday, January 11, 2023 5:50 PM To: Maxime Coquelin Cc: qemu-de

[PATCH] vhost-user-blk: Fix live migration crash during event handling

2022-12-07 Thread Yajun Wu
net_cleanup and call it in qemu_cleanup. Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/block/vhost-user-blk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 0d5190accf..b323d5820b 100644 --- a/hw/block/vhost

[PATCH] vhost-user: send set log base message only once

2022-11-21 Thread Yajun Wu
Vhost message VHOST_USER_SET_LOG_BASE is device wide. So only send it once with the first queue pair. Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/virtio/vhost-user.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index

RE: [PATCH v2 1/4] hw/virtio: incorporate backend features in features

2022-11-10 Thread Yajun Wu
OCOL_FEATURES))) { 2050 vq->enabled = true; 2051 } Thanks, Yajun -Original Message- From: Alex Bennée Sent: Wednesday, October 26, 2022 3:42 PM To: Yajun Wu Cc: qemu-devel@nongnu.org; m...@redhat.com; Parav Pan

[PATCH] vhost: set mem table before device start

2022-11-08 Thread Yajun Wu
migrating a VM, vhost device start is occuring in vmstate load stage. Moving set mem table just after VM bootup, before device start can let backend have enough time to pin the guest memory before starting the device. This improvements reduces VM downtime by 400+msec. Signed-off-by: Yajun Wu Acked

[PATCH v4 1/2] vhost: Change the sequence of device start

2022-11-06 Thread Yajun Wu
specification for "device initialization sequence". Following patch will add vhost-user vhost_dev_start support. Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/block/vhost-user-blk.c | 18 +++--- hw/net/vhost_net.c| 14 -- 2 files changed, 19 inserti

[PATCH v4 0/2] vhost-user: Support vhost_dev_start

2022-11-06 Thread Yajun Wu
tps://qemu-project.gitlab.io/qemu/interop/vhost-user.html#introduction v4: - fix vhost_net_start_one fallback code v3: - rebase v2: - add setting status bit VIRTIO_CONFIG_S_FEATURES_OK - avoid adding status bits already set Yajun Wu (2): vhost: Change the sequence of device start vhost-use

[PATCH v4 2/2] vhost-user: Support vhost_dev_start

2022-11-06 Thread Yajun Wu
margin, specially for the large number of VQs of 64 from 800 msec to 250 msec. [1] https://qemu-project.gitlab.io/qemu/interop/vhost-user.html Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/virtio/vhost-user.c | 74 +- 1 file changed, 73

RE: [PATCH v2 1/4] hw/virtio: incorporate backend features in features

2022-10-26 Thread Yajun Wu
Hi Alex, With this change, VHOST_USER_F_PROTOCOL_FEATURES bit will be set to backend for virtio block device (previously not). From https://www.qemu.org/docs/master/interop/vhost-user.html spec: If VHOST_USER_F_PROTOCOL_FEATURES has not been negotiated, the ring starts directly in the enabled

[PATCH] vhost-user: Fix out of order vring host notification handling

2022-10-17 Thread Yajun Wu
is to remove current element from GPtrArray, make the right position for element to insert. Fixes: 503e355465 ("virtio/vhost-user: dynamically assign VhostUserHostNotifiers") Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/virtio/vhost-user.c | 5 + 1 file changed, 5 insertion

[PATCH v3 0/2] vhost-user: Support vhost_dev_start

2022-10-17 Thread Yajun Wu
tps://qemu-project.gitlab.io/qemu/interop/vhost-user.html#introduction v3: - rebase v2: - add setting status bit VIRTIO_CONFIG_S_FEATURES_OK - avoid adding status bits already set Yajun Wu (2): vhost: Change the sequence of device start vhost-user: Support vhost_dev_start hw/block/vhost-user-

[PATCH v3 1/2] vhost: Change the sequence of device start

2022-10-17 Thread Yajun Wu
specification for "device initialization sequence". Following patch will add vhost-user vhost_dev_start support. Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/block/vhost-user-blk.c | 18 +++--- hw/net/vhost_net.c| 12 ++-- 2 files changed, 17 inserti

[PATCH v3 2/2] vhost-user: Support vhost_dev_start

2022-10-17 Thread Yajun Wu
margin, specially for the large number of VQs of 64 from 800 msec to 250 msec. [1] https://qemu-project.gitlab.io/qemu/interop/vhost-user.html Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/virtio/vhost-user.c | 74 +- 1 file changed, 73

RE: [PATCH v2 0/2] vhost-user: Support vhost_dev_start

2022-10-12 Thread Yajun Wu
Michael, Don't forget to merge. Thanks! -Original Message- From: Yajun Wu Sent: Monday, September 5, 2022 12:58 PM To: Michael S. Tsirkin Cc: qemu-devel@nongnu.org; Parav Pandit Subject: RE: [PATCH v2 0/2] vhost-user: Support vhost_dev_start Michael, 7.1 released, please merge

RE: [PATCH v2 0/2] vhost-user: Support vhost_dev_start

2022-09-04 Thread Yajun Wu
Michael, 7.1 released, please merge. -Original Message- From: Michael S. Tsirkin Sent: Tuesday, July 26, 2022 10:56 PM To: Yajun Wu Cc: qemu-devel@nongnu.org; Parav Pandit Subject: Re: [PATCH v2 0/2] vhost-user: Support vhost_dev_start External email: Use caution opening links

[PATCH v2 1/2] vhost: Change the sequence of device start

2022-07-12 Thread Yajun Wu
specification for "device initialization sequence". Following patch will add vhost-user vhost_dev_start support. Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/block/vhost-user-blk.c | 18 +++--- hw/net/vhost_net.c| 12 ++-- 2 files changed, 17 inserti

[PATCH v2 0/2] vhost-user: Support vhost_dev_start

2022-07-12 Thread Yajun Wu
tps://qemu-project.gitlab.io/qemu/interop/vhost-user.html#introduction v2: - add setting status bit VIRTIO_CONFIG_S_FEATURES_OK - avoid adding status bits already set Yajun Wu (2): vhost: Change the sequence of device start vhost-user: Support vhost_dev_start hw/block/vhost-user-blk.c | 18

[PATCH v2 2/2] vhost-user: Support vhost_dev_start

2022-07-12 Thread Yajun Wu
margin, specially for the large number of VQs of 64 from 800 msec to 250 msec. [1] https://qemu-project.gitlab.io/qemu/interop/vhost-user.html Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/virtio/vhost-user.c | 74 +- 1 file changed, 73

[PATCH 0/2] vhost-user: Support vhost_dev_start

2022-06-28 Thread Yajun Wu
tps://qemu-project.gitlab.io/qemu/interop/vhost-user.html#introduction Yajun Wu (2): vhost: Change the sequence of device start vhost-user: Support vhost_dev_start hw/block/vhost-user-blk.c | 18 +++- hw/net/vhost_net.c| 12 hw/virtio/vhost-user

[PATCH 1/2] vhost: Change the sequence of device start

2022-06-28 Thread Yajun Wu
specification for "device initialization sequence". Following patch will add vhost-user vhost_dev_start support. Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/block/vhost-user-blk.c | 18 +++--- hw/net/vhost_net.c| 12 ++-- 2 files changed, 17 inserti

[PATCH 2/2] vhost-user: Support vhost_dev_start

2022-06-28 Thread Yajun Wu
margin, specially for the large number of VQs of 64 from 800 msec to 250 msec. [1] https://qemu-project.gitlab.io/qemu/interop/vhost-user.html Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/virtio/vhost-user.c | 58 ++ 1 file changed, 58

RE: [PATCH] virtio/vhost-user: Fix wrong vhost notifier GPtrArray size

2022-06-13 Thread Yajun Wu
Hi Michael, User space vhost clients are broken for few weeks now without this fix. With Alex's review, can you please merge it if there are no further comments? Thanks. -Original Message- From: Alex Bennée Sent: Thursday, May 26, 2022 3:09 PM To: Yajun Wu Cc: qemu-devel@nongnu.org

[PATCH] virtio/vhost-user: Fix wrong vhost notifier GPtrArray size

2022-05-25 Thread Yajun Wu
ssign VhostUserHostNotifiers") Signed-off-by: Yajun Wu Acked-by: Parav Pandit Change-Id: I87e0f7591ca9a59d210879b260704a2d9e9d6bcd --- 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 b040c1ad2b..dbc690d

[PATCH v2] hw/virtio: Fix leak of host-notifier memory-region

2021-08-15 Thread Yajun Wu via
If call virtio_queue_set_host_notifier_mr fails, should free host-notifier memory-region. Fixes: 44866521bd ("vhost-user: support registering external host notifiers") Signed-off-by: Yajun Wu --- hw/virtio/vhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhos

[PATCH] hw/virtio: Fix leak of host-notifier memory-region

2021-08-11 Thread Yajun Wu via
If call virtio_queue_set_host_notifier_mr fails, should free host-notifier memory-region. Signed-off-by: Yajun Wu --- hw/virtio/vhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index aec6cc1..3ae5297 100644 --- a/hw/virtio/vhost

Any reason VIRTQUEUE_MAX_SIZE is 1024? Can we increase this limit?

2020-07-30 Thread Yajun Wu
Hi all, I'm doing iperf test on VIRTIO net through vhost-user(HW VDPA). Find maximal acceptable tx_queue_size/rx_queue_size is 1024. Basically increase queue size can get better RX rate for my case. Can we increase the limit(VIRTQUEUE_MAX_SIZE) to 8192 to possibly gain better performance?