From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 29CE3A2EDB for ; Mon, 30 Sep 2019 13:06:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 12A09324D; Mon, 30 Sep 2019 13:06:32 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id EFD69B62 for ; Mon, 30 Sep 2019 13:06:29 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id m18so12239882wmc.1 for ; Mon, 30 Sep 2019 04:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vNy0BcyXxm12FTWHm35o6SJWMt81wwLgCYKLQhLwF1g=; b=IvsanXgZHScX5V5l9KfQXmcfNO92p4n8lOND6K3Ull8sX4KOGvtNJARacXW1jP9Xwr Kgm7KKYvIR6CcAlBmX6J5V21Y7sNVNxV7zGLRKtiUMk/YiMRtGvwNfQRqwQXtxckamwZ Wuq/V6kXUxfKx+vBo3oldhNlI/y3TzdmOMVFC2mcxura/4ynaswoDDjvH29R4fYmrK/t 61BTdavRD/D/hS+xkdP2PEWTzFllDi7BbMnWArVBPsMkwdNSEDNXMZJeYAYgNhxtbZTX mVjoMf38WCn5LN0199qYiw2YZqUuuu/Ptiq4jtQOjPVs/D8O8ollFBqc5wKpwkfM4P19 IlyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vNy0BcyXxm12FTWHm35o6SJWMt81wwLgCYKLQhLwF1g=; b=TUANAfKxhuKrYlcyzwY5lMGOX+JTUGFnteJvhBcDyO7367lwFiHqSrpech9r2lWy+Y zQebjJiX1TRypsL2EvQtbQlmhDkRb+/9UB9z7XgG5c+KjjzjUocZia4INmDyudk9qhag pKfwp/58kMyaq3F0mUMh3BkgXK6wZGkRpKI5/EY8Bi/WkwOV6Kg/jYA7GMaKKnNrUBc/ chsB1S7mpbgJdiXdHRm6lvWQrZvj1+OCVLqek/bK6Gw463l19LfjimKeJIZOCzu13mYH H4tcQON9bQRtTHZxa2bCv9wIhRs+UJjFyAHWPi0Uykf3EqbN6ynQd7beBUG29J1qNk9y iNtg== X-Gm-Message-State: APjAAAVasdG4tNpudTZuBcSG9nRepcbbZGFoXjI6zwShcsPjhOms4YBa C4GxD4EsuBrQ8rfXdBLDLuwo X-Google-Smtp-Source: APXvYqyP5Y9fgL0fh1WL8MNJR3yZR3iE9c7yYokZ1JWvfQehQahM1BDLiIrRDW4/qgNSwLEVELWeYA== X-Received: by 2002:a1c:7ed7:: with SMTP id z206mr17968209wmc.124.1569841589640; Mon, 30 Sep 2019 04:06:29 -0700 (PDT) Received: from [10.16.0.208] (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id u83sm28627989wme.0.2019.09.30.04.06.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Sep 2019 04:06:29 -0700 (PDT) To: Ye Xiaolong , "Zhang, Qi Z" Cc: "dev@dpdk.org" , Guo Fengtian , Thomas Monjalon , "stable@dpdk.org" , "Lu, Wenzhuo" , "Ananyev, Konstantin" References: <039ED4275CED7440929022BC67E7061153D97B33@SHSMSX105.ccr.corp.intel.com> <20190930105845.GJ112560@intel.com> From: Thierry Herbelot Message-ID: <70c23d54-7412-4ff0-2880-284d30eb5e6c@6wind.com> Date: Mon, 30 Sep 2019 13:06:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20190930105845.GJ112560@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 1/1] net/ixgbevf: fix stats update after a PF reset 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 9/30/19 12:58 PM, Ye Xiaolong wrote: > Hi, Thierry & Fengtian > > Any update about this patch according to Qi's comment? Hello, Xiaolong I agreee with Qi's comment: this patch solves one issue, but causes another problem. I am completely open to any suggestion about how to retrieve the PF status from the VF device. Regards Thierry > > Thanks, > Xiaolong > > On 09/17, Zhang, Qi Z wrote: >> >> >>> -----Original Message----- >>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thierry Herbelot >>> Sent: Thursday, September 12, 2019 12:01 AM >>> To: dev@dpdk.org >>> Cc: Guo Fengtian ; Thomas Monjalon >>> ; stable@dpdk.org; Lu, Wenzhuo >>> ; Ananyev, Konstantin >>> >>> Subject: [dpdk-dev] [PATCH 1/1] net/ixgbevf: fix stats update after a PF reset >>> >>> From: Guo Fengtian >>> >>> When PF is set down, in VF, the value of stats register is zero. >>> So only increase stats when it's non zero. >>> >>> Fixes: af75078fece3 ('first public release') >>> Cc: stable@dpdk.org >>> Cc: wenzhuo.lu@intel.com >>> Cc: konstantin.ananyev@intel.com >>> >>> Signed-off-by: Guo Fengtian >>> --- >>> drivers/net/ixgbe/ixgbe_ethdev.c | 6 ++++-- >>> 1 file changed, 4 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c >>> b/drivers/net/ixgbe/ixgbe_ethdev.c >>> index 7eb3d0567b58..27c540f60563 100644 >>> --- a/drivers/net/ixgbe/ixgbe_ethdev.c >>> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c >>> @@ -385,7 +385,8 @@ static void ixgbe_l2_tunnel_conf(struct rte_eth_dev >>> *dev); >>> #define UPDATE_VF_STAT(reg, last, cur) \ >>> { \ >>> uint32_t latest = IXGBE_READ_REG(hw, reg); \ >>> - cur += (latest - last) & UINT_MAX; \ >>> + if (latest) \ >>> + cur += (latest - last) & UINT_MAX; \ >> >> There is still a chance that PF is up but the latest reg read returns 0, since it's a cyclic counter, is any way to check the PF status directly? >> >>> last = latest; \ >>> } >>> >>> @@ -394,7 +395,8 @@ static void ixgbe_l2_tunnel_conf(struct rte_eth_dev >>> *dev); >>> u64 new_lsb = IXGBE_READ_REG(hw, lsb); \ >>> u64 new_msb = IXGBE_READ_REG(hw, msb); \ >>> u64 latest = ((new_msb << 32) | new_lsb); \ >>> - cur += (0x1000000000LL + latest - last) & 0xFFFFFFFFFLL; \ >>> + if (latest) \ >>> + cur += (0x1000000000LL + latest - last) & 0xFFFFFFFFFLL;\ >>> last = latest; \ >>> } >>> >>> -- >>> 2.20.1 >> -- Thierry Herbelot 6WIND Senior Software Engineer Tel: +33 1 39 30 92 61 Fax: +33 1 39 30 92 11 thierry.herbelot@6wind.com www.6wind.com Immeuble Central Gare - Bât C 1, place Charles de Gaulle 78180 Montigny-le-Bretonneux, France Ce courriel ainsi que toutes les pièces jointes, est uniquement destiné à son ou ses destinataires. Il contient des informations confidentielles qui sont la propriété de 6WIND. Toute révélation, distribution ou copie des informations qu'il contient est strictement interdite. Si vous avez reçu ce message par erreur, veuillez immédiatement le signaler à l'émetteur et détruire toutes les données reçues This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to 6WIND. All unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.