Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Anthony Liguori
On 02/24/2010 05:46 AM, Michael S. Tsirkin wrote: Ah, you mean telling the guest to switch features on and off: natureally this would require guest driver changes. This might be also non-trivial to implement. Consider a request that has been posted without checksum, suddenly we disable checksum

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Anthony Liguori
On 02/23/2010 09:14 PM, Paul Brook wrote: vnet_hdr is IMHO a really bad example to copy from. vnet_hdr leaks into the migration state via n->has_vnet_hdr. What this means is that if you want to migrate from -net tap -net nic,model=virtio to -net user -net nic,model=virtio, it will fail. This i

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Michael S. Tsirkin
On Wed, Feb 24, 2010 at 12:26:53PM +, Paul Brook wrote: > > > If we do have a software > > > fallback then the feature bit is just for backwards compatibility, and > > > should be enabled unconditionally (on current machine types). > > > > Software fallback might turn out to be slower than disa

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Paul Brook
> > If we do have a software > > fallback then the feature bit is just for backwards compatibility, and > > should be enabled unconditionally (on current machine types). > > Software fallback might turn out to be slower than disabling the feature > in the guest. For example, and extra pass over pac

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Michael S. Tsirkin
On Wed, Feb 24, 2010 at 11:30:18AM +, Paul Brook wrote: > > On Wed, Feb 24, 2010 at 03:14:25AM +, Paul Brook wrote: > > > > vnet_hdr is IMHO a really bad example to copy from. > > > > > > > > vnet_hdr leaks into the migration state via n->has_vnet_hdr. What this > > > > means is that if yo

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Paul Brook
> On Wed, Feb 24, 2010 at 03:14:25AM +, Paul Brook wrote: > > > vnet_hdr is IMHO a really bad example to copy from. > > > > > > vnet_hdr leaks into the migration state via n->has_vnet_hdr. What this > > > means is that if you want to migrate from -net tap -net > > > nic,model=virtio to -net us

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-23 Thread Michael S. Tsirkin
On Wed, Feb 24, 2010 at 03:14:25AM +, Paul Brook wrote: > > vnet_hdr is IMHO a really bad example to copy from. > > > > vnet_hdr leaks into the migration state via n->has_vnet_hdr. What this > > means is that if you want to migrate from -net tap -net nic,model=virtio > > to -net user -net nic

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-23 Thread Paul Brook
> vnet_hdr is IMHO a really bad example to copy from. > > vnet_hdr leaks into the migration state via n->has_vnet_hdr. What this > means is that if you want to migrate from -net tap -net nic,model=virtio > to -net user -net nic,model=virtio, it will fail. > > This is a hard problem to solve in q

[Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-01-25 Thread Anthony Liguori
On 01/25/2010 03:05 PM, Michael S. Tsirkin wrote: it *has* an int: struct EventNotifier { int fd; }; Yes, this would be a lot better. Regards, Anthony Liguori

[Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-01-25 Thread Michael S. Tsirkin
On Mon, Jan 25, 2010 at 03:00:16PM -0600, Anthony Liguori wrote: > On 01/25/2010 02:27 PM, Michael S. Tsirkin wrote: >> On Mon, Jan 25, 2010 at 01:58:08PM -0600, Anthony Liguori wrote: >> >>> On 01/11/2010 11:23 AM, Michael S. Tsirkin wrote: >>> start/stop backend on driver start/sto

[Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-01-25 Thread Michael S. Tsirkin
On Mon, Jan 25, 2010 at 03:00:16PM -0600, Anthony Liguori wrote: > On 01/25/2010 02:27 PM, Michael S. Tsirkin wrote: >> On Mon, Jan 25, 2010 at 01:58:08PM -0600, Anthony Liguori wrote: >> >>> On 01/11/2010 11:23 AM, Michael S. Tsirkin wrote: >>> start/stop backend on driver start/sto

[Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-01-25 Thread Anthony Liguori
On 01/25/2010 02:27 PM, Michael S. Tsirkin wrote: On Mon, Jan 25, 2010 at 01:58:08PM -0600, Anthony Liguori wrote: On 01/11/2010 11:23 AM, Michael S. Tsirkin wrote: start/stop backend on driver start/stop Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c | 40 +++

[Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-01-25 Thread Michael S. Tsirkin
On Mon, Jan 25, 2010 at 01:58:08PM -0600, Anthony Liguori wrote: > On 01/11/2010 11:23 AM, Michael S. Tsirkin wrote: >> start/stop backend on driver start/stop >> >> Signed-off-by: Michael S. Tsirkin >> --- >> hw/virtio-net.c | 40 >> 1 files changed, 4

[Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-01-25 Thread Anthony Liguori
On 01/11/2010 11:23 AM, Michael S. Tsirkin wrote: start/stop backend on driver start/stop Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c | 40 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c in