qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Vladislav Yasevich <vyasevic@redhat.com>,
	qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] net: Fix link state inter-dependencies between NIC and backend
Date: Thu, 2 Apr 2015 10:21:03 +0100	[thread overview]
Message-ID: <20150402092103.GE20229@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20150402080611-mutt-send-email-mst@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]

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 <vyasevic@redhat.com>
> 
> 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 #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-04-02  9:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 23:55 [Qemu-devel] [PATCH] net: Fix link state inter-dependencies between NIC and backend Vladislav Yasevich
2015-04-02  6:11 ` Michael S. Tsirkin
2015-04-02  9:21   ` Stefan Hajnoczi [this message]
2015-04-02 13:09     ` Vlad Yasevich
2015-04-06  6:16       ` Michael S. Tsirkin
2015-04-02  9:21 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150402092103.GE20229@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vyasevic@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).