Re: [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version

2020-07-20 Thread Eugenio Pérez
On Mon, Jul 20, 2020 at 11:27 AM Michael S. Tsirkin wrote: > On Thu, Jul 16, 2020 at 07:16:27PM +0200, Eugenio Perez Martin wrote: > > On Fri, Jul 10, 2020 at 7:58 AM Michael S. Tsirkin wrote: > > > On Fri, Jul 10, 2020 at 07:39:26AM +0200, Eugenio Perez Martin wrote: > > > > > > How about play

[RFC v9 03/11] vhost/net: pass net specific struct pointer

2020-06-19 Thread Eugenio Pérez
From: "Michael S. Tsirkin" In preparation for further cleanup, pass net specific pointer to ubuf callbacks so we can move net specific fields out to net structures. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez --- drivers/vhost/net.c | 14 +++--- 1 file

[RFC v9 06/11] vhost/net: convert to new API: heads->bufs

2020-06-19 Thread Eugenio Pérez
From: "Michael S. Tsirkin" Convert vhost net to use the new format-agnostic API. In particular, don't poke at vq internals such as the heads array. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez --- drivers/vhost/net.c | 154 +++-

[RFC v9 09/11] vhost/scsi: switch to buf APIs

2020-06-19 Thread Eugenio Pérez
From: "Michael S. Tsirkin" Switch to buf APIs. Doing this exposes a spec violation in vhost scsi: all used bufs are marked with length 0. Fix that is left for another day. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez --- drivers/vhost/s

[RFC v9 10/11] vhost/vsock: switch to the buf API

2020-06-19 Thread Eugenio Pérez
From: "Michael S. Tsirkin" A straight-forward conversion. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez --- drivers/vhost/vsock.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/vhost/vsock.c b/dri

[RFC v9 05/11] vhost: format-independent API for used buffers

2020-06-19 Thread Eugenio Pérez
From: "Michael S. Tsirkin" Add a new API that doesn't assume used ring, heads, etc. For now, we keep the old APIs around to make it easier to convert drivers. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez --- drivers/vho

[RFC v9 07/11] vhost/net: avoid iov length math

2020-06-19 Thread Eugenio Pérez
From: "Michael S. Tsirkin" Now that API exposes buffer length, we no longer need to scan IOVs to figure it out. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez --- drivers/vhost/net.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dri

[RFC v9 08/11] vhost/test: convert to the buf API

2020-06-19 Thread Eugenio Pérez
From: "Michael S. Tsirkin" Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez --- drivers/vhost/test.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index 650e69261557..39e68f797

[RFC v9 02/11] vhost: use batched get_vq_desc version

2020-06-19 Thread Eugenio Pérez
From: "Michael S. Tsirkin" As testing shows no performance change, switch to that now. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez Link: https://lore.kernel.org/r/20200401183118.8334-3-epere...@redhat.com Signed-off-by: Michael S. Tsirkin Signed-off-by: Eug

[RFC v9 01/11] vhost: option to fetch descriptors through an independent struct

2020-06-19 Thread Eugenio Pérez
ay in the final submission. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez Link: https://lore.kernel.org/r/20200401183118.8334-2-epere...@redhat.com Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez --- drivers/vhost/vhost.c | 305 +-

[RFC v9 00/11] vhost: ring format independence

2020-06-19 Thread Eugenio Pérez
This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. Used ring is similar: we fetch into an independent struct first, convert that to IOV later. The point i

[RFC v9 04/11] vhost: reorder functions

2020-06-19 Thread Eugenio Pérez
From: "Michael S. Tsirkin" Reorder functions in the file to not rely on forward declarations, in preparation to making them static down the road. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez --- drivers/vhost/vhost.c | 26 +- 1 file c

[RFC v9 11/11] vhost: drop head based APIs

2020-06-19 Thread Eugenio Pérez
From: "Michael S. Tsirkin" Everyone's using buf APIs, no need for head based ones anymore. Signed-off-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez --- drivers/vhost/vhost.c | 58 +++ drivers/vhost/vhost.h | 12 - 2 f

Re: [PATCH RFC v7 03/14] vhost: use batched get_vq_desc version

2020-06-15 Thread Eugenio Pérez
On Thu, 2020-06-11 at 07:30 -0400, Michael S. Tsirkin wrote: > On Wed, Jun 10, 2020 at 06:18:32PM +0200, Eugenio Perez Martin wrote: > > On Wed, Jun 10, 2020 at 5:13 PM Michael S. Tsirkin wrote: > > > On Wed, Jun 10, 2020 at 02:37:50PM +0200, Eugenio Perez Martin wrote: > > > > > +/* This function

Re: [PATCH RFC v7 04/14] vhost/net: pass net specific struct pointer

2020-06-10 Thread Eugenio Pérez
On Wed, 2020-06-10 at 07:36 -0400, Michael S. Tsirkin wrote: > In preparation for further cleanup, pass net specific pointer > to ubuf callbacks so we can move net specific fields > out to net structures. > > Signed-off-by: Michael S. Tsirkin > --- > drivers/vhost/net.c | 14 +++--- > 1

Re: [PATCH RFC v7 03/14] vhost: use batched get_vq_desc version

2020-06-10 Thread Eugenio Pérez
On Wed, 2020-06-10 at 07:36 -0400, Michael S. Tsirkin wrote: > As testing shows no performance change, switch to that now. > > Signed-off-by: Michael S. Tsirkin > Signed-off-by: Eugenio Pérez > Link: https://lore.kernel.org/r/20200401183118.8334-3-epere...@redhat.com > Signed

Re: [PATCH RFC v7 02/14] fixup! vhost: option to fetch descriptors through an independent struct

2020-06-10 Thread Eugenio Pérez
On Wed, 2020-06-10 at 07:35 -0400, Michael S. Tsirkin wrote: > --- > drivers/vhost/vhost.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index 180b7b58c76b..11433d709651 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers