From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6F17668C5 for ; Tue, 2 May 2017 11:36:27 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2017 02:36:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,404,1488873600"; d="scan'208";a="1163483142" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga002.fm.intel.com with ESMTP; 02 May 2017 02:36:26 -0700 From: Yuanhan Liu To: Jianfeng Tan Cc: Yuanhan Liu , dpdk stable Date: Tue, 2 May 2017 17:32:11 +0800 Message-Id: <1493717548-12434-10-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1493717548-12434-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1493717548-12434-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'net/virtio: fix link status always down' has been queued to LTS release 16.11.2 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: Tue, 02 May 2017 09:36:27 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/07/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 93a0820c7d7a3864da073d3fe49cf8b4cf8ee3bb Mon Sep 17 00:00:00 2001 From: Jianfeng Tan Date: Thu, 27 Apr 2017 07:35:39 +0000 Subject: [PATCH] net/virtio: fix link status always down [ upstream commit 58d9fe4000ee918b1d7f0260191349dd2f13ef02 ] The virtio port link status will always be DOWN: The commit aa9f06061765 ("net/virtio: fix link status always being up") introduces a flag to help checking the status. If this flag is not set, status will be always down. However, in dev start, this flag is set after link status update, then we miss the chance to change the status to UP in dev start. To fix this bug, we simply move the link status update after the flag setting so that the status can be correctly updated. Fixes: aa9f06061765 ("net/virtio: fix link status always being up") Signed-off-by: Jianfeng Tan Acked-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index d2256f7..d430093 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1550,9 +1550,6 @@ virtio_dev_start(struct rte_eth_dev *dev) } } - /* Initialize Link state */ - virtio_dev_link_update(dev, 0); - /*Notify the backend *Otherwise the tap backend might already stop its queue due to fullness. *vhost backend will have no chance to be waked up @@ -1581,8 +1578,12 @@ virtio_dev_start(struct rte_eth_dev *dev) txvq = dev->data->tx_queues[i]; VIRTQUEUE_DUMP(txvq->vq); } + hw->started = 1; + /* Initialize Link state */ + virtio_dev_link_update(dev, 0); + return 0; } -- 1.9.0