From patchwork Tue Aug 26 02:07:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 211 Return-Path: Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by dpdk.org (Postfix) with ESMTP id BC18E3975 for ; Tue, 26 Aug 2014 04:04:46 +0200 (CEST) Received: by mail-pd0-f169.google.com with SMTP id y10so21304215pdj.0 for ; Mon, 25 Aug 2014 19:08:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:user-agent:date:from:to:cc:subject :references:mime-version:content-type:content-disposition; bh=qOoawj5tGNj0t888b1FuODNY2Bt17sZRwPVdSRpYiQU=; b=Su/HhqcrkGSYxC6B/he+fxnt1+iCLSlu/sFq5KduO3kaH4nvGF15ICcFWkHSc25AP0 JtUd5ZgbZ0wWab877T5HPk23oXulMpenicKqlomphDqiRgZa9Qm0KJEjuY4gl5fgrUg5 MjdfK1p3/Sy9gmFIGUm8CPW5U63jUM+kYWf/2UuatFbnqhIYBDERsbmGkSsrfKmoCnRe FbxTc+aZw4+LI08FHIYXzUpSfFcB8XTwBanA8kX7OCsTGoFwH7v3czgYCZzq4RV9lWcV wwzBXrOI15E1X1Pgwx+elkahmVSPIrh/VMGBRwaIm0KzoGg2izzvSylp8yXxWRfeGzUI wDFQ== X-Gm-Message-State: ALoCoQkvbadnWNfZvMfBSkUwtuacuwI5JNsiHGWeRdepeUDKLdJ+0npg4UhC4WW4sy1SGAzT7uk7 X-Received: by 10.68.194.66 with SMTP id hu2mr6279486pbc.19.1409018923760; Mon, 25 Aug 2014 19:08:43 -0700 (PDT) Received: from localhost (static-50-53-65-80.bvtn.or.frontiernet.net. [50.53.65.80]) by mx.google.com with ESMTPSA id pd7sm1919998pdb.78.2014.08.25.19.08.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Aug 2014 19:08:43 -0700 (PDT) Message-Id: <20140826020841.926122925@networkplumber.org> User-Agent: quilt/0.63-1 Date: Mon, 25 Aug 2014 19:07:49 -0700 From: Stephen Hemminger To: Ouyang Changchun References: <20140826020746.062748014@networkplumber.org> MIME-Version: 1.0 Content-Disposition: inline; filename=virtio-link-down-ok.patch Cc: dev@dpdk.org Subject: [dpdk-dev] [RFC 03/10] virtio: allow starting with link down X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2014 02:04:47 -0000 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);