[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net
Michael S. Tsirkin
Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend
Wed, 24 Feb 2010 13:46:06 +0200
On Wed, Feb 24, 2010 at 11:30:18AM +0000, Paul Brook wrote:
> > On Wed, Feb 24, 2010 at 03:14:25AM +0000, 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 is a hard problem to solve in qemu though because it would require
> > > > that we implement software GSO which so far, no one has stepped up to
> > > > do.
> > >
> > > Or make virtio-net pass this on to the guest, and have that deal with the
> > > problem.
> > This is exacly what we do, via feature bits.
> AFAIK we only have static feature bits. There aren't useful for anything that
> the user may change on the fly (or via migration).
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 support. Guest will need a way to handle
that. Guest OSes might also not be prepared to handle device features
> If you don't have a fallback implementation then the guest must be able to
> cope with this feature disappearing without warning.
Instead, we simply fail migration at the moment. We also use machine
type to let users force some level of homogenuity in the cluster.
> 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 packet might cause extra CPU
cache thrashing. In that case, it's not obvious whether enabling it
unconditionally will turn out to be a good idea. But we'll have to have
that code to be able to tell.
Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend, Anthony Liguori, 2010/02/24