From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id DD30D2BAE; Wed, 19 Apr 2017 04:11:11 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2017 19:11:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,219,1488873600"; d="scan'208";a="91138647" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga005.fm.intel.com with ESMTP; 18 Apr 2017 19:11:09 -0700 Date: Wed, 19 Apr 2017 10:08:00 +0800 From: Yuanhan Liu To: dev@dpdk.org Cc: Maxime Coquelin , stable@dpdk.org Message-ID: <20170419020800.GR7333@yliu-dev.sh.intel.com> References: <1492151805-14086-1-git-send-email-yuanhan.liu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1492151805-14086-1-git-send-email-yuanhan.liu@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-stable] [PATCH] net/virtio: fix link status always being up X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2017 02:11:12 -0000 On Fri, Apr 14, 2017 at 02:36:45PM +0800, Yuanhan Liu wrote: > The virtio port link status will always be UP, even the port is stopped: > > testpmd> port stop 0 > Stopping ports... > Checking link statuses... > Port 0 Link Up - speed 10000 Mbps - full-duplex > Done > > The link status is queried by link_update callback when LSC is disabled. > Which in turn queries the "status" field. However, the "status" is > read-only. I couldn't think of some proper ways to change the status > without doing device reset. > > Instead of doing (the heavy) reset at stop, this patch introduced a flag, > which is set to 1 and 0 on start and stop, respectively. When it's set to > 0, the link status is set to DOWN unconditionally. > > Fixes: a85786dc816f ("virtio: fix states handling during initialization") > > Cc: stable@dpdk.org > Signed-off-by: Yuanhan Liu Applied to dpdk-next-virtio. --yliu