[PATCH v3 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.1685623090.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 v3 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
=========
v3:
  - refactor the commit message in patch
"virtio-net: expose virtio_net_supported_guest_offloads()"

v2: https://lists.nongnu.org/archive/html/qemu-devel/2023-06/msg00044.html

v1: https://lists.nongnu.org/archive/html/qemu-devel/2023-05/msg07198.html

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 v3 0/6] Vhost-vdpa Shadow Virtqueue Offloads support
Posted by Lei Yang 10 months, 4 weeks ago
Hello Hawkins

QE based on the qemu command line [1] to test this series with the
following scenarios: reboot,shutdown,hotplug/unplug,ping, and
offloads(tx,sg,tso,gso,gro), everything is working fine. It's just
that even without applying your patch to test offload there is no
error like "vdpa svq is not available for feature 4".

[1] -device '{"driver": "virtio-net-pci", "mac": "00:11:22:33:44:00",
"id": "net0", "netdev": "hostnet0", "ctrl_guest_offloads": true,
"bus": "pcie-root-port-3", "addr": "0x0"}'  \
-netdev vhost-vdpa,id=hostnet0,vhostdev=/dev/vhost-vdpa-0,x-svq=on \

Tested-by: Lei Yang <leiyang@redhat.com>




On Thu, Jun 1, 2023 at 9:49 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
> =========
> v3:
>   - refactor the commit message in patch
> "virtio-net: expose virtio_net_supported_guest_offloads()"
>
> v2: https://lists.nongnu.org/archive/html/qemu-devel/2023-06/msg00044.html
>
> v1: https://lists.nongnu.org/archive/html/qemu-devel/2023-05/msg07198.html
>
> 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 v3 0/6] Vhost-vdpa Shadow Virtqueue Offloads support
Posted by Hawkins Jiawei 10 months, 4 weeks ago
On Fri, 2 Jun 2023 at 19:26, Lei Yang <leiyang@redhat.com> wrote:
>
> Hello Hawkins
>
> QE based on the qemu command line [1] to test this series with the
> following scenarios: reboot,shutdown,hotplug/unplug,ping, and
> offloads(tx,sg,tso,gso,gro), everything is working fine. It's just
> that even without applying your patch to test offload there is no
> error like "vdpa svq is not available for feature 4".
>
> [1] -device '{"driver": "virtio-net-pci", "mac": "00:11:22:33:44:00",
> "id": "net0", "netdev": "hostnet0", "ctrl_guest_offloads": true,
> "bus": "pcie-root-port-3", "addr": "0x0"}'  \
> -netdev vhost-vdpa,id=hostnet0,vhostdev=/dev/vhost-vdpa-0,x-svq=on \

Hi Lei,

Thanks for your efforts.

However, I noticed a small correction. In the argument '-netdev',
the value of member 'x-svq' should be 'true' instead of 'on'.

I have tested these patches using a vp-vdpa device, and without them,
I encountered an error "vpda svq is not available for feature 4" while
trying to start QEMU. With these patches applied, everything works
perfectly.

Thanks!

>
> Tested-by: Lei Yang <leiyang@redhat.com>
>
>
>
>
> On Thu, Jun 1, 2023 at 9:49 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
> > =========
> > v3:
> >   - refactor the commit message in patch
> > "virtio-net: expose virtio_net_supported_guest_offloads()"
> >
> > v2: https://lists.nongnu.org/archive/html/qemu-devel/2023-06/msg00044.html
> >
> > v1: https://lists.nongnu.org/archive/html/qemu-devel/2023-05/msg07198.html
> >
> > 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
> >
> >
>