Re: [virtio-dev] [PATCH v4] content: Introduce VIRTIO_NET_F_STANDBY feature

2018-11-21 Thread Michael S. Tsirkin
Great to see you making progress on this! Some comments below: On Wed, Nov 21, 2018 at 05:39:38PM +0200, Sameeh Jubran wrote: > I have created a setup which has two hosts (host A and host B) with X710 10G > cards connected back to back. On one host (I'll refer to this host as host A) > I > have

Re: [virtio-dev] [PATCH v4] content: Introduce VIRTIO_NET_F_STANDBY feature

2018-11-21 Thread Sameeh Jubran
On Wed, Nov 21, 2018 at 8:41 PM Michael S. Tsirkin wrote: > > Great to see you making progress on this! > Some comments below: > > On Wed, Nov 21, 2018 at 05:39:38PM +0200, Sameeh Jubran wrote: > > I have created a setup which has two hosts (host A and host B) with X710 10G > > cards connected

[virtio-dev] [PATCH net-next v3 10/13] virtio_ring: introduce packed ring support

2018-11-21 Thread Tiwei Bie
Introduce the packed ring support. Packed ring can only be created by vring_create_virtqueue() and each chunk of packed ring will be allocated individually. Packed ring can not be created on preallocated memory by vring_new_virtqueue() or the likes currently. Signed-off-by: Tiwei Bie ---

[virtio-dev] Re: [PATCH v4 2/2] drm/virtio: add edid support

2018-11-21 Thread Gerd Hoffmann
On Tue, Oct 30, 2018 at 10:38:04AM +0100, Daniel Vetter wrote: > On Tue, Oct 30, 2018 at 07:32:06AM +0100, Gerd Hoffmann wrote: > > linux guest driver implementation of the VIRTIO_GPU_F_EDID feature. > > > > Signed-off-by: Gerd Hoffmann > > Like with bochs, I think drm_do_get_edid() here is

[virtio-dev] [PATCH net-next v3 11/13] virtio_ring: leverage event idx in packed ring

2018-11-21 Thread Tiwei Bie
Leverage the EVENT_IDX feature in packed ring to suppress events when it's available. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 77 1 file changed, 71 insertions(+), 6 deletions(-) diff --git a/drivers/virtio/virtio_ring.c

[virtio-dev] [PATCH net-next v3 05/13] virtio_ring: introduce debug helpers

2018-11-21 Thread Tiwei Bie
Introduce debug helpers for last_add_time update, check and invalid. They will be used by packed ring too. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 49 1 file changed, 27 insertions(+), 22 deletions(-) diff --git

[virtio-dev] [PATCH net-next v3 09/13] virtio_ring: cache whether we will use DMA API

2018-11-21 Thread Tiwei Bie
Cache whether we will use DMA API, instead of doing the check every time. We are going to check whether DMA API is used more often in packed ring. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

[virtio-dev] [PATCH net-next v3 13/13] virtio_ring: advertize packed ring layout

2018-11-21 Thread Tiwei Bie
Advertize the packed ring layout support. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 40e4d3798d16..cd7e755484e3 100644 --- a/drivers/virtio/virtio_ring.c +++

[virtio-dev] [PATCH net-next v3 12/13] virtio_ring: disable packed ring on unsupported transports

2018-11-21 Thread Tiwei Bie
Currently, ccw, vop and remoteproc need some legacy virtio APIs to create or access virtio rings, which are not supported by packed ring. So disable packed ring on these transports for now. Signed-off-by: Tiwei Bie --- drivers/misc/mic/vop/vop_main.c| 13 +

[virtio-dev] [PATCH net-next v3 08/13] virtio_ring: extract split ring handling from ring creation

2018-11-21 Thread Tiwei Bie
Introduce a specific function to create the split ring. And also move the DMA allocation and size information to the .split sub-structure. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 220 --- 1 file changed, 121 insertions(+), 99

[virtio-dev] [PATCH net-next v3 01/13] virtio: add packed ring types and macros

2018-11-21 Thread Tiwei Bie
Add types and macros for packed ring. Signed-off-by: Tiwei Bie --- include/uapi/linux/virtio_config.h | 3 +++ include/uapi/linux/virtio_ring.h | 52 ++ 2 files changed, 55 insertions(+) diff --git a/include/uapi/linux/virtio_config.h

[virtio-dev] [PATCH net-next v3 07/13] virtio_ring: allocate desc state for split ring separately

2018-11-21 Thread Tiwei Bie
Put the split ring's desc state into the .split sub-structure, and allocate desc state for split ring separately, this makes the code more readable and more consistent with what we will do for packed ring. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 45

[virtio-dev] [PATCH net-next v3 03/13] virtio_ring: put split ring functions together

2018-11-21 Thread Tiwei Bie
Put the xxx_split() functions together to make the code more readable and avoid misuse after introducing the packed ring. There is no functional change. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 587 ++- 1 file changed, 302

[virtio-dev] [PATCH net-next v3 04/13] virtio_ring: put split ring fields in a sub struct

2018-11-21 Thread Tiwei Bie
Put the split ring specific fields in a sub-struct named as "split" to avoid misuse after introducing packed ring. There is no functional change. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 156 +-- 1 file changed, 91 insertions(+), 65

[virtio-dev] [PATCH net-next v3 02/13] virtio_ring: add _split suffix for split ring functions

2018-11-21 Thread Tiwei Bie
Add _split suffix for split ring specific functions. This is a preparation for introducing the packed ring support. There is no functional change. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 269 ++- 1 file changed, 164 insertions(+), 105

[virtio-dev] [PATCH net-next v3 00/13] virtio: support packed ring

2018-11-21 Thread Tiwei Bie
Hi, This patch set implements packed ring support in virtio driver. A performance test between pktgen (pktgen_sample03_burst_single_flow.sh) and DPDK vhost (testpmd/rxonly/vhost-PMD) has been done, I saw ~30% performance gain in packed ring in this case. To make this patch set work with below

Re: [virtio-dev] [PATCH v4] content: Introduce VIRTIO_NET_F_STANDBY feature

2018-11-21 Thread Sameeh Jubran
Hi all, It's been a while since the last discussion here. I have been working on implementing the standby feature in Qemu. I have tried multiple approaches for implementation and in the end decided to implement using the hotplug/unplug infrastructure for multiple reasons which I'll go over when I

Re: [virtio-dev] [PATCH] ACCESS_PLATFORM/ACCESS_ORDER

2018-11-21 Thread Michael S. Tsirkin
On Wed, Nov 21, 2018 at 09:44:02PM +0800, Jason Wang wrote: > > On 2018/11/21 下午8:10, Michael S. Tsirkin wrote: > > On Wed, Nov 21, 2018 at 03:35:21PM +0800, Jason Wang wrote: > > > On 2018/11/21 下午1:11, Michael S. Tsirkin wrote: > > > > > A question is. Are you suggesting to have

[virtio-dev] Re: [PATCH net-next v3 00/13] virtio: support packed ring

2018-11-21 Thread Tiwei Bie
On Wed, Nov 21, 2018 at 07:20:27AM -0500, Michael S. Tsirkin wrote: > On Wed, Nov 21, 2018 at 06:03:17PM +0800, Tiwei Bie wrote: > > Hi, > > > > This patch set implements packed ring support in virtio driver. > > > > A performance test between pktgen (pktgen_sample03_burst_single_flow.sh) > >

Re: [virtio-dev] [PATCH] ACCESS_PLATFORM/ACCESS_ORDER

2018-11-21 Thread Jason Wang
On 2018/11/21 下午8:10, Michael S. Tsirkin wrote: On Wed, Nov 21, 2018 at 03:35:21PM +0800, Jason Wang wrote: On 2018/11/21 下午1:11, Michael S. Tsirkin wrote: A question is. Are you suggesting to have VIRTIO_F_ORDER_PLATFORM for each hardware implementation? It's not a simple question. There

[virtio-dev] Re: [PATCH net-next v3 00/13] virtio: support packed ring

2018-11-21 Thread Jason Wang
On 2018/11/21 下午8:42, Tiwei Bie wrote: On Wed, Nov 21, 2018 at 07:20:27AM -0500, Michael S. Tsirkin wrote: On Wed, Nov 21, 2018 at 06:03:17PM +0800, Tiwei Bie wrote: Hi, This patch set implements packed ring support in virtio driver. A performance test between pktgen

Re: [virtio-dev] Re: [PATCH v4 5/7] iommu: Add virtio-iommu driver

2018-11-21 Thread Auger Eric
Hi jean, On 11/20/18 6:30 PM, Jean-Philippe Brucker wrote: > On 16/11/2018 18:46, Jean-Philippe Brucker wrote: +/* + * __viommu_sync_req - Complete all in-flight requests + * + * Wait for all added requests to complete. When this function returns, all + * requests

[virtio-dev] [PATCH v2] ACCESS_PLATFORM/ACCESS_ORDER

2018-11-21 Thread Michael S. Tsirkin
This is an attempt to clarify the intent behind VIRTIO_F_IOMMU_PLATFORM and VIRTIO_F_IO_BARRIER which based on recent discussions appear to be hard to understand. - rename VIRTIO_F_IOMMU_PLATFORM to ACCESS_PLATFORM It is already the fact that the DMA API that Linux uses does more than just

Re: [virtio-dev] [PATCH v4] content: Introduce VIRTIO_NET_F_STANDBY feature

2018-11-21 Thread Samudrala, Sridhar
On 11/21/2018 12:04 PM, Sameeh Jubran wrote: On Wed, Nov 21, 2018 at 8:41 PM Michael S. Tsirkin wrote: Great to see you making progress on this! Some comments below: On Wed, Nov 21, 2018 at 05:39:38PM +0200, Sameeh Jubran wrote: I have created a setup which has two hosts (host A and host B)