[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v1 3/4] vhost-vdpa: implement vhost-vdpa backend
From: |
Cindy Lu |
Subject: |
Re: [RFC v1 3/4] vhost-vdpa: implement vhost-vdpa backend |
Date: |
Wed, 22 Apr 2020 17:24:25 +0800 |
On Tue, Apr 21, 2020 at 11:54 PM Laurent Vivier <address@hidden> wrote:
>
> On 20/04/2020 11:32, Cindy Lu wrote:
> > Currently we have 2 types of vhost backends in QEMU: vhost kernel and
> > vhost-user. The above patch provides a generic device for vDPA purpose,
> > this vDPA device exposes to user space a non-vendor-specific configuration
> > interface for setting up a vhost HW accelerator, this patch set introduces
> > a third vhost backend called vhost-vdpa based on the vDPA interface.
> >
> > Vhost-vdpa usage:
> >
> > qemu-system-x86_64 -cpu host -enable-kvm \
> > ......
> > -netdev type=vhost-vdpa,vhostdev=/dev/vhost-vdpa-id,id=vhost-vdpa0 \
> > -device virtio-net-pci,netdev=vhost-vdpa0,page-per-vq=on \
> >
> > Author: Tiwei Bie
>
> Use "git commit --author" to set that.
Thanks, I will fix this
> > Signed-off-by: Cindy Lu <address@hidden>
> > ---
> > hw/net/vhost_net.c | 43 ++++
> > hw/net/virtio-net.c | 9 +
> > hw/virtio/Makefile.objs | 2 +-
> > hw/virtio/vhost-backend.c | 3 +
> > hw/virtio/vhost-vdpa.c | 379 ++++++++++++++++++++++++++++++
> > hw/virtio/vhost.c | 5 +
> > include/hw/virtio/vhost-backend.h | 6 +-
> > include/hw/virtio/vhost-vdpa.h | 14 ++
> > 8 files changed, 459 insertions(+), 2 deletions(-)
> > create mode 100644 hw/virtio/vhost-vdpa.c
> > create mode 100644 include/hw/virtio/vhost-vdpa.h
> >
> > diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
> > index 4096d64aaf..0d13fda2fc 100644
> > --- a/hw/net/vhost_net.c
> > +++ b/hw/net/vhost_net.c
> ...
> > @@ -434,6 +462,10 @@ VHostNetState *get_vhost_net(NetClientState *nc)
> > assert(vhost_net);
> > break;
> > #endif
> > + case NET_CLIENT_DRIVER_VHOST_VDPA:
> > + vhost_net = vhost_vdpa_get_vhost_net(nc);
> > + assert(vhost_net);
> > + break;
>
> This should be inside a "#ifdef".
>
Thanks Laurent, I will add a new macro for vDPA
> Thanks,
> Laurent
>
[RFC v1 3/4] vhost-vdpa: implement vhost-vdpa backend, Cindy Lu, 2020/04/20
[RFC v1 1/4] net: Introduce qemu_get_peer, Cindy Lu, 2020/04/20
[RFC v1 4/4] vhost: introduce vhost_set_vring_ready method, Cindy Lu, 2020/04/20
Re: [RFC v1 0/4] vDPA support in qemu, Jason Wang, 2020/04/21
Re: [RFC v1 0/4] vDPA support in qemu, Jason Wang, 2020/04/21