[PATCH v2 0/6] Vhost-vdpa Shadow Virtqueue Offloads support

Hawkins Jiawei posted 6 patches 10 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1685584543.git.yin31149@gmail.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>
There is a newer version of this series
hw/net/virtio-net.c            |  2 +-
include/hw/virtio/virtio-net.h |  1 +
include/hw/virtio/virtio.h     |  2 +-
net/vhost-vdpa.c               | 45 +++++++++++++++++++++++++++++++---
4 files changed, 44 insertions(+), 6 deletions(-)
[PATCH v2 0/6] Vhost-vdpa Shadow Virtqueue Offloads support
Posted by Hawkins Jiawei 10 months, 4 weeks ago
This series enables shadowed CVQ to intercept Offloads commands
through shadowed CVQ, update the virtio NIC device model so qemu
send it in a migration, and the restore of that Offloads state
in the destination.

Changelog
=========
v2:
  - make some function arguments const
  - reuse virtio_vdev_has_feature() suggested by Eugenio and Jason
  - avoid sending CVQ command in default state suggested by Eugenio

v1: https://lore.kernel.org/all/cover.1685359572.git.yin31149@gmail.com/

Hawkins Jiawei (6):
  include/hw/virtio: make some VirtIODevice const
  vdpa: reuse virtio_vdev_has_feature()
  hw/net/virtio-net: make some VirtIONet const
  virtio-net: expose virtio_net_supported_guest_offloads()
  vdpa: Add vhost_vdpa_net_load_offloads()
  vdpa: Allow VIRTIO_NET_F_CTRL_GUEST_OFFLOADS in SVQ

 hw/net/virtio-net.c            |  2 +-
 include/hw/virtio/virtio-net.h |  1 +
 include/hw/virtio/virtio.h     |  2 +-
 net/vhost-vdpa.c               | 45 +++++++++++++++++++++++++++++++---
 4 files changed, 44 insertions(+), 6 deletions(-)

-- 
2.25.1
Re: [PATCH v2 0/6] Vhost-vdpa Shadow Virtqueue Offloads support
Posted by Lei Yang 10 months, 4 weeks ago
I'm a QE responsible for vhost_vdpa parts. Could you please provide me
with the test steps for this series? I can test it in my environment
and update the test results.





On Thu, Jun 1, 2023 at 4:29 PM Hawkins Jiawei <yin31149@gmail.com> wrote:
>
> This series enables shadowed CVQ to intercept Offloads commands
> through shadowed CVQ, update the virtio NIC device model so qemu
> send it in a migration, and the restore of that Offloads state
> in the destination.
>
> Changelog
> =========
> v2:
>   - make some function arguments const
>   - reuse virtio_vdev_has_feature() suggested by Eugenio and Jason
>   - avoid sending CVQ command in default state suggested by Eugenio
>
> v1: https://lore.kernel.org/all/cover.1685359572.git.yin31149@gmail.com/
>
> Hawkins Jiawei (6):
>   include/hw/virtio: make some VirtIODevice const
>   vdpa: reuse virtio_vdev_has_feature()
>   hw/net/virtio-net: make some VirtIONet const
>   virtio-net: expose virtio_net_supported_guest_offloads()
>   vdpa: Add vhost_vdpa_net_load_offloads()
>   vdpa: Allow VIRTIO_NET_F_CTRL_GUEST_OFFLOADS in SVQ
>
>  hw/net/virtio-net.c            |  2 +-
>  include/hw/virtio/virtio-net.h |  1 +
>  include/hw/virtio/virtio.h     |  2 +-
>  net/vhost-vdpa.c               | 45 +++++++++++++++++++++++++++++++---
>  4 files changed, 44 insertions(+), 6 deletions(-)
>
> --
> 2.25.1
>
>
Re: [PATCH v2 0/6] Vhost-vdpa Shadow Virtqueue Offloads support
Posted by Hawkins Jiawei 10 months, 4 weeks ago
On 2023/6/1 17:56, Lei Yang wrote:
> I'm a QE responsible for vhost_vdpa parts. Could you please provide me
> with the test steps for this series? I can test it in my environment
> and update the test results.
>

Hi Lei,

I am not sure if these are enough, but you can test it like this:

1. you can merge these patches into the latest master branch and compile the
source. It should not trigger any error or warning.

2. start QEMU with the vdpa device and enable the ctrl_guest_offloads
feature on. The command line should like the following:
        -netdev type=vhost-vdpa,id=vdpa0,vhostdev=/dev/vhost-vdpa-0,x-svq=true \
        -device virtio-net-pci,netdev=vdpa0,ctrl_guest_offloads=on,...

It should also not trigger any error or warning. Without this series,
QEMU should fail with "vdpa svq does not work with features 4" error.

Regarding migration, it seems that testing it is not feasible at the
moment due to the migration blocker.

And you can test on my v3 patch, I will send the v3 patch to the mailing
lists later.

Thank you for your efforts!


>
>
>
>
> On Thu, Jun 1, 2023 at 4:29 PM Hawkins Jiawei <yin31149@gmail.com> wrote:
>>
>> This series enables shadowed CVQ to intercept Offloads commands
>> through shadowed CVQ, update the virtio NIC device model so qemu
>> send it in a migration, and the restore of that Offloads state
>> in the destination.
>>
>> Changelog
>> =========
>> v2:
>>    - make some function arguments const
>>    - reuse virtio_vdev_has_feature() suggested by Eugenio and Jason
>>    - avoid sending CVQ command in default state suggested by Eugenio
>>
>> v1: https://lore.kernel.org/all/cover.1685359572.git.yin31149@gmail.com/
>>
>> Hawkins Jiawei (6):
>>    include/hw/virtio: make some VirtIODevice const
>>    vdpa: reuse virtio_vdev_has_feature()
>>    hw/net/virtio-net: make some VirtIONet const
>>    virtio-net: expose virtio_net_supported_guest_offloads()
>>    vdpa: Add vhost_vdpa_net_load_offloads()
>>    vdpa: Allow VIRTIO_NET_F_CTRL_GUEST_OFFLOADS in SVQ
>>
>>   hw/net/virtio-net.c            |  2 +-
>>   include/hw/virtio/virtio-net.h |  1 +
>>   include/hw/virtio/virtio.h     |  2 +-
>>   net/vhost-vdpa.c               | 45 +++++++++++++++++++++++++++++++---
>>   4 files changed, 44 insertions(+), 6 deletions(-)
>>
>> --
>> 2.25.1
>>
>>
>