From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-io0-f195.google.com (mail-io0-f195.google.com [209.85.223.195]) by dpdk.org (Postfix) with ESMTP id DEFFA4F90 for ; Fri, 30 Mar 2018 19:21:37 +0200 (CEST) Received: by mail-io0-f195.google.com with SMTP id x77so5440150ioi.2 for ; Fri, 30 Mar 2018 10:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=WdSFR7JgL8fGRZ5L9tthXNMEiTQRb3/HzQZgBv87uXA=; b=EqnVqMEA5zmJwPk4+bbHUfuxPlO/zCDZCtWuWu5rh2jJH8AwGNKCbJyvER4OciELzO goA5YspOXpF6GPA+9tB6WRc6xzDclI/1cVR1Q99TMO5bdNt106SdBl4wZ+0i8Lecfi+f /Bl1hWUaP96SLvheVOpemQSjTsxFOV5UNHvJ0/jLMfRQo203fiCJJ0HRiJABnAKvRsv9 3LJNUzT670cajCpxT8dof9kb/eq68F8FuUYh4EWgDQOM8B2HshxyRBCsz9RJP6Ns/diz JwTrSNTjSPjjG5LBOxgr5sozA01PhhCnurlF4Yq5yCNPwxGv2TY6DTGAJsVn4bMf/R4u w9Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=WdSFR7JgL8fGRZ5L9tthXNMEiTQRb3/HzQZgBv87uXA=; b=lyOZw29qOzH2lahtkP9rX2s0nN1zs7mMrpXnbdEuMVfUCFv4FUjZMsSkZv+0PRSMGA EuMrl8faiZDvwuDYj6cPpS4UKW780i/fSUPMpGL3YHz+jB7HK1PVlge6a9EGd/lvhhBU 2SuECJb4rs4FidNG2DWOGL4Xp0XEFiHGrmtp+K2flJv1ebHT7/dNosRLYCpezGxyWZbD UU3HSLyBF0z4tuNbedCUadmfaPPKY9iLfNR/HTFeSa9VPZ7Dwsmp6L0N5dGGjjutTnEl 6BGCybNLVEWdUB3ZGT+EqqVmXLOJy1Wz+XqPyX1nMf/RYfAU3RzR3xyg5u9x6jxI5IpL FIxA== X-Gm-Message-State: AElRT7HiQb7o9SOaCxAWjKq0/P5WvC9EaiQVkU6bHMhbxRNaH65cE7Wi vDWc1jFxpcH8tLk/jpSFaK+WqpTre4xctvc1Lno= X-Google-Smtp-Source: AG47ELsg+nTHvzOL0tieTTbM2pLZQi+MBruq83fUBTkAsCUESzv5o8sNffx4AHvhFiPcEA3QaH8EPc7uINHhku0Z5Q4= X-Received: by 10.107.198.134 with SMTP id w128mr54995483iof.50.1522430496983; Fri, 30 Mar 2018 10:21:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.2.8 with HTTP; Fri, 30 Mar 2018 10:21:36 -0700 (PDT) In-Reply-To: References: <20180213225618.15693-1-3chas3@gmail.com> From: Chas Williams <3chas3@gmail.com> Date: Fri, 30 Mar 2018 13:21:36 -0400 Message-ID: To: "Zhang, Helin" Cc: "dev@dpdk.org" , "Lu, Wenzhuo" , "Ananyev, Konstantin" , "Charles (Chas) Williams" Content-Type: text/plain; charset="UTF-8" Subject: Re: [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: Fri, 30 Mar 2018 17:21:38 -0000 On Fri, Mar 30, 2018 at 12:30 PM, Zhang, Helin wrote: > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chas Williams >> Sent: Wednesday, February 14, 2018 6:56 AM >> To: dev@dpdk.org >> Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams >> Subject: [dpdk-dev] [PATCH] net/ixgbe: update data->eth_link status on start >> >> 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); > It is called in rte_eth_dev_start() if lsc is not enabled, > and it is not needed here to avoid any duplication. > BTW, did you see any issue or just check the code? Thanks! Yes, I see an issue with bonding. If LSC is enabled, then link_status isn't set until the first interrupt to update the link status. If a link is down, this interrupt may never happen result in link_status being somewhat undefined. > > /Helin > >> + >> 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 >