Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Samudrala, Sridhar
On 1/22/2018 7:36 PM, Alexander Duyck wrote: On Mon, Jan 22, 2018 at 6:04 PM, Michael S. Tsirkin wrote: On Mon, Jan 22, 2018 at 05:34:37PM -0800, Samudrala, Sridhar wrote: On 1/22/2018 4:05 PM, Michael S. Tsirkin wrote: On Mon, Jan 22, 2018 at 03:27:40PM -0800, Samudrala, Sridhar wrote: Yo

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Alexander Duyck
On Mon, Jan 22, 2018 at 6:04 PM, Michael S. Tsirkin wrote: > On Mon, Jan 22, 2018 at 05:34:37PM -0800, Samudrala, Sridhar wrote: >> On 1/22/2018 4:05 PM, Michael S. Tsirkin wrote: >> > On Mon, Jan 22, 2018 at 03:27:40PM -0800, Samudrala, Sridhar wrote: >> > > > > You could probably >> > > > > even

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Michael S. Tsirkin
On Mon, Jan 22, 2018 at 05:34:37PM -0800, Samudrala, Sridhar wrote: > On 1/22/2018 4:05 PM, Michael S. Tsirkin wrote: > > On Mon, Jan 22, 2018 at 03:27:40PM -0800, Samudrala, Sridhar wrote: > > > > > You could probably > > > > > even handle the Tx queue selection via a simple eBPF program and map >

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Samudrala, Sridhar
On 1/22/2018 4:02 PM, Stephen Hemminger wrote: In the case of SwitchDev it should be possible for the port representors and the switch to provide data on which interfaces are bonded on the host side and which aren't. With that data it would be pretty easy to just put together a list of addr

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Samudrala, Sridhar
On 1/22/2018 4:05 PM, Michael S. Tsirkin wrote: On Mon, Jan 22, 2018 at 03:27:40PM -0800, Samudrala, Sridhar wrote: You could probably even handle the Tx queue selection via a simple eBPF program and map since the input for whatever is used to select Tx should be pretty simple, destination MAC,

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Michael S. Tsirkin
On Mon, Jan 22, 2018 at 05:13:01PM -0800, Jakub Kicinski wrote: > On Tue, 23 Jan 2018 02:47:57 +0200, Michael S. Tsirkin wrote: > > On Mon, Jan 22, 2018 at 04:16:23PM -0800, Jakub Kicinski wrote: > > > On Tue, 23 Jan 2018 02:05:48 +0200, Michael S. Tsirkin wrote: > > > > > As we are using virtio_

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Michael S. Tsirkin
On Mon, Jan 22, 2018 at 04:16:23PM -0800, Jakub Kicinski wrote: > On Tue, 23 Jan 2018 02:05:48 +0200, Michael S. Tsirkin wrote: > > > As we are using virtio_net to control and manage the VF data path, it is > > > not > > > clear to me > > > what is the advantage of creating a new device rather tha

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Michael S. Tsirkin
On Mon, Jan 22, 2018 at 03:27:40PM -0800, Samudrala, Sridhar wrote: > > > You could probably > > > even handle the Tx queue selection via a simple eBPF program and map > > > since the input for whatever is used to select Tx should be pretty > > > simple, destination MAC, source NUMA node, etc, and

[virtio-dev] [PATCH v7 09/11] content: in-order buffer use

2018-01-22 Thread Michael S. Tsirkin
Using descriptors in-order is sometimes benefitial. Add an option for that - per-format detail allowing more optimizations will be added by follow-up patches. Signed-off-by: Michael S. Tsirkin --- content.tex | 15 +++ 1 file changed, 15 insertions(+) diff --git a/content.tex b/con

[virtio-dev] [PATCH v7 08/11] packed virtqueues: more efficient virtqueue layout

2018-01-22 Thread Michael S. Tsirkin
Performance analysis of this is in my kvm forum 2016 presentation. The idea is to have a r/w descriptor in a ring structure, replacing the used and available ring, index and descriptor buffer. This is also easier for devices to implement than the 1.0 layout. Several more enhancements will be nece

[virtio-dev] [PATCH v7 01/11] content: move 1.0 queue format out to a separate section

2018-01-22 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- content.tex | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/content.tex b/content.tex index c7ef7fd..4483a4b 100644 --- a/content.tex +++ b/content.tex @@ -230,7 +230,30 @@ result. The mechanism for bulk data tra

[virtio-dev] [PATCH v7 11/11] split-ring: in order feature

2018-01-22 Thread Michael S. Tsirkin
For a split ring, require that drivers use descriptors in order too. This allows devices to skip reading the available ring. Signed-off-by: Michael S. Tsirkin --- split-ring.tex | 18 ++ 1 file changed, 18 insertions(+) diff --git a/split-ring.tex b/split-ring.tex index f976e45.

[virtio-dev] [PATCH v7 04/11] content: replace mentions of len with used length

2018-01-22 Thread Michael S. Tsirkin
Document buffer used len and use that terminology everywhere in the generic section. Signed-off-by: Michael S. Tsirkin --- content.tex | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/content.tex b/content.tex index 3b4579e..4350ecf 10

[virtio-dev] [PATCH v7 10/11] packed-ring: add in order support

2018-01-22 Thread Michael S. Tsirkin
Support in-order requests for packed rings. This allows selective write-out of used descriptors. Signed-off-by: Michael S. Tsirkin --- packed-ring.tex | 24 1 file changed, 24 insertions(+) diff --git a/packed-ring.tex b/packed-ring.tex index b6cb979..3bbde5b 100644 ---

[virtio-dev] [PATCH v7 07/11] split-ring: generalize text

2018-01-22 Thread Michael S. Tsirkin
Update generic text to talk about available/used buffers, not rings. Move some split-ring specific text to the correct section. Signed-off-by: Michael S. Tsirkin --- content.tex| 12 +--- split-ring.tex | 4 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/content

[virtio-dev] [PATCH v7 02/11] content: move ring text out to a separate file

2018-01-22 Thread Michael S. Tsirkin
Will be easier to manage this way. Signed-off-by: Michael S. Tsirkin --- content.tex| 499 + split-ring.tex | 498 2 files changed, 499 insertions(+), 498 deletions(-) create mod

[virtio-dev] [PATCH v7 05/11] content: generalize transport ring part naming

2018-01-22 Thread Michael S. Tsirkin
Replace descriptor table/available ring/used ring with descriptor area/driver area/device area in all transports. Document what's in which area. Signed-off-by: Michael S. Tsirkin --- content.tex| 61 ++ split-ring.tex | 6 +++--- 2 fi

[virtio-dev] [PATCH v7 06/11] content: generalize rest of text

2018-01-22 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- content.tex | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/content.tex b/content.tex index 9fc9673..5634c7d 100644 --- a/content.tex +++ b/content.tex @@ -1467,8 +1467,7 @@ All register values are organized as Little Endian

[virtio-dev] [PATCH v7 03/11] content: move virtqueue operation description

2018-01-22 Thread Michael S. Tsirkin
virtqueue operation description is specific to the virtqueue format. Move it out to split-ring.tex and update all references. Signed-off-by: Michael S. Tsirkin --- conformance.tex | 4 +- content.tex | 171 +++--- split-ring.tex | 175 ++

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Samudrala, Sridhar
On 1/22/2018 1:31 PM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:49:58PM -0800, Alexander Duyck wrote: On Wed, Jan 17, 2018 at 11:57 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 11:25:41AM -0800, Samudrala, Sridhar wrote: On 1/17/2018 11:02 AM, Michael S. Tsirkin wrote: O

[virtio-dev] Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-22 Thread Michael S. Tsirkin
On Mon, Jan 22, 2018 at 12:27:14PM -0800, Siwei Liu wrote: > First off, as mentioned in another thread, the model of stacking up > virt-bond functionality over virtio seems a wrong direction to me. > Essentially the migration process would need to carry over all guest > side configurations previous

Re: [virtio-dev] [RFC PATCH net-next v2 1/2] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-01-22 Thread Michael S. Tsirkin
On Wed, Jan 17, 2018 at 01:49:58PM -0800, Alexander Duyck wrote: > On Wed, Jan 17, 2018 at 11:57 AM, Michael S. Tsirkin wrote: > > On Wed, Jan 17, 2018 at 11:25:41AM -0800, Samudrala, Sridhar wrote: > >> > >> > >> On 1/17/2018 11:02 AM, Michael S. Tsirkin wrote: > >> > On Wed, Jan 17, 2018 at 10:1

[virtio-dev] Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-22 Thread Samudrala, Sridhar
On 1/22/2018 12:27 PM, Siwei Liu wrote: First off, as mentioned in another thread, the model of stacking up virt-bond functionality over virtio seems a wrong direction to me. Essentially the migration process would need to carry over all guest side configurations previously done on the VF/PT and

[virtio-dev] Re: [RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-01-22 Thread Siwei Liu
First off, as mentioned in another thread, the model of stacking up virt-bond functionality over virtio seems a wrong direction to me. Essentially the migration process would need to carry over all guest side configurations previously done on the VF/PT and get them moved to the new device being it

Re: [virtio-dev] Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-22 Thread Wei Wang
On 01/19/2018 08:39 PM, Michael S. Tsirkin wrote: On Fri, Jan 19, 2018 at 11:44:21AM +0800, Wei Wang wrote: On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: + vb->start_cmd_id = cmd_id; + queue_work(vb->bal