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: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2] rtl8139: implement 8139cp link status
Date: Fri, 14 Sep 2012 08:30:15 +0100

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



reply via email to

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