virtio: fix states handling during initialization
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 9 Feb 2015 01:13:58 +0000 (09:13 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 20 Feb 2015 18:19:05 +0000 (19:19 +0100)
commita85786dc816f5c8a9d9e49ac1ce7efd6b94335f3
tree651c355bcbe55990842681162f0265bab6384de1
parentfb9d1704964574ac3d3ea68669320974a6407007
virtio: fix states handling during initialization

Change order of initialization to match Linux kernel.
Don't blow away control queue by doing reset when stopped.

Calling dev_stop then dev_start would not work.
Dev_stop was calling virtio reset and that would clear all queues
and clear all feature negotiation.
Resolved by only doing reset on device removal.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
lib/librte_pmd_virtio/virtio_ethdev.c
lib/librte_pmd_virtio/virtio_pci.c
lib/librte_pmd_virtio/virtio_pci.h