qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] rtl8139: implement 8139cp link status


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH v2] rtl8139: implement 8139cp link status
Date: Fri, 14 Sep 2012 17:01:43 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120210 Thunderbird/10.0.1

On 09/14/2012 03:30 PM, Stefan Hajnoczi wrote:
On Fri, Sep 14, 2012 at 2:34 AM, Amos Kong<address@hidden>  wrote:
On 13/09/12 20:29, Stefan Hajnoczi wrote:
On Thu, Sep 13, 2012 at 9:51 AM, Amos Kong<address@hidden>  wrote:
Regarding migration: do we migrate the NetClient->link_down field? If
we only migrate the status register value then the link may actually
be up at the net.c level.

I tried to add 'MediaStatus' to 'struct RTL8139State', and update
'VMStateDescription vmstate_rtl8139', then the value of MediaStatus
will be migrated.

But the idea in v2 is better.
Migrating the NIC's media status is not enough.  Above I asked about
migrating nc->link_down, which determines whether net.c delivers
packets or drops them.

Your patch migrates the NIC's media status but I believe nc->link_down
isn't being migrated and the guest will therefore receive packets from
the host!  This could lead to unexpected results since the guest
thinks the link is down.

It's not a bug in your patch, but a larger issue that needs to be
addressed for all NICs that support migration.  (Unless I missed the
code that will migrate link_down.)

Stefan

A possible solution is to infer the nc->link_down from the media status register in the destination. It works without adding more codes net.c but need model specific callback functions.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]