From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by dpdk.org (Postfix) with ESMTP id D895C1B29A for ; Tue, 13 Feb 2018 23:56:23 +0100 (CET) Received: by mail-qt0-f194.google.com with SMTP id f18so5547797qth.11 for ; Tue, 13 Feb 2018 14:56:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=nHEsfFgqVxsFB3FHndvcphLsXxVXhrqZIxiaN+RnuAc=; b=dHIAdiYR2lex1hq+W/RvYTiBFVMAD70jhD0GiPgjxX8k+CisQpQZm2/J/B60zmBWQL AYRbx+Ky2KYnVqBLjADnMUKpqRftI/kCUdkgDCNC7AT9O9ssS50HEj9086x1yKFUCv3s 2MizD8/h4K9+gkMGF1pFYWkJaoIR3CBFyHoY3lODMPxlYtLAucAYy4VHrGGx6N8AA3EX zL11pW3EOjxB0r+OSzE+h/PjMcTsE8CvTizZeRYyCUMt3oRkPy7k/1MaNyFH4+aCziwD AlqMWJZkR3m9ZMiK8hspl8Qq4ER5JzbD8xMuom96VuSkhMGtABDMCqmfbr5kr7WGI3vz AmdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nHEsfFgqVxsFB3FHndvcphLsXxVXhrqZIxiaN+RnuAc=; b=dzxLb5rOmUirmCNUJebi0bo61aZf5yClSs9agwEFGMjaR8uyWL+9fiz0VIlTPg5i8S F8lvetAzb8au68kSdcqW1uVZm0vKd8GhBuiyGg4BdPQ1ahhx13gPhfI9MTJX7B+VfQ+Q vYU9RQHdNJzrxUMQq0STojtPTBH2h5loEZuIAuJm1GW9VhfTabJUKA7sAQ+jtF5RfGlk KxdMaYcwXa7v4Jgh7TAexi6cdN72HRuuHwbKEO9Qb3rrpaXenSiEQiXkWK3MhqwpZorZ J5MFxd4/6nD9iaMgjz9d+ZnZpSGHxx1Z9qXRFsWnmmfAWjsmeoLGCBp78qdpKNdiqYE/ rjHA== X-Gm-Message-State: APf1xPAmMpUliCMiqWz9AB8o5IIWpvMG3W43DKkwic9+vG6bDMGpvpE5 Ceppj5h0zwoJ2PcGgbdhakUlkg== X-Google-Smtp-Source: AH8x2241T5430iY/4BQeG1d4Yl4c9YPV+UArXQBdAePg6LGiU7ZkblKuqsQH3sHG/bpmhxrAF53U4Q== X-Received: by 10.200.26.196 with SMTP id h4mr4537170qtk.223.1518562583203; Tue, 13 Feb 2018 14:56:23 -0800 (PST) Received: from monolith.home (pool-173-79-224-159.washdc.fios.verizon.net. [173.79.224.159]) by smtp.gmail.com with ESMTPSA id f128sm7717374qkc.36.2018.02.13.14.56.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Feb 2018 14:56:22 -0800 (PST) From: Chas Williams <3chas3@gmail.com> To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, konstantin.ananyev@intel.com, "Charles (Chas) Williams" Date: Tue, 13 Feb 2018 17:56:18 -0500 Message-Id: <20180213225618.15693-1-3chas3@gmail.com> X-Mailer: git-send-email 2.9.5 Subject: [dpdk-dev] [PATCH] net/ixgbe: update data->eth_link status on start X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Feb 2018 22:56:24 -0000 From: "Charles (Chas) Williams" dev->data->eth_link isn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, call ixgbe_dev_link_update() to ensure we have a valid status. Signed-off-by: Chas Williams --- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 37eb668..27d29dc 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev) if (err) goto error; + ixgbe_dev_link_update(dev, 0); + skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) ixgbevf_dev_rxtx_start(dev); + ixgbevf_dev_link_update(dev, 0); + /* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple(intr_handle) && dev->data->dev_conf.intr_conf.rxq) { -- 2.9.5