d761fec5f6
- Applied all the fixes recommended by upstream for v2.2 stable release(bsc#981996). [+0008-app-testpmd-handle-SIGINT-and-SIGTERM.patch, +0009-bonding-copy-entire-config-structure-in-mode-4.patch, +0010-bonding-fix-active-slaves-with-no-primary.patch, +0011-bonding-do-not-ignore-multicast-in-mode-4.patch, +0012-bonding-do-not-activate-slave-twice.patch, +0013-bonding-fix-crash-when-no-slave-device.patch, +0014-bonding-fix-detach-of-bonded-device.patch, +0015-bonding-fix-detach-of-slave-devices.patch, +0016-eal-linux-support-built-in-kernel-modules.patch, +0017-examples-l3fwd-handle-SIGINT-and-SIGTERM.patch, +0018-fm10k-fix-VLAN-flag-in-scattered-Rx.patch, +0019-i40e-base-fix-driver-load-failure.patch, +0020-i40e-base-fix-missing-check-for-stopped-admin-queue.patch, +0021-i40e-fix-inverted-check-for-no-refcount.patch, +0022-i40e-fix-overflow.patch, +0023-i40e-fix-VLAN-filtering.patch, +0024-mempool-fix-leak-when-creation-fails.patch, +0025-pcap-fix-captured-frame-length.patch, +0026-port-fix-crash-for-ethdev-writer-nodrop.patch, +0027-port-fix-crash-for-ring-writer-nodrop.patch, +0028-tools-fix-unbinding-failure-handling.patch, +0029-tools-support-Python-3-in-bind-script.patch, +0030-tools-support-binding-to-built-in-kernel-modules.patch, +0031-vhost-fix-leak-of-fds-and-mmaps.patch, +0032-virtio-fix-crash-in-statistics-functions.patch, +0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch, +0034-virtio-fix-restart.patch] OBS-URL: https://build.opensuse.org/request/show/399089 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=3
70 lines
2.0 KiB
Diff
70 lines
2.0 KiB
Diff
From 9a0615af7746485d73d10561cc0743bc2fcd4bf7 Mon Sep 17 00:00:00 2001
|
|
From: Jianfeng Tan <jianfeng.tan@intel.com>
|
|
Date: Mon, 11 Jan 2016 14:16:13 +0800
|
|
Subject: [PATCH] virtio: fix restart
|
|
|
|
Fix the issue that virtio device cannot be started after stopped.
|
|
|
|
The field, hw->started, should be changed by virtio_dev_start/stop instead
|
|
of virtio_dev_close.
|
|
|
|
Fixes: a85786dc816f ("virtio: fix states handling during initialization")
|
|
|
|
Reported-by: Pavel Fedin <p.fedin@samsung.com>
|
|
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
|
|
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
|
|
Tested-by: Pavel Fedin <p.fedin@samsung.com>
|
|
---
|
|
drivers/net/virtio/virtio_ethdev.c | 14 +++++++++-----
|
|
1 file changed, 9 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
|
|
index 06bddd7..ec18fd0 100644
|
|
--- a/drivers/net/virtio/virtio_ethdev.c
|
|
+++ b/drivers/net/virtio/virtio_ethdev.c
|
|
@@ -478,11 +478,13 @@ virtio_dev_close(struct rte_eth_dev *dev)
|
|
|
|
PMD_INIT_LOG(DEBUG, "virtio_dev_close");
|
|
|
|
+ if (hw->started == 1)
|
|
+ virtio_dev_stop(dev);
|
|
+
|
|
/* reset the NIC */
|
|
if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)
|
|
vtpci_irq_config(hw, VIRTIO_MSI_NO_VECTOR);
|
|
vtpci_reset(hw);
|
|
- hw->started = 0;
|
|
virtio_dev_free_mbufs(dev);
|
|
virtio_free_queues(dev);
|
|
}
|
|
@@ -1159,10 +1161,9 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
|
|
if (rte_eal_process_type() == RTE_PROC_SECONDARY)
|
|
return -EPERM;
|
|
|
|
- if (hw->started == 1) {
|
|
- virtio_dev_stop(eth_dev);
|
|
- virtio_dev_close(eth_dev);
|
|
- }
|
|
+ /* Close it anyway since there's no way to know if closed */
|
|
+ virtio_dev_close(eth_dev);
|
|
+
|
|
pci_dev = eth_dev->pci_dev;
|
|
|
|
eth_dev->dev_ops = NULL;
|
|
@@ -1364,9 +1365,12 @@ static void
|
|
virtio_dev_stop(struct rte_eth_dev *dev)
|
|
{
|
|
struct rte_eth_link link;
|
|
+ struct virtio_hw *hw = dev->data->dev_private;
|
|
|
|
PMD_INIT_LOG(DEBUG, "stop");
|
|
|
|
+ hw->started = 0;
|
|
+
|
|
if (dev->data->dev_conf.intr_conf.lsc)
|
|
rte_intr_disable(&dev->pci_dev->intr_handle);
|
|
|
|
--
|
|
2.6.2
|
|
|