virtio: allow starting with link down
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 9 Feb 2015 01:13:52 +0000 (09:13 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 20 Feb 2015 18:18:35 +0000 (19:18 +0100)
Starting driver with link down should be ok, it is with every
other driver. So just allow it.

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

index dc0c6b3..879f1c8 100644 (file)
@@ -1053,14 +1053,12 @@ virtio_dev_start(struct rte_eth_dev *dev)
                vtpci_read_dev_config(hw,
                                offsetof(struct virtio_net_config, status),
                                &status, sizeof(status));
-               if ((status & VIRTIO_NET_S_LINK_UP) == 0) {
+               if ((status & VIRTIO_NET_S_LINK_UP) == 0)
                        PMD_INIT_LOG(ERR, "Port: %d Link is DOWN",
                                     dev->data->port_id);
-                       return -EIO;
-               } else {
+               else
                        PMD_INIT_LOG(DEBUG, "Port: %d Link is UP",
                                     dev->data->port_id);
-               }
        }
        vtpci_reinit_complete(hw);