qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] net: Fix link state inter-dependencies between


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] net: Fix link state inter-dependencies between NIC and backend
Date: Thu, 2 Apr 2015 10:21:03 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Apr 02, 2015 at 08:11:15AM +0200, Michael S. Tsirkin wrote:
> On Wed, Apr 01, 2015 at 07:55:38PM -0400, Vladislav Yasevich wrote:
> > Commit 02d38fcb2caa4454cf4ed728d5908c3cc9ba47be
> >     net: Update netdev peer on link change
> > 
> > introduced a link state dependency between the backend
> > netdev and the nic.  If the admin turned off the link
> > on the backend, the nic link state was set to down because
> > the link had no access to the network at all.  This created
> > some inconsitet behavior for someone who wanted to play
> > around the links states.
> >  1) Turning off the nic link and then turning on the backend
> >     link (even if it was already on) would turn on the nic link
> >     again.
> >  2) Turning off the backend link and then turning on the nic
> >     link would turn on the link in the VM, but would not change
> >     the backend state resulting in a broken/unreachable network.
> > 
> > This patch attempts to correct these behaviors.  The patch treats
> > the nic-backend relationship as two ends of a wire.  Each end tracks
> > the administratively set link state in addition to actual link
> > state.  Thus is is possible to set link down at each end effectively
> > emulating plugging/unplugging the wire at either end.  The patch
> > continues to preserve the old behavior where setting just
> > nic side down does NOT impact the backend.
> > 
> > Signed-off-by: Vladislav Yasevich <address@hidden>
> 
> I never understood the point of
> 02d38fcb2caa4454cf4ed728d5908c3cc9ba47be.
> 
> If you want to tell guest link is down,
> just set the nic link down.
> 
> How about we just revert it?
> 
> Then one can change link state on each end
> independently, with no notification,
> and no state to track.

I agree.  The simple solution would be nice, unless you are aware of a
use case where it causes problems.

Stefan

Attachment: pgpNb6u3OavqI.pgp
Description: PGP signature


reply via email to

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