From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chas Williams <3chas3@gmail.com> Subject: [PATCH] net/ixgbe: update data->eth_link status on start Date: Tue, 13 Feb 2018 17:56:18 -0500 Message-ID: <20180213225618.15693-1-3chas3@gmail.com> Cc: wenzhuo.lu@intel.com, konstantin.ananyev@intel.com, "Charles (Chas) Williams" To: dev@dpdk.org Return-path: 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) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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