[PATCH v3 04/13] virtio-pci: implement queue_enabled method

2020-07-01 Thread Cindy Lu
From: Jason Wang With version 1, we can detect whether a queue is enabled via queue_enabled. Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index

[PATCH v3 05/13] vhost: check the existence of vhost_set_iotlb_callback

2020-07-01 Thread Cindy Lu
From: Jason Wang Add the check of vhost_set_iotlb_callback before calling Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 5fd25fe520..10304b583e

[PATCH v3 03/13] virtio-bus: introduce queue_enabled method

2020-07-01 Thread Cindy Lu
From: Jason Wang This patch introduces queue_enabled() method which allows the transport to implement its own way to report whether or not a queue is enabled. Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/virtio.c | 6 ++ include/hw/virtio/virtio-bus.h | 4

[PATCH v3 02/13] vhost_net: use the function qemu_get_peer

2020-07-01 Thread Cindy Lu
user the qemu_get_peer to replace the old process Signed-off-by: Cindy Lu Reviewed-by: Laurent Vivier --- hw/net/vhost_net.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 6b82803fa7..4096d64aaf 100644

[PATCH v3 01/13] net: introduce qemu_get_peer

2020-07-01 Thread Cindy Lu
This is a small function that can get the peer from given NetClientState and queue_index Signed-off-by: Cindy Lu --- include/net/net.h | 1 + net/net.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 39085d9444..e7ef42d62b 100644

[PATCH v3 00/13] vDPA support in qemu

2020-07-01 Thread Cindy Lu
PATCHV2 Change from v2 fix the complie problem separate the patch of vhost_force_iommu other comments form last version github address: https://github.com/lulu-github-name/qemutmp.git PATCHV3 Cindy Lu (10): net: introduce qemu_get_peer vhost_net: use the function qemu_get_peer vhost: introduce

Re: [PATCH v2 11/12] vhost-vdpa: introduce vhost-vdpa backend

2020-07-01 Thread Cindy Lu
Thanks Jason, will fix all these and send the new version soon On Wed, Jul 1, 2020 at 12:22 PM Jason Wang wrote: > > > On 2020/7/1 上午1:49, Cindy Lu wrote: > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > vhost-user. The above patch provides a ge

Re: [PATCH v2 00/12] vDPA support in qemu

2020-06-30 Thread Cindy Lu
Thanks Jason, I'm working in this, Will update a new version soon On Wed, Jul 1, 2020 at 1:29 PM Jason Wang wrote: > > > On 2020/7/1 上午2:06, no-re...@patchew.org wrote: > > Patchew URL: > > https://patchew.org/QEMU/20200630174937.25560-1-l...@redhat.com/ > > > > > > > > Hi, > > > > This series

[PATCH v2 12/12] vhost-vdpa: introduce vhost-vdpa net client

2020-06-30 Thread Cindy Lu
This patch set introduces a new net client type: vhost-vdpa. vhost-vdpa net client will set up a vDPA device which is specified by a "vhostdev" parameter. Signed-off-by: Lingshan Zhu Signed-off-by: Tiwei Bie Signed-off-by: Cindy Lu --- include/net/vhost-vdpa.h | 22 net/Mak

[PATCH v2 11/12] vhost-vdpa: introduce vhost-vdpa backend

2020-06-30 Thread Cindy Lu
zhu Signed-off-by: Tiwei Bie Signed-off-by: Cindy Lu --- configure | 21 ++ docs/interop/index.rst| 1 + docs/interop/vhost-vdpa.rst | 17 ++ hw/net/vhost_net.c| 19 +- hw/net/virtio-net.c | 22 +- hw/virtio

[PATCH v2 10/12] vhost: introduce new VhostOps vhost_get_device_id

2020-06-30 Thread Cindy Lu
This patch introduces new VhostOps vhost_get_device_id callback which can get the device id from backend Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 4 1 file changed, 4 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h

[PATCH v2 09/12] vhost: implement vhost_vq_get_addr method

2020-06-30 Thread Cindy Lu
use vhost_vq_get_addr callback to get the vq address from backend Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 32809e54b5..1e083a8976 100644 --- a/hw

[PATCH v2 07/12] vhost: implement vhost_dev_start method

2020-06-30 Thread Cindy Lu
use the vhost_dev_start callback to send the status to backend Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 10304b583e..32809e54b5 100644 --- a/hw/virtio/vhost.c +++ b/hw

[PATCH v2 05/12] vhost: check the existence of vhost_set_iotlb_callback

2020-06-30 Thread Cindy Lu
From: Jason Wang Add the check of vhost_set_iotlb_callback before calling Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 5fd25fe520..10304b583e

[PATCH v2 08/12] vhost: introduce new VhostOps vhost_vq_get_addr

2020-06-30 Thread Cindy Lu
This patch introduces new VhostOps vhost_vq_get_addr_op callback to get the vring addr from the backend Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h

[PATCH v2 06/12] vhost: introduce new VhostOps vhost_dev_start

2020-06-30 Thread Cindy Lu
This patch introduces new VhostOps vhost_dev_start callback which allows the vhost_net set the start/stop status to backend Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio

[PATCH v2 03/12] virtio-bus: introduce queue_enabled method

2020-06-30 Thread Cindy Lu
From: Jason Wang This patch introduces queue_enabled() method which allows the transport to implement its own way to report whether or not a queue is enabled. Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/virtio.c | 6 ++ include/hw/virtio/virtio-bus.h | 4

[PATCH v2 04/12] virtio-pci: implement queue_enabled method

2020-06-30 Thread Cindy Lu
From: Jason Wang With version 1, we can detect whether a queue is enabled via queue_enabled. Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index

[PATCH v2 02/12] vhost_net: use the function qemu_get_peer

2020-06-30 Thread Cindy Lu
user the qemu_get_peer to replace the old process Signed-off-by: Cindy Lu Reviewed-by: Laurent Vivier --- hw/net/vhost_net.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 6b82803fa7..4096d64aaf 100644

[PATCH v2 01/12] net: introduce qemu_get_peer

2020-06-30 Thread Cindy Lu
This is a small function that can get the peer from given NetClientState and queue_index Signed-off-by: Cindy Lu --- include/net/net.h | 1 + net/net.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 39085d9444..e7ef42d62b 100644

[PATCH v2 00/12] vDPA support in qemu

2020-06-30 Thread Cindy Lu
PATCHV2 Cindy Lu (9): net: introduce qemu_get_peer vhost_net: use the function qemu_get_peer vhost: introduce new VhostOps vhost_dev_start vhost: implement vhost_dev_start method vhost: introduce new VhostOps vhost_vq_get_addr vhost: implement vhost_vq_get_addr method vhost: introduce

Re: [PATCH v1 09/10] vhost-vdpa: introduce vhost-vdpa backend

2020-06-30 Thread Cindy Lu
On Tue, Jun 30, 2020 at 3:19 PM Maxime Coquelin wrote: > > > > On 6/22/20 5:37 PM, 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 devi

Re: [PATCH v1 05/10] vhost-backend: export the vhost backend helper

2020-06-30 Thread Cindy Lu
On Thu, Jun 25, 2020 at 11:07 PM Laurent Vivier wrote: > > On 22/06/2020 17:37, Cindy Lu wrote: > > export the helper then we can reuse them in other backend > > > > Signed-off-by: Cindy Lu > > --- > > hw/virtio/vhost-backend.c | 18 +--

Re: [PATCH v1 04/10] virtio-pci: implement queue_enabled method

2020-06-29 Thread Cindy Lu
On Wed, Jun 24, 2020 at 9:25 PM Laurent Vivier wrote: > > On 22/06/2020 17:37, Cindy Lu wrote: > > From: Jason Wang > > > > With version 1, we can detect whether a queue is enabled via > > queue_enabled. > > > > Signed-off-by: Jason Wang > >

Re: [PATCH v1 08/10] vhost: implement vhost_dev_start method

2020-06-29 Thread Cindy Lu
On Thu, Jun 25, 2020 at 10:35 PM Laurent Vivier wrote: > > On 22/06/2020 17:37, Cindy Lu wrote: > > use the vhost_dev_start callback to send the status to backend > > I agree with Jason, squash this patch with the previous one. > will fix this > > Signed-off-by: Cindy

Re: [PATCH v1 00/10] vDPA support in qemu

2020-06-28 Thread Cindy Lu
On Sun, Jun 28, 2020 at 3:07 PM Jason Wang wrote: > > > On 2020/6/22 下午11:37, Cindy Lu wrote: > > vDPA device is a device that uses a datapath which complies with the > > virtio specifications with vendor specific control path. vDPA devices > > can be both physica

Re: [PATCH v1 00/10] vDPA support in qemu

2020-06-27 Thread Cindy Lu
On Thu, Jun 25, 2020 at 12:48 PM Markus Armbruster wrote: > > Cindy Lu writes: > > > On Tue, Jun 23, 2020 at 5:43 PM Jason Wang wrote: > >> > >> > >> On 2020/6/23 下午5:16, Cindy Lu wrote: > >> > On Tue, Jun 23, 2020 at 3:07 PM Mark

Re: [PATCH v1 09/10] vhost-vdpa: introduce vhost-vdpa backend

2020-06-27 Thread Cindy Lu
On Thu, Jun 25, 2020 at 8:37 PM Laurent Vivier wrote: > > On 22/06/2020 17:37, 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 exp

Re: [PATCH v1 00/10] vDPA support in qemu

2020-06-24 Thread Cindy Lu
On Tue, Jun 23, 2020 at 5:43 PM Jason Wang wrote: > > > On 2020/6/23 下午5:16, Cindy Lu wrote: > > On Tue, Jun 23, 2020 at 3:07 PM Markus Armbruster wrote: > >> Cindy Lu writes: > >> > >>> vDPA device is a device that uses a datapath which complies wit

Re: [PATCH v1 10/10] vhost-vdpa: introduce vhost-vdpa net client

2020-06-23 Thread Cindy Lu
On Tue, Jun 23, 2020 at 4:57 PM Jason Wang wrote: > > > On 2020/6/22 下午11:37, Cindy Lu wrote: > > This patch set introduces a new net client type: vhost-vdpa. > > vhost-vdpa net client will set up a vDPA device which is specified > > by a "vhostdev" parameter

Re: [PATCH v1 09/10] vhost-vdpa: introduce vhost-vdpa backend

2020-06-23 Thread Cindy Lu
On Tue, Jun 23, 2020 at 3:31 PM Jason Wang wrote: > > > On 2020/6/22 下午11:37, 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

Re: [PATCH v1 08/10] vhost: implement vhost_dev_start method

2020-06-23 Thread Cindy Lu
On Tue, Jun 23, 2020 at 5:38 PM Jason Wang wrote: > > > On 2020/6/23 下午5:34, Cindy Lu wrote: > > On Tue, Jun 23, 2020 at 3:21 PM Jason Wang wrote: > >> On 2020/6/22 下午11:37, Cindy Lu wrote: > >>> use the vhost_dev_start callback to send the status

Re: [PATCH v1 08/10] vhost: implement vhost_dev_start method

2020-06-23 Thread Cindy Lu
On Tue, Jun 23, 2020 at 3:21 PM Jason Wang wrote: > > > On 2020/6/22 下午11:37, Cindy Lu wrote: > > use the vhost_dev_start callback to send the status to backend > > > I suggest to squash this into previous patch. > Sure will do > > > > > Signed-off-by:

Re: [PATCH v1 06/10] vhsot_net: introduce set_config & get_config function

2020-06-23 Thread Cindy Lu
On Tue, Jun 23, 2020 at 3:18 PM Jason Wang wrote: > > > On 2020/6/22 下午11:37, Cindy Lu wrote: > > This patch introduces set_config & get_config method which allows > > > One space is sufficient between get_config and method. > > > > vhost_net

Re: [PATCH v1 04/10] virtio-pci: implement queue_enabled method

2020-06-23 Thread Cindy Lu
On Tue, Jun 23, 2020 at 3:13 PM Jason Wang wrote: > > > On 2020/6/22 下午11:37, Cindy Lu wrote: > > From: Jason Wang > > > > With version 1, we can detect whether a queue is enabled via > > queue_enabled. > > > > Signed-off-by: Jason Wang > &g

Re: [PATCH v1 10/10] vhost-vdpa: introduce vhost-vdpa net client

2020-06-23 Thread Cindy Lu
On Tue, Jun 23, 2020 at 3:13 PM Markus Armbruster wrote: > > QAPI schema review only. > > Cindy Lu writes: > > > This patch set introduces a new net client type: vhost-vdpa. > > vhost-vdpa net client will set up a vDPA device which is specified > > by a "v

Re: [PATCH v1 01/10] net: introduce qemu_get_peer

2020-06-23 Thread Cindy Lu
On Tue, Jun 23, 2020 at 3:10 PM Jason Wang wrote: > > > On 2020/6/22 下午11:37, Cindy Lu wrote: > > This is a small function that can get the peer > > from given NetClientState and queue_index > > > > Signed-off-by: Cindy Lu > > --- > > includ

Re: [PATCH v1 00/10] vDPA support in qemu

2020-06-23 Thread Cindy Lu
On Tue, Jun 23, 2020 at 3:07 PM Markus Armbruster wrote: > > Cindy Lu writes: > > > vDPA device is a device that uses a datapath which complies with the > > virtio specifications with vendor specific control path. vDPA devices > > can be both physically located

[PATCH v1 10/10] vhost-vdpa: introduce vhost-vdpa net client

2020-06-22 Thread Cindy Lu
This patch set introduces a new net client type: vhost-vdpa. vhost-vdpa net client will set up a vDPA device which is specified by a "vhostdev" parameter. Signed-off-by: Lingshan Zhu Signed-off-by: Tiwei Bie Signed-off-by: Cindy Lu --- include/net/vhost-vdpa.h | 21 i

[PATCH v1 06/10] vhsot_net: introduce set_config & get_config function

2020-06-22 Thread Cindy Lu
This patch introduces set_config & get_config method which allows vhost_net set/get the config to backend Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 11 +++ include/net/vhost_net.h | 5 + 2 files changed, 16 insertions(+) diff --git a/hw/net/vhost_net.c b/hw

[PATCH v1 09/10] vhost-vdpa: introduce vhost-vdpa backend

2020-06-22 Thread Cindy Lu
zhu Signed-off-by: Tiwei Bie Signed-off-by: Cindy Lu --- configure | 21 ++ hw/net/vhost_net.c| 19 +- hw/net/virtio-net.c | 19 +- hw/virtio/Makefile.objs | 1 + hw/virtio/vhost-backend.c | 22 +- hw/virtio/vhost-vdpa.c

[PATCH v1 07/10] vhost: introduce new VhostOps vhost_dev_start

2020-06-22 Thread Cindy Lu
This patch introduces vhost_dev_start() callback which allows the vhost_net set the start/stop status to backend Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost

[PATCH v1 08/10] vhost: implement vhost_dev_start method

2020-06-22 Thread Cindy Lu
use the vhost_dev_start callback to send the status to backend Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 17 + include/hw/virtio/vhost.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 01ebe12f28..bfd7f9ce1f

[PATCH v1 04/10] virtio-pci: implement queue_enabled method

2020-06-22 Thread Cindy Lu
From: Jason Wang With version 1, we can detect whether a queue is enabled via queue_enabled. Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c

[PATCH v1 03/10] virtio-bus: introduce queue_enabled method

2020-06-22 Thread Cindy Lu
From: Jason Wang This patch introduces queue_enabled() method which allows the transport to implement its own way to report whether or not a queue is enabled. Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/virtio.c | 6 ++ include/hw/virtio/virtio-bus.h | 4

[PATCH v1 05/10] vhost-backend: export the vhost backend helper

2020-06-22 Thread Cindy Lu
export the helper then we can reuse them in other backend Signed-off-by: Cindy Lu --- hw/virtio/vhost-backend.c | 18 +- include/hw/virtio/vhost-backend.h | 28 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/hw/virtio/vhost

[PATCH v1 02/10] vhost_net: use the function qemu_get_peer

2020-06-22 Thread Cindy Lu
user the qemu_get_peer to replace the old process Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 6b82803fa7..4096d64aaf 100644 --- a/hw/net/vhost_net.c +++ b/hw

[PATCH v1 01/10] net: introduce qemu_get_peer

2020-06-22 Thread Cindy Lu
This is a small function that can get the peer from given NetClientState and queue_index Signed-off-by: Cindy Lu --- include/net/net.h | 1 + net/net.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 39085d9444..e7ef42d62b 100644

[PATCH v1 00/10] vDPA support in qemu

2020-06-22 Thread Cindy Lu
support Cindy Lu (8): net: introduce qemu_get_peer vhost_net: use the function qemu_get_peer vhost-backend: export the vhost backend helper vhsot_net: introduce set_config & get_config function vhost: introduce new VhostOps vhost_dev_start vhost: implement vhost_dev_start method v

Re: [RFC v3 6/8] vhost-backend: export the vhost backend helper

2020-06-16 Thread Cindy Lu
On Tue, Jun 16, 2020 at 4:17 PM Laurent Vivier wrote: > > On 29/05/2020 16:06, Cindy Lu wrote: > > export the helper then we can reuse some of them in vhost-vdpa > > > > Signed-off-by: Cindy Lu > > --- > > hw/virtio/vhost-backend.c | 34 +++

Re: [RFC v3 3/8] virtio-bus: introduce queue_enabled method

2020-06-16 Thread Cindy Lu
On Tue, Jun 16, 2020 at 3:50 PM Laurent Vivier wrote: > > On 29/05/2020 16:06, Cindy Lu wrote: > > From: Jason Wang > > > > This patch introduces queue_enabled() method which allows the > > transport to implement its own way to report whether or not a queue is &

Re: [RFC v3 5/8] vhost: introduce vhost_set_vring_ready method

2020-06-16 Thread Cindy Lu
On Tue, Jun 16, 2020 at 4:04 PM Laurent Vivier wrote: > > On 29/05/2020 16:06, Cindy Lu wrote: > > From: Jason Wang > > > > Vhost-vdpa introduces VHOST_VDPA_SET_VRING_ENABLE which complies the > > semantic of queue_enable defined in virtio spec. This method can be

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-16 Thread Cindy Lu
On Mon, Jun 15, 2020 at 10:44 PM Laurent Vivier wrote: > > On 08/06/2020 22:14, Eric Blake wrote: > > On 5/29/20 9:06 AM, Cindy Lu wrote: > >> From: Tiwei Bie > > > > The original author is Tiwei Bie... > > > >> > >> Currentl

Re: [RFC v3 1/8] net: introduce qemu_get_peer

2020-06-11 Thread Cindy Lu
On Thu, Jun 11, 2020 at 5:08 PM Laurent Vivier wrote: > > On 29/05/2020 16:06, Cindy Lu wrote: > > This is a small function that can get the peer from given NetClientState > > and queue_index > > > > Signed-off-by: Cindy Lu > > --- > > include/

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-08 Thread Cindy Lu
On Tue, Jun 9, 2020 at 4:14 AM Eric Blake wrote: > > On 5/29/20 9:06 AM, Cindy Lu wrote: > > From: Tiwei Bie > > The original author is Tiwei Bie... > > > > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > vhost-user. The above p

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-08 Thread Cindy Lu
On Thu, Jun 4, 2020 at 7:34 PM Michael S. Tsirkin wrote: > > On Thu, Jun 04, 2020 at 12:39:34PM +0200, Eugenio Perez Martin wrote: > > > +static int vhost_vdpa_set_config(struct vhost_dev *dev, const uint8_t > > > *data, > > > + uint32_t offset, uint32_t size, >

Re: [RFC v3 8/8] vhost-vdpa: introduce vhost-vdpa net client

2020-06-03 Thread Cindy Lu
Hi Jason, On Wed, Jun 3, 2020 at 4:43 PM Jason Wang wrote: > > > On 2020/6/3 下午4:19, Cindy Lu wrote: > >>> +static void vhost_vdpa_cleanup(NetClientState *nc) > >>> +{ > >>> +VhostVDPAState *s = DO_UPCAST(VhostVDPAState,

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-03 Thread Cindy Lu
On Wed, Jun 3, 2020 at 2:43 PM Jason Wang wrote: > > > On 2020/5/29 下午10:06, Cindy Lu wrote: > > From: Tiwei Bie > > > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > vhost-user. The above patch provides a generic device for vDPA purp

Re: [RFC v3 8/8] vhost-vdpa: introduce vhost-vdpa net client

2020-06-03 Thread Cindy Lu
Hi Jason, On Wed, Jun 3, 2020 at 2:39 PM Jason Wang wrote: > > > On 2020/5/29 下午10:06, Cindy Lu wrote: > > From: Tiwei Bie > > > Similar for this patch, you can change the git author and keep sobs for > both Tiwei and Ling Shan. > > Will Fix this > >

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-02 Thread Cindy Lu
On Wed, Jun 3, 2020 at 10:54 AM Jason Wang wrote: > > > On 2020/5/29 下午10:06, Cindy Lu wrote: > > From: Tiwei Bie > > > Consider the significant modification based on the original patch. > > I think you may change the other to yourslef and keep the sobs for both &g

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-02 Thread Cindy Lu
Hi Jason, On Wed, Jun 3, 2020 at 10:52 AM Jason Wang wrote: > > > On 2020/5/29 下午10:06, Cindy Lu wrote: > > From: Tiwei Bie > > > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > vhost-user. The above patch provides a generic devic

Re: [RFC v3 8/8] vhost-vdpa: introduce vhost-vdpa net client

2020-05-31 Thread Cindy Lu
On Fri, May 29, 2020 at 10:23 PM Eric Blake wrote: > > On 5/29/20 9:06 AM, Cindy Lu wrote: > > From: Tiwei Bie > > > > This patch set introduces a new net client type: vhost-vdpa. > > vhost-vdpa net client will set up a vDPA device which is specified > > b

[RFC v3 8/8] vhost-vdpa: introduce vhost-vdpa net client

2020-05-29 Thread Cindy Lu
From: Tiwei Bie This patch set introduces a new net client type: vhost-vdpa. vhost-vdpa net client will set up a vDPA device which is specified by a "vhostdev" parameter. Co-authored-by: Lingshan Zhu Signed-off-by: Cindy Lu --- include/net/vhost-vdpa.h | 19 include/net/v

[RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-05-29 Thread Cindy Lu
-Authored-By: Lingshan zhu Signed-off-by: Cindy Lu --- configure | 21 ++ hw/net/vhost_net-stub.c | 5 + hw/net/vhost_net.c| 47 +++- hw/virtio/Makefile.objs | 1 + hw/virtio/vhost-backend.c | 5 + hw/virtio/vhost-vdpa.c

[RFC v3 5/8] vhost: introduce vhost_set_vring_ready method

2020-05-29 Thread Cindy Lu
From: Jason Wang Vhost-vdpa introduces VHOST_VDPA_SET_VRING_ENABLE which complies the semantic of queue_enable defined in virtio spec. This method can be used for preventing device from executing request for a specific virtqueue. This patch introduces the vhost_ops for this. Note that, we've

[RFC v3 4/8] virtio-pci: implement queue_enabled method

2020-05-29 Thread Cindy Lu
From: Jason Wang With version 1, we can detect whether a queue is enabled via queue_enabled. Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 4cb784389c..2c82ed5246

[RFC v3 3/8] virtio-bus: introduce queue_enabled method

2020-05-29 Thread Cindy Lu
From: Jason Wang This patch introduces queue_enabled() method which allows the transport to implement its own way to report whether or not a queue is enabled. Signed-off-by: Jason Wang 0005-virtio-bus-introduce-queue_enabled-method.patch --- hw/virtio/virtio.c | 6 ++

[RFC v3 2/8] vhost_net: use the function qemu_get_peer

2020-05-29 Thread Cindy Lu
user the qemu_get_peer to replace the old process Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 6b82803fa7..d1d421e3d9 100644 --- a/hw/net/vhost_net.c +++ b/hw/net

[RFC v3 1/8] net: introduce qemu_get_peer

2020-05-29 Thread Cindy Lu
This is a small function that can get the peer from given NetClientState and queue_index Signed-off-by: Cindy Lu --- include/net/net.h | 1 + net/net.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 39085d9444..e7ef42d62b 100644

[RFC v3 6/8] vhost-backend: export the vhost backend helper

2020-05-29 Thread Cindy Lu
export the helper then we can reuse some of them in vhost-vdpa Signed-off-by: Cindy Lu --- hw/virtio/vhost-backend.c | 34 ++- include/hw/virtio/vhost-backend.h | 28 + 2 files changed, 48 insertions(+), 14 deletions(-) diff --git

[RFC v3 0/8] vDPA support in qemu

2020-05-29 Thread Cindy Lu
-options.hx the other comments form last version change from v2 change the work process of vhost set status introduce vhost_get_device_id test based on qemu v5.0.0-rc4 the other comments from last version Cindy Lu (3): net: introduce qemu_get_peer vhost_net: use the function qemu_get_peer

Re: [RFC v2 5/9] vhost-vdpa: implement vhost-vdpa backend

2020-05-25 Thread Cindy Lu
On Thu, May 21, 2020 at 8:40 PM Stefan Hajnoczi wrote: > > On Sat, May 09, 2020 at 12:32:14AM +0800, Cindy Lu wrote: > > From: Tiwei Bie > > > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > vhost-user. The above patch provides a g

Re: [RFC v2 7/9] virito-pci: implement queue_enabled method

2020-05-10 Thread Cindy Lu
On Sat, May 9, 2020 at 8:02 PM Philippe Mathieu-Daudé wrote: > > Typo "virtio-pci" in patch subject. > Thanks Philippe, I will fix this > On 5/8/20 6:32 PM, Cindy Lu wrote: > > From: Jason Wang > > > > With version 1, we can detect whether a queue is enabl

Re: [RFC v2 5/9] vhost-vdpa: implement vhost-vdpa backend

2020-05-09 Thread Cindy Lu
On Sat, May 9, 2020 at 11:00 AM Jason Wang wrote: > > > On 2020/5/9 上午12:32, Cindy Lu wrote: > > From: Tiwei Bie > > > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > vhost-user. The above patch provides a generic device for vDPA purp

Re: [RFC v2 4/9] vhost-vdpa: introduce vhost-vdpa net client

2020-05-09 Thread Cindy Lu
On Sat, May 9, 2020 at 10:40 AM Jason Wang wrote: > > > On 2020/5/9 上午12:32, Cindy Lu wrote: > > From: Tiwei Bie > > > If you think you've done a huge refactor on the code, you can change the > author but need to keep the sob of Tiwei. > > > > > > Th

Re: [RFC v2 4/9] vhost-vdpa: introduce vhost-vdpa net client

2020-05-09 Thread Cindy Lu
On Sat, May 9, 2020 at 12:42 AM Eric Blake wrote: > > On 5/8/20 11:32 AM, Cindy Lu wrote: > > From: Tiwei Bie > > > > This patch set introduces a new net client type: vhost-vdpa. > > vhost-vdpa net client will set up a vDPA device which is specified > > b

Re: [RFC v2 3/9] virtio_net: introduce vhost_set_state

2020-05-09 Thread Cindy Lu
On Sat, May 9, 2020 at 10:25 AM Jason Wang wrote: > > > On 2020/5/9 上午12:32, Cindy Lu wrote: > > Introduce a function to set the state to the vhost driver. > > vDPA need to sync the driver's state to NIC > > > Let's split this patch into two. > > 1) introduce

Re: [RFC v2 6/9] virtio-bus: introduce queue_enabled method

2020-05-09 Thread Cindy Lu
On Sat, May 9, 2020 at 11:02 AM Jason Wang wrote: > > > On 2020/5/9 上午12:32, Cindy Lu wrote: > > From: Jason Wang > > > > This patch introduces queue_enabled() method which allows the > > transport to implement its own way to report whether or not a queue i

Re: [RFC v2 8/9] vhost_net: set vq ready during start if necessary

2020-05-09 Thread Cindy Lu
On Sat, May 9, 2020 at 11:04 AM Jason Wang wrote: > > > On 2020/5/9 上午12:32, Cindy Lu wrote: > > From: Jason Wang > > > > Signed-off-by: Jason Wang > > --- > > hw/net/vhost_net.c | 4 > > 1 file changed, 4 insertions(+) > > >

Re: [RFC v2 2/9] net: use the function qemu_get_peer

2020-05-09 Thread Cindy Lu
On Sat, May 9, 2020 at 10:20 AM Jason Wang wrote: > > > On 2020/5/9 上午12:32, Cindy Lu wrote: > > user the qemu_get_peer to replace the old process > > > The title should be "vhost_net: use the function qemu_get_peer". > > Thanks > Sure, I will

[RFC v2 7/9] virito-pci: implement queue_enabled method

2020-05-08 Thread Cindy Lu
From: Jason Wang With version 1, we can detect whether a queue is enabled via queue_enabled. Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index c6b47a9c73..4aaf5d953e

[RFC v2 8/9] vhost_net: set vq ready during start if necessary

2020-05-08 Thread Cindy Lu
From: Jason Wang Signed-off-by: Jason Wang --- hw/net/vhost_net.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 1af39abaf3..eff9ec9177 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -383,6 +383,10 @@ int

[RFC v2 5/9] vhost-vdpa: implement vhost-vdpa backend

2020-05-08 Thread Cindy Lu
-Authored-By: Lingshan zhu Signed-off-by: Cindy Lu --- hw/net/vhost_net.c| 39 ++- hw/virtio/Makefile.objs | 1 + hw/virtio/vhost-backend.c | 5 + hw/virtio/vhost-vdpa.c| 447 ++ hw/virtio/vhost.c | 14

[RFC v2 6/9] virtio-bus: introduce queue_enabled method

2020-05-08 Thread Cindy Lu
From: Jason Wang This patch introduces queue_enabled() method which allows the transport to implement its own way to report whether or not a queue is enabled. Signed-off-by: Jason Wang --- hw/virtio/virtio.c | 6 ++ include/hw/virtio/virtio-bus.h | 4 2 files changed, 10

[RFC v2 9/9] vhost: introduce vhost_set_vring_ready method

2020-05-08 Thread Cindy Lu
From: Jason Wang Vhost-vdpa introduces VHOST_VDPA_SET_VRING_ENABLE which complies the semantic of queue_enable defined in virtio spec. This method can be used for preventing device from executing request for a specific virtqueue. This patch introduces the vhost_ops for this. Note that, we've

[RFC v2 3/9] virtio_net: introduce vhost_set_state

2020-05-08 Thread Cindy Lu
Introduce a function to set the state to the vhost driver. vDPA need to sync the driver's state to NIC Signed-off-by: Cindy Lu --- hw/net/vhost_net.c| 9 + hw/net/virtio-net.c | 9 + include/hw/virtio/vhost-backend.h | 2 ++ include/net/vhost_net.h

[RFC v2 4/9] vhost-vdpa: introduce vhost-vdpa net client

2020-05-08 Thread Cindy Lu
From: Tiwei Bie This patch set introduces a new net client type: vhost-vdpa. vhost-vdpa net client will set up a vDPA device which is specified by a "vhostdev" parameter. Co-authored-by: Lingshan Zhu Signed-off-by: Cindy Lu --- configure| 21 include/net/vh

[RFC v2 2/9] net: use the function qemu_get_peer

2020-05-08 Thread Cindy Lu
user the qemu_get_peer to replace the old process Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 6b82803fa7..d1d421e3d9 100644 --- a/hw/net/vhost_net.c +++ b/hw/net

[RFC v2 1/9] net: introduce qemu_get_peer

2020-05-08 Thread Cindy Lu
This is a small function that can get the peer from given NetClientState and queue_index Signed-off-by: Cindy Lu --- include/net/net.h | 1 + net/net.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index e175ba9677..0a74324ccd 100644

[RFC v2 0/9] vDPA support in qemu

2020-05-08 Thread Cindy Lu
of introduce vhost_set_vring_ready method separe the patch of qemu_get_peer separe the patch of vhost_set_state intorduce the new macro specific for vDPA in configure intorduce the fuction to pass the fd from cmdline introduce the docmation in qemu-options.hx the other comments form last version Cindy

Re: [RFC v1 3/4] vhost-vdpa: implement vhost-vdpa backend

2020-05-07 Thread Cindy Lu
On Thu, May 7, 2020 at 11:30 PM Maxime Coquelin wrote: > > > > On 4/20/20 11:32 AM, Cindy Lu wrote: > > diff --git a/include/hw/virtio/vhost-backend.h > > b/include/hw/virtio/vhost-backend.h > > index 6f6670783f..d81bd9885f 100644 > > --- a/include/hw/virtio/

Re: [RFC v1 3/4] vhost-vdpa: implement vhost-vdpa backend

2020-05-07 Thread Cindy Lu
On Thu, May 7, 2020 at 11:13 PM Maxime Coquelin wrote: > > > > On 4/20/20 11:32 AM, 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 vDP

Re: [RFC v1 3/4] vhost-vdpa: implement vhost-vdpa backend

2020-04-22 Thread Cindy Lu
On Tue, Apr 21, 2020 at 11:54 PM Laurent Vivier 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 exp

Re: [RFC v1 2/4] vhost-vdpa: introduce vhost-vdpa net client

2020-04-22 Thread Cindy Lu
On Tue, Apr 21, 2020 at 11:47 PM Laurent Vivier wrote: > > On 20/04/2020 11:32, Cindy Lu wrote: > > This patch set introduces a new net client type: vhost-vdpa. > > vhost-vdpa net client will set up a vDPA device which is svhostdevpecified > > by a "vhostdev" pa

Re: [RFC v1 0/4] vDPA support in qemu

2020-04-21 Thread Cindy Lu
Thanks Jason, I will fix these problems and send new version soon On Tue, Apr 21, 2020 at 12:05 PM Jason Wang wrote: > > On 2020/4/20 下午5:32, Cindy Lu wrote: > > vDPA device is a device that uses a datapath which complies with the > > virtio specifications with vendor spe

Re: [RFC v1 2/4] vhost-vdpa: introduce vhost-vdpa net client

2020-04-21 Thread Cindy Lu
On Tue, Apr 21, 2020 at 11:40 AM Jason Wang wrote: > > On 2020/4/20 下午5:32, Cindy Lu wrote: > > This patch set introduces a new net client type: vhost-vdpa. > > vhost-vdpa net client will set up a vDPA device which is > svhostdevpecified > > > typo. > >

Re: [RFC v1 3/4] vhost-vdpa: implement vhost-vdpa backend

2020-04-21 Thread Cindy Lu
On Tue, Apr 21, 2020 at 11:57 AM Jason Wang wrote: > > On 2020/4/20 下午5: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 exp

Re: [RFC v1 4/4] vhost: introduce vhost_set_vring_ready method

2020-04-21 Thread Cindy Lu
On Tue, Apr 21, 2020 at 12:00 PM Jason Wang wrote: > > On 2020/4/20 下午5:32, Cindy Lu wrote: > > From: Jason Wang > > > > Vhost-vdpa introduces VHOST_VDPA_SET_VRING_ENABLE which complies the > > semantic of queue_enable defined in virtio spec. This method can be

Re: [RFC v1 1/4] net: Introduce qemu_get_peer

2020-04-21 Thread Cindy Lu
On Tue, Apr 21, 2020 at 11:23 AM Jason Wang wrote: > > On 2020/4/20 下午5:32, Cindy Lu wrote: > > This is a small function that can get the peer from given > NetClientState and queue_index > > > Unnecessary space between 'function' and 'that'. > > > > >

[RFC v1 2/4] vhost-vdpa: introduce vhost-vdpa net client

2020-04-20 Thread Cindy Lu
This patch set introduces a new net client type: vhost-vdpa. vhost-vdpa net client will set up a vDPA device which is svhostdevpecified by a "vhostdev" parameter. Author: Tiwei Bie Signed-off-by: Cindy Lu --- include/net/vhost-vdpa.h | 18 include/net/vhost_net.h |

<    1   2   3   4   5   6   >