All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel]  [question] live migration about redir-usb
@ 2018-11-26  2:29 linzhecheng
  2018-11-26  6:46 ` Gerd Hoffmann
  0 siblings, 1 reply; 6+ messages in thread
From: linzhecheng @ 2018-11-26  2:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, wangxin (U), Zhoujian (jay)

Hi, Gerd
I have read this discussion thread about live migration in tcp mode.
https://bugzilla.redhat.com/show_bug.cgi?id=1254971
Only spice redirection supports live migration not, but why not tcp mode?
Does usbredirserver not support it or qemu?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [question] live migration about redir-usb
  2018-11-26  2:29 [Qemu-devel] [question] live migration about redir-usb linzhecheng
@ 2018-11-26  6:46 ` Gerd Hoffmann
  2018-11-26  6:53   ` linzhecheng
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2018-11-26  6:46 UTC (permalink / raw)
  To: linzhecheng; +Cc: qemu-devel, wangxin (U), Zhoujian (jay)

On Mon, Nov 26, 2018 at 02:29:12AM +0000, linzhecheng wrote:
> Hi, Gerd
> I have read this discussion thread about live migration in tcp mode.
> https://bugzilla.redhat.com/show_bug.cgi?id=1254971
> Only spice redirection supports live migration not, but why not tcp mode?
> Does usbredirserver not support it or qemu?

usbredirserver.

spice client holds a connection to both source and target host for a
seamless connection handover, and usb-redir needs that too to hand over
the usb device without interruption.

usbredirserver can't do that.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [question] live migration about redir-usb
  2018-11-26  6:46 ` Gerd Hoffmann
@ 2018-11-26  6:53   ` linzhecheng
  2018-11-26  8:49     ` Gerd Hoffmann
  0 siblings, 1 reply; 6+ messages in thread
From: linzhecheng @ 2018-11-26  6:53 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, wangxin (U), Zhoujian (jay)



> -----Original Message-----
> From: Gerd Hoffmann [mailto:kraxel@redhat.com]
> Sent: Monday, November 26, 2018 2:46 PM
> To: linzhecheng <linzhecheng@huawei.com>
> Cc: qemu-devel@nongnu.org; wangxin (U) <wangxinxin.wang@huawei.com>;
> Zhoujian (jay) <jianjay.zhou@huawei.com>
> Subject: Re: [Qemu-devel] [question] live migration about redir-usb
> 
> On Mon, Nov 26, 2018 at 02:29:12AM +0000, linzhecheng wrote:
> > Hi, Gerd
> > I have read this discussion thread about live migration in tcp mode.
> > https://bugzilla.redhat.com/show_bug.cgi?id=1254971
> > Only spice redirection supports live migration not, but why not tcp mode?
> > Does usbredirserver not support it or qemu?
> 
> usbredirserver.
> 
> spice client holds a connection to both source and target host for a seamless
> connection handover, and usb-redir needs that too to hand over the usb device
> without interruption.
> 
> usbredirserver can't do that.
So if we realize the handover between src and dst chardev of qemu, we can do live migration in tcp mode.
Is it similar with openvswtich who both accept the connection of src and dst qemu?
> 
> cheers,
>   Gerd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [question] live migration about redir-usb
  2018-11-26  6:53   ` linzhecheng
@ 2018-11-26  8:49     ` Gerd Hoffmann
  2018-11-26  9:07       ` linzhecheng
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2018-11-26  8:49 UTC (permalink / raw)
  To: linzhecheng; +Cc: qemu-devel, wangxin (U), Zhoujian (jay)

On Mon, Nov 26, 2018 at 06:53:23AM +0000, linzhecheng wrote:
> 
> 
> > -----Original Message-----
> > From: Gerd Hoffmann [mailto:kraxel@redhat.com]
> > Sent: Monday, November 26, 2018 2:46 PM
> > To: linzhecheng <linzhecheng@huawei.com>
> > Cc: qemu-devel@nongnu.org; wangxin (U) <wangxinxin.wang@huawei.com>;
> > Zhoujian (jay) <jianjay.zhou@huawei.com>
> > Subject: Re: [Qemu-devel] [question] live migration about redir-usb
> > 
> > On Mon, Nov 26, 2018 at 02:29:12AM +0000, linzhecheng wrote:
> > > Hi, Gerd
> > > I have read this discussion thread about live migration in tcp mode.
> > > https://bugzilla.redhat.com/show_bug.cgi?id=1254971
> > > Only spice redirection supports live migration not, but why not tcp mode?
> > > Does usbredirserver not support it or qemu?
> > 
> > usbredirserver.
> > 
> > spice client holds a connection to both source and target host for a seamless
> > connection handover, and usb-redir needs that too to hand over the usb device
> > without interruption.
> > 
> > usbredirserver can't do that.

> So if we realize the handover between src and dst chardev of qemu, we
> can do live migration in tcp mode.

> Is it similar with openvswtich who both accept the connection of src and dst qemu?

It is more complicated than just accepting two connections.  Network can
just throw away packages if needed, typicaly they will be resent by the
guest.  That doesn't work with usb, you must properly keep track of
every in-flight usb transfer.

What exactly do you want do?

Maybe it will be simpler to build a stripped-down spice client with only
the usb redir code, which doesn't require a UI and which you can start
from the command line like usbredirserver?  Most spice client code is
actually in shared libraries, so it should not be too much work.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [question] live migration about redir-usb
  2018-11-26  8:49     ` Gerd Hoffmann
@ 2018-11-26  9:07       ` linzhecheng
  2018-11-26 10:04         ` Gerd Hoffmann
  0 siblings, 1 reply; 6+ messages in thread
From: linzhecheng @ 2018-11-26  9:07 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, wangxin (U), Zhoujian (jay)



> -----Original Message-----
> From: Gerd Hoffmann [mailto:kraxel@redhat.com]
> Sent: Monday, November 26, 2018 4:50 PM
> To: linzhecheng <linzhecheng@huawei.com>
> Cc: qemu-devel@nongnu.org; wangxin (U) <wangxinxin.wang@huawei.com>;
> Zhoujian (jay) <jianjay.zhou@huawei.com>
> Subject: Re: [Qemu-devel] [question] live migration about redir-usb
> 
> On Mon, Nov 26, 2018 at 06:53:23AM +0000, linzhecheng wrote:
> >
> >
> > > -----Original Message-----
> > > From: Gerd Hoffmann [mailto:kraxel@redhat.com]
> > > Sent: Monday, November 26, 2018 2:46 PM
> > > To: linzhecheng <linzhecheng@huawei.com>
> > > Cc: qemu-devel@nongnu.org; wangxin (U)
> <wangxinxin.wang@huawei.com>;
> > > Zhoujian (jay) <jianjay.zhou@huawei.com>
> > > Subject: Re: [Qemu-devel] [question] live migration about redir-usb
> > >
> > > On Mon, Nov 26, 2018 at 02:29:12AM +0000, linzhecheng wrote:
> > > > Hi, Gerd
> > > > I have read this discussion thread about live migration in tcp mode.
> > > > https://bugzilla.redhat.com/show_bug.cgi?id=1254971
> > > > Only spice redirection supports live migration not, but why not tcp mode?
> > > > Does usbredirserver not support it or qemu?
> > >
> > > usbredirserver.
> > >
> > > spice client holds a connection to both source and target host for a
> > > seamless connection handover, and usb-redir needs that too to hand
> > > over the usb device without interruption.
> > >
> > > usbredirserver can't do that.
> 
> > So if we realize the handover between src and dst chardev of qemu, we
> > can do live migration in tcp mode.
> 
> > Is it similar with openvswtich who both accept the connection of src and dst
> qemu?
> 
> It is more complicated than just accepting two connections.  Network can just
> throw away packages if needed, typicaly they will be resent by the guest.  That
> doesn't work with usb, you must properly keep track of every in-flight usb
> transfer.
Why will network throw away packets? I think inflight usb
 Packets have already been tracked by redir-usb in live migration. What's more do we have to do?

> 
> What exactly do you want do?
Realize live migration for redir-usb in tcp mode.
> 
> Maybe it will be simpler to build a stripped-down spice client with only the usb
> redir code, which doesn't require a UI and which you can start from the
> command line like usbredirserver?  Most spice client code is actually in shared
> libraries, so it should not be too much work.
> 
> cheers,
>   Gerd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [question] live migration about redir-usb
  2018-11-26  9:07       ` linzhecheng
@ 2018-11-26 10:04         ` Gerd Hoffmann
  0 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2018-11-26 10:04 UTC (permalink / raw)
  To: linzhecheng; +Cc: qemu-devel, wangxin (U), Zhoujian (jay)

On Mon, Nov 26, 2018 at 09:07:32AM +0000, linzhecheng wrote:
> 
> 
> > -----Original Message-----
> > From: Gerd Hoffmann [mailto:kraxel@redhat.com]
> > Sent: Monday, November 26, 2018 4:50 PM
> > To: linzhecheng <linzhecheng@huawei.com>
> > Cc: qemu-devel@nongnu.org; wangxin (U) <wangxinxin.wang@huawei.com>;
> > Zhoujian (jay) <jianjay.zhou@huawei.com>
> > Subject: Re: [Qemu-devel] [question] live migration about redir-usb
> > 
> > On Mon, Nov 26, 2018 at 06:53:23AM +0000, linzhecheng wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Gerd Hoffmann [mailto:kraxel@redhat.com]
> > > > Sent: Monday, November 26, 2018 2:46 PM
> > > > To: linzhecheng <linzhecheng@huawei.com>
> > > > Cc: qemu-devel@nongnu.org; wangxin (U)
> > <wangxinxin.wang@huawei.com>;
> > > > Zhoujian (jay) <jianjay.zhou@huawei.com>
> > > > Subject: Re: [Qemu-devel] [question] live migration about redir-usb
> > > >
> > > > On Mon, Nov 26, 2018 at 02:29:12AM +0000, linzhecheng wrote:
> > > > > Hi, Gerd
> > > > > I have read this discussion thread about live migration in tcp mode.
> > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1254971
> > > > > Only spice redirection supports live migration not, but why not tcp mode?
> > > > > Does usbredirserver not support it or qemu?
> > > >
> > > > usbredirserver.
> > > >
> > > > spice client holds a connection to both source and target host for a
> > > > seamless connection handover, and usb-redir needs that too to hand
> > > > over the usb device without interruption.
> > > >
> > > > usbredirserver can't do that.
> > 
> > > So if we realize the handover between src and dst chardev of qemu, we
> > > can do live migration in tcp mode.
> > 
> > > Is it similar with openvswtich who both accept the connection of src and dst
> > qemu?
> > 
> > It is more complicated than just accepting two connections.  Network can just
> > throw away packages if needed, typicaly they will be resent by the guest.  That
> > doesn't work with usb, you must properly keep track of every in-flight usb
> > transfer.
> Why will network throw away packets?

It has the option to do that if needed, which can simplify the software
design.

> I think inflight usb Packets have already been tracked by redir-usb in
> live migration. What's more do we have to do?

spice client also knows the live migration state, specifically whenever
the guest is still running on the source machine (usb replies should be
sent to source then) or whenever it is already stopped for the final
live migration stage (usb replies must be queued up then and wait until
the guest starts running on the target machine).  That information
travels over the main channel though, not the usb-redir channel.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-26 10:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26  2:29 [Qemu-devel] [question] live migration about redir-usb linzhecheng
2018-11-26  6:46 ` Gerd Hoffmann
2018-11-26  6:53   ` linzhecheng
2018-11-26  8:49     ` Gerd Hoffmann
2018-11-26  9:07       ` linzhecheng
2018-11-26 10:04         ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.