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: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH] net: Fix link state inter-dependencies between NIC and backend
Date: Mon, 6 Apr 2015 08:16:36 +0200

On Thu, Apr 02, 2015 at 09:09:35AM -0400, Vlad Yasevich wrote:
> On 04/02/2015 05:21 AM, Stefan Hajnoczi wrote:
> > 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.
> 
> It causes problems when the user turns off link on the backend.  Problems 
> range from much
> longer boot up times on older VMs to Windows networks not working.
> 
> The problem is the if you turn off the link on the backend, the link to the 
> VM stays
> up but can't really reach the network.

IIUC the point of turning the link on the backend off was to do this for
short periods of time. This allows e.g. simulating network outages.

> Now, you could say "Don't do this" and document it, but it's still ugly and 
> causes
> issues.
> 
> We could disable the link state change on backends and only allow it on NIC 
> type devices.
> That would also solve this.
> 
> -vlad

It's too late for 2.3 though.

> > 
> > Stefan
> > 



reply via email to

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