[dpdk-stable] patch 'net/virtio: fix link status always down' has been queued to LTS release 16.11.2

Yuanhan Liu yuanhan.liu at linux.intel.com
Tue May 2 11:32:11 CEST 2017


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 <jianfeng.tan at intel.com>
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 <jianfeng.tan at intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
---
 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



More information about the stable mailing list