From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [RFC 03/10] virtio: allow starting with link down Date: Mon, 25 Aug 2014 19:07:49 -0700 Message-ID: <20140826020841.926122925@networkplumber.org> References: <20140826020746.062748014@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: dev-VfR2kkLFssw@public.gmane.org To: Ouyang Changchun Return-path: Content-Disposition: inline; filename=virtio-link-down-ok.patch List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Starting driver with link down should be ok, it is with every other driver. So just allow it. Signed-off-by: Stephen Hemminger --- lib/librte_pmd_virtio/virtio_ethdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/lib/librte_pmd_virtio/virtio_ethdev.c 2014-08-25 19:00:05.498525861 -0700 +++ b/lib/librte_pmd_virtio/virtio_ethdev.c 2014-08-25 19:00:05.494525839 -0700 @@ -969,14 +969,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);