Received: from eggs.gnu.org ([2001:4830:134:3::10]:33443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdbJI-0003BK-Ce for qemu-devel@nongnu.org; Thu, 02 Apr 2015 05:21:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdbJD-0003Ao-Dz for qemu-devel@nongnu.org; Thu, 02 Apr 2015 05:21:12 -0400 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:33097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdbJD-0003AY-75 for qemu-devel@nongnu.org; Thu, 02 Apr 2015 05:21:07 -0400 Received: by wgoe14 with SMTP id e14so78813132wgo.0 for ; Thu, 02 Apr 2015 02:21:06 -0700 (PDT) Date: Thu, 2 Apr 2015 10:21:03 +0100 From: Stefan Hajnoczi Message-ID: <20150402092103.GE20229@stefanha-thinkpad.redhat.com> References: <1427932538-16059-1-git-send-email-vyasevic@redhat.com> <20150402080611-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AjmyJqqohANyBN/e" Content-Disposition: inline In-Reply-To: <20150402080611-mutt-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [PATCH] net: Fix link state inter-dependencies between NIC and backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Vladislav Yasevich , qemu-devel@nongnu.org, stefanha@redhat.com --AjmyJqqohANyBN/e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > >=20 > > 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. > >=20 > > 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. > >=20 > > Signed-off-by: Vladislav Yasevich >=20 > I never understood the point of > 02d38fcb2caa4454cf4ed728d5908c3cc9ba47be. >=20 > If you want to tell guest link is down, > just set the nic link down. >=20 > How about we just revert it? >=20 > 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 --AjmyJqqohANyBN/e Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVHQn/AAoJEJykq7OBq3PIDz8IAI205LJsQJmNTfHKBbUUNMJZ ZadYGJo7qr4p49oC4ZHktzpGU6E9qQItNXsd2ExFGXvIqiVrsiOPEukS1KYwFfGf xgmiwfBB+2swgE370ikhj3h4DAMkmUdC3cKPpNdkh+9xfdJd1u8Q8jpGV6uBrXQJ vtitMG5ajXctAJxsOCV1LoVqA+THkJF7F7oy21Ebr8PWKBd/SRZqBvinFQ539/mN mp7/t157oBYu5CV2df09IKoUH0sUmBoKJ+1TpTP1EZB/0IOtZhsv+045IxNuneDx /+abQMGF8v98KXA/kLmuAAjB6qY2hoop/EsdehKSNoWWpwNGBRlxFaH2a6LKot8= =eW9T -----END PGP SIGNATURE----- --AjmyJqqohANyBN/e--