[PATCH] scripts/qemugdb/mtree.py: fix error of treating decimal as hexadecimal

2024-07-20 Thread Hawkins Jiawei
system (I/O) (@ 0x57273400) fee0-feef kvm-apic-msi (I/O) (@ 0x57354ca0) ... Fixes: 8037fa55ac ("scripts/qemugdb/mtree.py: fix up mtree dump") Signed-off-by: Hawkins Jiawei --- scripts/qemugdb/mtree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v5 3/3] vdpa: Allow VIRTIO_NET_F_RSS in SVQ

2023-10-24 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_RSS feature. Signed-off-by: Hawkins Jiawei --- v5: - no changes v4: https://lore.kernel.org/all/4ee7f3f339469f41626ca2c3ac7b1c574ebce901.1697904740.git.yin31...@gmail.com/ - no code changes v3: https://lore.kernel.org/all

[PATCH v5 1/3] vdpa: Add SetSteeringEBPF method for NetClientState

2023-10-24 Thread Hawkins Jiawei
code maintainbility. Suggested-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- v5: - no changes v4: https://lore.kernel.org/all/1c6faf4c5c3304c0bf14929143ccedb2e90dbcb2.1697904740.git.yin31...@gmail.com/ - no code changes v3: https://lore.kernel.org/all

[PATCH v5 0/3] Vhost-vdpa Shadow Virtqueue RSS Support

2023-10-24 Thread Hawkins Jiawei
hout triggering any error or warning. L0 QEMU echo "Can't load eBPF RSS - fallback to software RSS". Hawkins Jiawei (3): vdpa: Add SetSteeringEBPF method for NetClientState vdpa: Restore receive-side scaling state vdpa: Allow VIRTIO_NET_F_RSS in SVQ net/vhost-vdpa.c | 76 +++

[PATCH v5 2/3] vdpa: Restore receive-side scaling state

2023-10-24 Thread Hawkins Jiawei
This patch reuses vhost_vdpa_net_load_rss() with some refactorings to restore the receive-side scaling state at device's startup. Signed-off-by: Hawkins Jiawei --- v5: - resolve conflict with the updated patch "Vhost-vdpa Shadow Virtqueue Hash calculation Support&qu

[PATCH v4 1/2] vdpa: Restore hash calculation state

2023-10-24 Thread Hawkins Jiawei
This patch introduces vhost_vdpa_net_load_rss() to restore the hash calculation state at device's startup. Signed-off-by: Hawkins Jiawei --- v4: - fix some typos pointed out by Michael - zero the `cfg` fields at the definition suggested by Michael v3: https://patchwork.kernel.org/pr

[PATCH v4 0/2] Vhost-vdpa Shadow Virtqueue Hash calculation Support

2023-10-24 Thread Hawkins Jiawei
xecuting without triggering any error or warning. Hawkins Jiawei (2): vdpa: Restore hash calculation state vdpa: Allow VIRTIO_NET_F_HASH_REPORT in SVQ net/vhost-vdpa.c | 92 1 file changed, 92 insertions(+) -- 2.25.1

[PATCH v4 2/2] vdpa: Allow VIRTIO_NET_F_HASH_REPORT in SVQ

2023-10-24 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_HASH_REPORT feature. Signed-off-by: Hawkins Jiawei --- v4: - no changes v3: https://lore.kernel.org/all/c3b69f0a65600722c1e4d3aa14d53a71e8ffb888.1697902949.git.yin31...@gmail.com/ - no code changes v2: https://lore.kernel.org/all

Re: [PATCH v3 1/2] vdpa: Restore hash calculation state

2023-10-22 Thread Hawkins Jiawei
在 2023/10/22 18:00, Michael S. Tsirkin 写道: > On Sun, Oct 22, 2023 at 10:00:48AM +0800, Hawkins Jiawei wrote: >> This patch introduces vhost_vdpa_net_load_rss() to restore >> the hash calculation state at device's startup. >> >> Signed-off-by: Hawkins Jiawei

[PATCH v4 1/3] vdpa: Add SetSteeringEBPF method for NetClientState

2023-10-21 Thread Hawkins Jiawei
code maintainbility. Suggested-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- v4: no code changes v3: https://lore.kernel.org/all/30509e3c3b07bcadd95d5932aeb16820cb022902.1693299194.git.yin31...@gmail.com/ net/vhost-vdpa.c | 8 1 file changed, 8 insertions(+) diff --git a/net

[PATCH v4 0/3] Vhost-vdpa Shadow Virtqueue RSS Support

2023-10-21 Thread Hawkins Jiawei
L2 source guest, run the following bash command: ```bash #!/bin/sh ethtool -K eth0 rxhash on ``` - Execute the live migration in L2 source monitor - Result * with this series, L2 QEMU can execute without triggering any error or warning. L0 QEMU echo "Can't load eBPF RSS - fallback

[PATCH v4 2/3] vdpa: Restore receive-side scaling state

2023-10-21 Thread Hawkins Jiawei
This patch reuses vhost_vdpa_net_load_rss() with some refactorings to restore the receive-side scaling state at device's startup. Signed-off-by: Hawkins Jiawei --- v4: - add do_rss argument and relative code in vhost_vdpa_net_load_rss() v3: https://lore.kernel.or

[PATCH v4 3/3] vdpa: Allow VIRTIO_NET_F_RSS in SVQ

2023-10-21 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_RSS feature. Signed-off-by: Hawkins Jiawei --- v4: no code changes v3: https://lore.kernel.org/all/2d2a378291bfac4144a0c0c473cf80415bb580b3.1693299194.git.yin31...@gmail.com/ net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b

[PATCH v3 1/2] vdpa: Restore hash calculation state

2023-10-21 Thread Hawkins Jiawei
This patch introduces vhost_vdpa_net_load_rss() to restore the hash calculation state at device's startup. Signed-off-by: Hawkins Jiawei --- v3: - remove the `do_rss` argument in vhost_vdpa_net_load_rss() - zero reserved fields in "cfg" manually instead of using memset() to p

[PATCH v3 0/2] Vhost-vdpa Shadow Virtqueue Hash calculation Support

2023-10-21 Thread Hawkins Jiawei
the live migration in L2 source monitor - Result * with this series, gdb can hit the breakpoint and continue the executing without triggering any error or warning. Hawkins Jiawei (2): vdpa: Restore hash calculation state vdpa: Allow VIRTIO_NET_F_HA

[PATCH v3 2/2] vdpa: Allow VIRTIO_NET_F_HASH_REPORT in SVQ

2023-10-21 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_HASH_REPORT feature. Signed-off-by: Hawkins Jiawei --- v3: no code changes v2: https://lore.kernel.org/all/a67d4abc2c8c5c7636addc729daa5432fa8193bd.1693297766.git.yin31...@gmail.com/ net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost

Re: [PULL 08/83] vdpa: Restore hash calculation state

2023-10-19 Thread Hawkins Jiawei
在 2023/10/20 02:07, Michael S. Tsirkin 写道: > On Thu, Oct 19, 2023 at 09:32:28AM -0700, Stefan Hajnoczi wrote: >> On Wed, 18 Oct 2023 at 08:56, Michael S. Tsirkin wrote: >>> >>> From: Hawkins Jiawei >>> >>> This patch introduces vhost_vdpa_net_load_rs

[PATCH v5 2/7] vdpa: Avoid using vhost_vdpa_net_load_*() outside vhost_vdpa_net_load()

2023-10-13 Thread Hawkins Jiawei
(), it is more elegant to send the CVQ commands directly without invoking vhost_vdpa_net_load_*() helpers. Signed-off-by: Hawkins Jiawei Acked-by: Eugenio Pérez --- v5: - remove redundant initialization statement suggested by Eugenio - remove assertion suggested by Eugenio v4: https

[PATCH v5 0/7] vdpa: Send all CVQ state load commands in parallel

2023-10-13 Thread Hawkins Jiawei
* without this series, QEMU should not trigger any warning or error except something like "vhost_vdpa_net_load() = 20848 us" Hawkins Jiawei (7): vdpa: Use iovec for vhost_vdpa_net_cvq_add() vdpa: Avoid using vhost_vdpa_net_load_*() outside vhost_vdpa_net_load() vdpa: Check de

[PATCH v5 3/7] vdpa: Check device ack in vhost_vdpa_net_load_rx_mode()

2023-10-13 Thread Hawkins Jiawei
Considering that vhost_vdpa_net_load_rx_mode() is only called within vhost_vdpa_net_load_rx() now, this patch refactors vhost_vdpa_net_load_rx_mode() to include a check for the device's ack, simplifying the code and improving its maintainability. Signed-off-by: Hawkins Jiawei Acked-by: Eu

[PATCH v5 1/7] vdpa: Use iovec for vhost_vdpa_net_cvq_add()

2023-10-13 Thread Hawkins Jiawei
hieve this, this patch refactor vhost_vdpa_net_cvq_add() to accept `struct iovec`, which eliminates the coupling of control commands to `s->cvq_cmd_out_buffer` and `s->status`, allowing them to use their own buffer. Signed-off-by: Hawkins Jiawei Acked-by: Eugenio Pérez --- v5: - no change

[PATCH v5 6/7] vhost: Expose vhost_svq_available_slots()

2023-10-13 Thread Hawkins Jiawei
poses vhost_svq_available_slots(), allowing QEMU to know whether the SVQ is full. Signed-off-by: Hawkins Jiawei Acked-by: Eugenio Pérez --- v5: - inline the vhost_svq_available_slots() in the caller and remove the helper function from this patch suggested by Eugenio v4: https://lore.kernel.or

[PATCH v5 5/7] vdpa: Introduce cursors to vhost_vdpa_net_loadx()

2023-10-13 Thread Hawkins Jiawei
uffers, allowing QEMU to send CVQ state load commands in parallel at device startup. Signed-off-by: Hawkins Jiawei --- v5: - move iov_copy() call before vhost_vdpa_net_cvq_add() and add comments for iov_copy() to improve readability - fix conflicts with master branch v4: https://lore.kernel.o

[PATCH v5 7/7] vdpa: Send cvq state load commands in parallel

2023-10-13 Thread Hawkins Jiawei
and checking of buffers until either the SVQ is full or control commands shadow buffers are full. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1578 Signed-off-by: Hawkins Jiawei Acked-by: Eugenio Pérez --- v5: - remove the assertion suggested by Eugenio - inline the

[PATCH v5 4/7] vdpa: Move vhost_svq_poll() to the caller of vhost_vdpa_net_cvq_add()

2023-10-13 Thread Hawkins Jiawei
commands shadow buffers are full. Signed-off-by: Hawkins Jiawei --- v5: - no change v4: https://lore.kernel.org/all/496c542c22ae1b4222175d5576c949621c7c2fc0.1693287885.git.yin31...@gmail.com/ - always check the return value of vhost_vdpa_net_svq_poll() suggested Eugenio v3: https

Re: [PATCH v4 8/8] vdpa: Send cvq state load commands in parallel

2023-10-07 Thread Hawkins Jiawei
在 2023/10/4 15:33, Eugenio Perez Martin 写道: > On Tue, Aug 29, 2023 at 7:55 AM Hawkins Jiawei wrote: >> >> This patch enables sending CVQ state load commands >> in parallel at device startup by following steps: >> >>* Refactor vhost_vdpa_net_load_cmd()

Re: [PATCH v4 7/8] vdpa: Introduce cursors to vhost_vdpa_net_loadx()

2023-10-07 Thread Hawkins Jiawei
在 2023/10/4 15:21, Eugenio Perez Martin 写道: > On Tue, Aug 29, 2023 at 7:55 AM Hawkins Jiawei wrote: >> >> This patch introduces two new arugments, `out_cursor` >> and `in_cursor`, to vhost_vdpa_net_loadx(). Addtionally, >> it includes a helper function >> vhost

Re: [PATCH v4 4/8] vdpa: Avoid using vhost_vdpa_net_load_*() outside vhost_vdpa_net_load()

2023-10-07 Thread Hawkins Jiawei
在 2023/10/4 01:48, Eugenio Perez Martin 写道: > On Tue, Aug 29, 2023 at 7:55 AM Hawkins Jiawei wrote: >> >> Next patches in this series will refactor vhost_vdpa_net_load_cmd() >> to iterate through the control commands shadow buffers, allowing QEMU >> to send CVQ state l

Re: [PATCH v4 3/8] vhost: Expose vhost_svq_available_slots()

2023-10-07 Thread Hawkins Jiawei
在 2023/10/4 01:44, Eugenio Perez Martin 写道: > On Tue, Aug 29, 2023 at 7:55 AM Hawkins Jiawei wrote: >> >> Next patches in this series will delay the polling >> and checking of buffers until either the SVQ is >> full or control commands shadow buffers are full, >&g

Re: [PATCH v4 0/8] vdpa: Send all CVQ state load commands in parallel

2023-08-29 Thread Hawkins Jiawei
On 2023/8/29 13:54, Hawkins Jiawei wrote: > This patchset allows QEMU to delay polling and checking the device > used buffer until either the SVQ is full or control commands shadow > buffers are full, instead of polling and checking immediately after > sending each SVQ control comm

[PATCH v3 2/3] vdpa: Restore receive-side scaling state

2023-08-29 Thread Hawkins Jiawei
This patch reuses vhost_vdpa_net_load_rss() with some refactorings to restore the receive-side scaling state at device's startup. Signed-off-by: Hawkins Jiawei --- v3: - resolve conflict with updated patch "Vhost-vdpa Shadow Virtqueue Hash calculation Support" v2: https://lore

[PATCH v3 3/3] vdpa: Allow VIRTIO_NET_F_RSS in SVQ

2023-08-29 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_RSS feature. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 85547b7bbb..13da60aeda 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -119,6 +119,7 @@ static const

[PATCH v3 1/3] vdpa: Add SetSteeringEBPF method for NetClientState

2023-08-29 Thread Hawkins Jiawei
code maintainbility. Suggested-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 8 1 file changed, 8 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index b29f84f54c..11f89e7032 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -238,6 +238,12

[PATCH v3 0/3] Vhost-vdpa Shadow Virtqueue RSS Support

2023-08-29 Thread Hawkins Jiawei
tch "vdpa: Restore receive-side scaling state" RFC v1: https://lore.kernel.org/all/cover.1691766252.git.yin31...@gmail.com/ Hawkins Jiawei (3): vdpa: Add SetSteeringEBPF method for NetClientState vdpa: Restore receive-side scaling state vdpa

[PATCH v2 2/2] vdpa: Allow VIRTIO_NET_F_HASH_REPORT in SVQ

2023-08-29 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_HASH_REPORT feature. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 139bb79468..b29f84f54c 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -118,6 +118,7

[PATCH v2 1/2] vdpa: Restore hash calculation state

2023-08-29 Thread Hawkins Jiawei
re is enabled in SVQ. Currently, vhost_vdpa_net_load_rss() could only be invoked when `do_rss` is set to false. Signed-off-by: Hawkins Jiawei --- Question: It seems that virtio_net_handle_rss() currently does not restore the hash key length parsed from the CVQ command sent from the guest into n->

[PATCH v2 0/2] Vhost-vdpa Shadow Virtqueue Hash calculation Support

2023-08-29 Thread Hawkins Jiawei
ernel.org/all/cover.1691762906.git.yin31...@gmail.com/#t Hawkins Jiawei (2): vdpa: Restore hash calculation state vdpa: Allow VIRTIO_NET_F_HASH_REPORT in SVQ net/vhost-vdpa.c | 92 1 file changed, 92 insertions(+) -- 2.25.1

[PATCH v4 3/8] vhost: Expose vhost_svq_available_slots()

2023-08-28 Thread Hawkins Jiawei
poses vhost_svq_available_slots() and introduces a helper function, allowing QEMU to know whether the SVQ is full. Signed-off-by: Hawkins Jiawei Acked-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 2 +- hw/virtio/vhost-shadow-virtqueue.h | 1 + net/vhost-vdpa.c

[PATCH v4 5/8] vdpa: Check device ack in vhost_vdpa_net_load_rx_mode()

2023-08-28 Thread Hawkins Jiawei
Considering that vhost_vdpa_net_load_rx_mode() is only called within vhost_vdpa_net_load_rx() now, this patch refactors vhost_vdpa_net_load_rx_mode() to include a check for the device's ack, simplifying the code and improving its maintainability. Signed-off-by: Hawkins Jiawei Acked-by: Eu

[PATCH v4 8/8] vdpa: Send cvq state load commands in parallel

2023-08-28 Thread Hawkins Jiawei
and checking of buffers until either the SVQ is full or control commands shadow buffers are full. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1578 Signed-off-by: Hawkins Jiawei --- v4: - refactor argument `cmds_in_flight` to `len` for vhost_vdpa_net_svq_full() - check the return

[PATCH v4 4/8] vdpa: Avoid using vhost_vdpa_net_load_*() outside vhost_vdpa_net_load()

2023-08-28 Thread Hawkins Jiawei
(), it is more elegant to send the CVQ commands directly without invoking vhost_vdpa_net_load_*() helpers. Signed-off-by: Hawkins Jiawei --- v4: - pack CVQ command by iov_from_buf() instead of accessing `out` directly suggested by Eugenio v3: https://lore.kernel.org/all

[PATCH v4 6/8] vdpa: Move vhost_svq_poll() to the caller of vhost_vdpa_net_cvq_add()

2023-08-28 Thread Hawkins Jiawei
commands shadow buffers are full. Signed-off-by: Hawkins Jiawei --- v4: - always check the return value of vhost_vdpa_net_svq_poll() suggested Eugenio v3: https://lore.kernel.org/all/152177c4e7082236fba9d31d535e40f8c2984349.1689748694.git.yin31...@gmail.com/ net/vhost-vdpa.c | 53

[PATCH v4 1/8] vhost: Add count argument to vhost_svq_poll()

2023-08-28 Thread Hawkins Jiawei
oring vhost_svq_poll() to accept a new argument `num`, which allows vhost_svq_poll() to wait for the device to use multiple elements, rather than polling for a single element. Signed-off-by: Hawkins Jiawei Acked-by: Eugenio Pérez --- v4: - refactor subject line suggested by Eugenio v3: https://lore.kerne

[PATCH v4 7/8] vdpa: Introduce cursors to vhost_vdpa_net_loadx()

2023-08-28 Thread Hawkins Jiawei
uffers, allowing QEMU to send CVQ state load commands in parallel at device startup. Signed-off-by: Hawkins Jiawei --- v4: - use `struct iovec` instead of `void **` as cursor suggested by Eugenio - add vhost_vdpa_net_load_cursor_reset() helper function to reset the cursors - re

[PATCH v4 0/8] vdpa: Send all CVQ state load commands in parallel

2023-08-28 Thread Hawkins Jiawei
for updating cursor - return directly when vhost_vdpa_net_load_{mac,mq}() returns a failure in vhost_vdpa_net_load() v1: https://lore.kernel.org/all/cover.1681732982.git.yin31...@gmail.com/ Hawkins Jiawei (8): vhost: Add count argument to vhost_svq_poll() vdpa: Use iovec for vhost_vdpa_net_cvq_add(

[PATCH v4 2/8] vdpa: Use iovec for vhost_vdpa_net_cvq_add()

2023-08-28 Thread Hawkins Jiawei
hieve this, this patch refactor vhost_vdpa_net_cvq_add() to accept `struct iovec`, which eliminates the coupling of control commands to `s->cvq_cmd_out_buffer` and `s->status`, allowing them to use their own buffer. Signed-off-by: Hawkins Jiawei --- v4: - split `in` to `vdpa_in` and `model_

Re: [PATCH v3 8/8] vdpa: Send cvq state load commands in parallel

2023-08-19 Thread Hawkins Jiawei
On 2023/8/19 01:27, Eugenio Perez Martin wrote: > On Wed, Jul 19, 2023 at 9:54 AM Hawkins Jiawei wrote: >> >> This patch enables sending CVQ state load commands >> in parallel at device startup by following steps: >> >>* Refactor vhost_vdpa_net_load_cmd()

Re: [PATCH v3 6/8] vdpa: Move vhost_svq_poll() to the caller of vhost_vdpa_net_cvq_add()

2023-08-19 Thread Hawkins Jiawei
On 2023/8/18 23:48, Eugenio Perez Martin wrote: > On Wed, Jul 19, 2023 at 9:54 AM Hawkins Jiawei wrote: >> >> This patch moves vhost_svq_poll() to the caller of >> vhost_vdpa_net_cvq_add() and introduces a helper funtion. >> >> By making this change, next pat

Re: [PATCH v3 4/8] vdpa: Avoid using vhost_vdpa_net_load_*() outside vhost_vdpa_net_load()

2023-08-19 Thread Hawkins Jiawei
On 2023/8/18 23:39, Eugenio Perez Martin wrote: > On Wed, Jul 19, 2023 at 9:54 AM Hawkins Jiawei wrote: >> >> Next patches in this series will refactor vhost_vdpa_net_load_cmd() >> to iterate through the control commands shadow buffers, allowing QEMU >> to send CVQ stat

Re: [PATCH v3 2/8] vdpa: Use iovec for vhost_vdpa_net_cvq_add()

2023-08-19 Thread Hawkins Jiawei
On 2023/8/18 23:23, Eugenio Perez Martin wrote: > On Wed, Jul 19, 2023 at 9:54 AM Hawkins Jiawei wrote: >> >> Next patches in this series will no longer perform an >> immediate poll and check of the device's used buffers >> for each CVQ state load command. Consequ

Re: [PATCH v3 1/8] vhost: Add argument to vhost_svq_poll()

2023-08-19 Thread Hawkins Jiawei
On 2023/8/18 23:08, Eugenio Perez Martin wrote: > On Wed, Jul 19, 2023 at 9:54 AM Hawkins Jiawei wrote: >> > > The subject could be more explicit. What about "add count argument to > vhost_svq_poll"? Hi Eugenio, Thanks for reviewing. You are right, I will use this

Re: [PATCH v3 1/7] vdpa: Use iovec for vhost_vdpa_net_load_cmd()

2023-08-17 Thread Hawkins Jiawei
在 2023/8/17 22:05, Eugenio Perez Martin 写道: > On Thu, Aug 17, 2023 at 2:42 PM Hawkins Jiawei wrote: >> >> On 2023/8/17 17:23, Eugenio Perez Martin wrote: >>> On Fri, Jul 7, 2023 at 5:27 PM Hawkins Jiawei wrote: >>>> >>>> According to V

Re: [PATCH v3 2/7] vdpa: Restore MAC address filtering state

2023-08-17 Thread Hawkins Jiawei
On 2023/8/17 18:18, Eugenio Perez Martin wrote: > On Fri, Jul 7, 2023 at 5:27 PM Hawkins Jiawei wrote: >> >> This patch refactors vhost_vdpa_net_load_mac() to >> restore the MAC address filtering state at device's startup. >> >> Signed-off-by: Hawkins Jiawei

Re: [PATCH v3 1/7] vdpa: Use iovec for vhost_vdpa_net_load_cmd()

2023-08-17 Thread Hawkins Jiawei
On 2023/8/17 17:23, Eugenio Perez Martin wrote: > On Fri, Jul 7, 2023 at 5:27 PM Hawkins Jiawei wrote: >> >> According to VirtIO standard, "The driver MUST follow >> the VIRTIO_NET_CTRL_MAC_TABLE_SET command by a le32 number, >> followed by that number of non-mult

[RFC PATCH v2 0/3] Vhost-vdpa Shadow Virtqueue RSS Support

2023-08-13 Thread Hawkins Jiawei
monitor - Result * with this series, L2 QEMU can execute without triggering any error or warning. L0 QEMU echo "Can't load eBPF RSS - fallback to software RSS". Hawkins Jiawei (3): vdpa: Add SetSteeringEBPF method for NetClientState vdpa: Restore receive-side scaling stat

[RFC PATCH v2 3/3] vdpa: Allow VIRTIO_NET_F_RSS in SVQ

2023-08-13 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_RSS feature. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index e21b3ac67a..2a276ef528 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -119,6 +119,7 @@ static const

[RFC PATCH v2 1/3] vdpa: Add SetSteeringEBPF method for NetClientState

2023-08-13 Thread Hawkins Jiawei
code maintainbility. Suggested-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 8 1 file changed, 8 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index a13b267250..4c8e4b19f6 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -238,6 +238,12

[RFC PATCH v2 2/3] vdpa: Restore receive-side scaling state

2023-08-13 Thread Hawkins Jiawei
This patch reuses vhost_vdpa_net_load_rss() with some refactorings to restore the receive-side scaling state at device's startup. Signed-off-by: Hawkins Jiawei --- v2: - Correct the feature usage to VIRTIO_NET_F_HASH_REPORT when loading the hash calculation state v1: https://lore.kerne

Re: [RFC PATCH 2/3] vdpa: Restore receive-side scaling state

2023-08-13 Thread Hawkins Jiawei
On 2023/8/11 23:28, Hawkins Jiawei wrote: > This patch reuses vhost_vdpa_net_load_rss() with some > refactorings to restore the receive-side scaling state > at device's startup. > > Signed-off-by: Hawkins Jiawei > --- &g

[RFC PATCH 3/3] vdpa: Allow VIRTIO_NET_F_RSS in SVQ

2023-08-11 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_RSS feature. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 7870cbe142..eb08530396 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -119,6 +119,7 @@ static const

[RFC PATCH 2/3] vdpa: Restore receive-side scaling state

2023-08-11 Thread Hawkins Jiawei
This patch reuses vhost_vdpa_net_load_rss() with some refactorings to restore the receive-side scaling state at device's startup. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 53 1 file changed, 35 insertions(+), 18 deletions(-)

[RFC PATCH 0/3] Vhost-vdpa Shadow Virtqueue RSS Support

2023-08-11 Thread Hawkins Jiawei
- Execute the live migration in L2 source monitor - Result * with this series, L2 QEMU can execute without triggering any error or warning. L0 QEMU echo "Can't load eBPF RSS - fallback to software RSS". Hawkins Jiawei (3): vdpa: Add SetSteeringEBPF method for NetClientStat

[RFC PATCH 1/3] vdpa: Add SetSteeringEBPF method for NetClientState

2023-08-11 Thread Hawkins Jiawei
code maintainbility. Suggested-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 8 1 file changed, 8 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index a13b267250..4c8e4b19f6 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -238,6 +238,12

[RFC PATCH 2/2] vdpa: Allow VIRTIO_NET_F_HASH_REPORT in SVQ

2023-08-11 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_HASH_REPORT feature. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index bd51020771..a13b267250 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -118,6 +118,7

[RFC PATCH 1/2] vdpa: Restore hash calculation state

2023-08-11 Thread Hawkins Jiawei
re is enabled in SVQ. Currently, vhost_vdpa_net_load_rss() could only be invoked when `do_rss` is set to false. Signed-off-by: Hawkins Jiawei --- Question: It seems that virtio_net_handle_rss() currently does not restore the hash key length parsed from the CVQ command sent from the guest into n->

[RFC PATCH 0/2] Vhost-vdpa Shadow Virtqueue Hash calculation Support

2023-08-11 Thread Hawkins Jiawei
or warning. Hawkins Jiawei (2): vdpa: Restore hash calculation state vdpa: Allow VIRTIO_NET_F_HASH_REPORT in SVQ net/vhost-vdpa.c | 89 1 file changed, 89 insertions(+) -- 2.25.1

Re: [PATCH v3 0/3] vdpa: Return -EIO if device ack is VIRTIO_NET_ERR

2023-08-05 Thread Hawkins Jiawei
On 2023/8/5 14:15, Michael Tokarev wrote: > 04.07.2023 06:34, Hawkins Jiawei wrote: >> According to VirtIO standard, "The class, command and >> command-specific-data are set by the driver, >> and the device sets the ack byte. >> There is little it can do except iss

Re: [PATCH v2 3/4] vdpa: Restore vlan filtering state

2023-07-25 Thread Hawkins Jiawei
On 2023/7/25 14:47, Jason Wang wrote: > On Sun, Jul 23, 2023 at 5:28 PM Hawkins Jiawei wrote: >> >> This patch introduces vhost_vdpa_net_load_single_vlan() >> and vhost_vdpa_net_load_vlan() to restore the vlan >> filtering state at device's startup. >> >&g

[PATCH v3 2/4] virtio-net: Expose MAX_VLAN

2023-07-23 Thread Hawkins Jiawei
vhost-vdpa shadowed CVQ needs to know the maximum number of vlans supported by the virtio-net device, so QEMU can restore the VLAN state in a migration. Co-developed-by: Eugenio Pérez Signed-off-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- hw/net/virtio-net.c| 2 -- include

[PATCH v3 3/4] vdpa: Restore vlan filtering state

2023-07-23 Thread Hawkins Jiawei
This patch introduces vhost_vdpa_net_load_single_vlan() and vhost_vdpa_net_load_vlan() to restore the vlan filtering state at device's startup. Co-developed-by: Eugenio Pérez Signed-off-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- v2: - remove the extra line pointed out by Eugeni

[PATCH v3 4/4] vdpa: Allow VIRTIO_NET_F_CTRL_VLAN in SVQ

2023-07-23 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_CTRL_VLAN feature. Co-developed-by: Eugenio Pérez Signed-off-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 347241796d..73e9063fa0 100644 --- a/net

[PATCH v3 1/4] virtio-net: do not reset vlan filtering at set_features

2023-07-23 Thread Hawkins Jiawei
t;) Signed-off-by: Eugenio Pérez Reviewed-by: Hawkins Jiawei Signed-off-by: Hawkins Jiawei --- v3: - remove the extra "From" line v2: https://lore.kernel.org/all/95af0d013281282f48ad3f47f6ad1ac4ca9e52eb.1690100802.git.yin31...@gmail.com/ hw/net/virtio-net.c | 4 +--- 1 file change

[PATCH v3 0/4] Vhost-vdpa Shadow Virtqueue VLAN support

2023-07-23 Thread Hawkins Jiawei
rtio-net: do not reset vlan filtering at set_features Hawkins Jiawei (3): virtio-net: Expose MAX_VLAN vdpa: Restore vlan filtering state vdpa: Allow VIRTIO_NET_F_CTRL_VLAN in SVQ hw/net/virtio-net.c| 6 + include/hw/virtio/virtio-net.h | 6 + net/vhost-vdpa.c |

Re: [PATCH v2 1/4] virtio-net: do not reset vlan filtering at set_features

2023-07-23 Thread Hawkins Jiawei
On 2023/7/23 17:26, Hawkins Jiawei wrote: > From: Eugenio Pérez There was a wrong "From" line by mistake, I will send the v3 patch to fix this. Thanks! > > This function is called after virtio_load, so all vlan configuration is > lost in migration case. > > Ju

[PATCH v2 3/4] vdpa: Restore vlan filtering state

2023-07-23 Thread Hawkins Jiawei
This patch introduces vhost_vdpa_net_load_single_vlan() and vhost_vdpa_net_load_vlan() to restore the vlan filtering state at device's startup. Co-developed-by: Eugenio Pérez Signed-off-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- v2: - remove the extra line pointed out by Eugeni

[PATCH v2 4/4] vdpa: Allow VIRTIO_NET_F_CTRL_VLAN in SVQ

2023-07-23 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_CTRL_VLAN feature. Co-developed-by: Eugenio Pérez Signed-off-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 347241796d..73e9063fa0 100644 --- a/net

[PATCH v2 1/4] virtio-net: do not reset vlan filtering at set_features

2023-07-23 Thread Hawkins Jiawei
thout F_CTRL_VLAN") Signed-off-by: Eugenio Pérez Reviewed-by: Hawkins Jiawei Signed-off-by: Hawkins Jiawei --- hw/net/virtio-net.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 7102ec4817..d20d5a63cd 100644 --- a/hw/

[PATCH v2 2/4] virtio-net: Expose MAX_VLAN

2023-07-23 Thread Hawkins Jiawei
vhost-vdpa shadowed CVQ needs to know the maximum number of vlans supported by the virtio-net device, so QEMU can restore the VLAN state in a migration. Co-developed-by: Eugenio Pérez Signed-off-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- hw/net/virtio-net.c| 2 -- include

[PATCH v2 0/4] Vhost-vdpa Shadow Virtqueue VLAN support

2023-07-23 Thread Hawkins Jiawei
int and continue the executing without triggering any error or warning. Eugenio Pérez (1): virtio-net: do not reset vlan filtering at set_features Hawkins Jiawei (3): virtio-net: Expose MAX_VLAN vdpa: Restore vlan filtering state vdpa: Allow VIRTIO_NET_F_CTRL_VLAN in SVQ hw/net/virtio-n

Re: [PATCH 3/4] vdpa: Restore vlan filtering state

2023-07-21 Thread Hawkins Jiawei
On 2023/7/21 19:57, Eugenio Perez Martin wrote: > On Wed, Jul 19, 2023 at 9:48 AM Hawkins Jiawei wrote: >> >> This patch introduces vhost_vdpa_net_load_single_vlan() >> and vhost_vdpa_net_load_vlan() to restore the vlan >> filtering state at device's startup. >

Re: [PATCH v3 0/8] vdpa: Send all CVQ state load commands in parallel

2023-07-20 Thread Hawkins Jiawei
20, 2023 at 6:54 AM Lei Yang wrote: >> >> On Wed, Jul 19, 2023 at 11:25 PM Hawkins Jiawei wrote: >>> >>> 在 2023/7/19 20:44, Lei Yang 写道: >>>> Hello Hawkins and Michael >>>> >>>> Looks like there are big changes about vp_vdpa, therefor

Re: [PATCH v3 0/8] vdpa: Send all CVQ state load commands in parallel

2023-07-19 Thread Hawkins Jiawei
> Lei > > > On Wed, Jul 19, 2023 at 8:37 PM Hawkins Jiawei wrote: >> >> 在 2023/7/19 17:11, Michael S. Tsirkin 写道: >>> On Wed, Jul 19, 2023 at 03:53:45PM +0800, Hawkins Jiawei wrote: >>>> This patchset allows QEMU to delay polling and checking the device &

Re: [PATCH v3 0/8] vdpa: Send all CVQ state load commands in parallel

2023-07-19 Thread Hawkins Jiawei
在 2023/7/19 20:46, Michael S. Tsirkin 写道: > On Wed, Jul 19, 2023 at 08:35:50PM +0800, Hawkins Jiawei wrote: >> 在 2023/7/19 17:11, Michael S. Tsirkin 写道: >>> On Wed, Jul 19, 2023 at 03:53:45PM +0800, Hawkins Jiawei wrote: >>>> This patchset allows QEMU to delay p

Re: [PATCH v3 0/8] vdpa: Send all CVQ state load commands in parallel

2023-07-19 Thread Hawkins Jiawei
在 2023/7/19 17:11, Michael S. Tsirkin 写道: > On Wed, Jul 19, 2023 at 03:53:45PM +0800, Hawkins Jiawei wrote: >> This patchset allows QEMU to delay polling and checking the device >> used buffer until either the SVQ is full or control commands shadow >> buffers are full, i

Re: [PATCH 0/4] Vhost-vdpa Shadow Virtqueue VLAN support

2023-07-19 Thread Hawkins Jiawei
在 2023/7/19 15:47, Hawkins Jiawei 写道: > This series enables shadowed CVQ to intercept VLAN commands > through shadowed CVQ, update the virtio NIC device model > so qemu send it in a migration, and the restore of that > VLAN state in the destination. This patch series is based on

[PATCH v3 7/8] vdpa: Add cursors to vhost_vdpa_net_loadx()

2023-07-19 Thread Hawkins Jiawei
device startup. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 79 ++-- 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index d06f38403f..795c9c1fd2 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost

[PATCH v3 5/8] vdpa: Check device ack in vhost_vdpa_net_load_rx_mode()

2023-07-19 Thread Hawkins Jiawei
Considering that vhost_vdpa_net_load_rx_mode() is only called within vhost_vdpa_net_load_rx() now, this patch refactors vhost_vdpa_net_load_rx_mode() to include a check for the device's ack, simplifying the code and improving its maintainability. Signed-off-by: Hawkins Jiawei --- net/

[PATCH v3 6/8] vdpa: Move vhost_svq_poll() to the caller of vhost_vdpa_net_cvq_add()

2023-07-19 Thread Hawkins Jiawei
commands shadow buffers are full. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 50 ++-- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index fe0ba19724..d06f38403f 100644 --- a/net/vhost-vdpa.c

[PATCH v3 3/8] vhost: Expose vhost_svq_available_slots()

2023-07-19 Thread Hawkins Jiawei
poses vhost_svq_available_slots() and introduces a helper function, allowing QEMU to know whether the SVQ is full. Signed-off-by: Hawkins Jiawei --- hw/virtio/vhost-shadow-virtqueue.c | 2 +- hw/virtio/vhost-shadow-virtqueue.h | 1 + net/vhost-vdpa.c | 9 + 3 files change

[PATCH v3 8/8] vdpa: Send cvq state load commands in parallel

2023-07-19 Thread Hawkins Jiawei
and checking of buffers until either the SVQ is full or control commands shadow buffers are full. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1578 Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 157 +-- 1 file changed, 96 insertions

[PATCH v3 4/8] vdpa: Avoid using vhost_vdpa_net_load_*() outside vhost_vdpa_net_load()

2023-07-19 Thread Hawkins Jiawei
(), it is more elegant to send the CVQ commands directly without invoking vhost_vdpa_net_load_*() helpers. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index dd71008e08

[PATCH v3 2/8] vdpa: Use iovec for vhost_vdpa_net_cvq_add()

2023-07-19 Thread Hawkins Jiawei
hieve this, this patch refactor vhost_vdpa_net_cvq_add() to accept `struct iovec`, which eliminates the coupling of control commands to `s->cvq_cmd_out_buffer` and `s->status`, allowing them to use their own buffer. Signed-off-by: Hawkins Jiawei --- net/vhost-

[PATCH v3 1/8] vhost: Add argument to vhost_svq_poll()

2023-07-19 Thread Hawkins Jiawei
oring vhost_svq_poll() to accept a new argument `num`, which allows vhost_svq_poll() to wait for the device to use multiple elements, rather than polling for a single element. Signed-off-by: Hawkins Jiawei --- hw/virtio/vhost-shadow-virtqueue.c | 36 ++ hw/virtio/vhost-s

[PATCH v3 0/8] vdpa: Send all CVQ state load commands in parallel

2023-07-19 Thread Hawkins Jiawei
nge the type of `in_cursor`, and refactor the code for updating cursor - return directly when vhost_vdpa_net_load_{mac,mq}() returns a failure in vhost_vdpa_net_load() v1: https://lore.kernel.org/all/cover.1681732982.git.yin31...@gmail.com/ Hawkins Jiawei (8): vhost: Add argument to vhost_svq

[PATCH 2/4] virtio-net: Expose MAX_VLAN

2023-07-19 Thread Hawkins Jiawei
vhost-vdpa shadowed CVQ needs to know the maximum number of vlans supported by the virtio-net device, so QEMU can restore the VLAN state in a migration. Co-developed-by: Eugenio Pérez Signed-off-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- hw/net/virtio-net.c| 2 -- include

[PATCH 1/4] virtio-net: do not reset vlan filtering at set_features

2023-07-19 Thread Hawkins Jiawei
thout F_CTRL_VLAN") Signed-off-by: Eugenio Pérez Reviewed-by: Hawkins Jiawei Signed-off-by: Hawkins Jiawei --- hw/net/virtio-net.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 7102ec4817..d20d5a63cd 100644 --- a/hw/

[PATCH 3/4] vdpa: Restore vlan filtering state

2023-07-19 Thread Hawkins Jiawei
This patch introduces vhost_vdpa_net_load_single_vlan() and vhost_vdpa_net_load_vlan() to restore the vlan filtering state at device's startup. Co-developed-by: Eugenio Pérez Signed-off-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c

[PATCH 0/4] Vhost-vdpa Shadow Virtqueue VLAN support

2023-07-19 Thread Hawkins Jiawei
``` - Execute the live migration in L2 source monitor - Result * with this series, gdb can hit the breakpoint and continue the executing without triggering any error or warning. Eugenio Pérez (1): virtio-net: do not reset vlan filtering at set_features Hawkins Jiawei (3): virtio-net

[PATCH 4/4] vdpa: Allow VIRTIO_NET_F_CTRL_VLAN in SVQ

2023-07-19 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_CTRL_VLAN feature. Co-developed-by: Eugenio Pérez Signed-off-by: Eugenio Pérez Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 0787dd933b..dfd271c456 100644 --- a/net

Re: [PATCH] vdpa: Increase out buffer size for CVQ commands

2023-07-12 Thread Hawkins Jiawei
在 2023/7/12 18:45, Michael Tokarev 写道: > 11.07.2023 04:48, Hawkins Jiawei wrote: > .. >> Sorry for not mentioning that I have moved the patch to the patch series >> titled "Vhost-vdpa Shadow Virtqueue _F_CTRL_RX commands support" at [1]. >> The reason for thi

  1   2   3   >