From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH] net/ixgbevf: fix stats update after a PF reset Date: Thu, 16 Feb 2017 17:49:22 +0100 Message-ID: <20170216174922.720f83b9@platinum> References: <1484154254-31387-1-git-send-email-olivier.matz@6wind.com> <20170206145858.41447b6e@platinum> <49759EB36A64CF4892C1AFEC9231E8D63A3598F0@PGSMSX106.gar.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" , "Zhang, Helin" , "Ananyev, Konstantin" , Guo Fengtian , "stable@dpdk.org" To: "Dai, Wei" Return-path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 6BD7F98 for ; Thu, 16 Feb 2017 17:49:25 +0100 (CET) Received: by mail-wm0-f48.google.com with SMTP id r141so19850792wmg.1 for ; Thu, 16 Feb 2017 08:49:25 -0800 (PST) In-Reply-To: <49759EB36A64CF4892C1AFEC9231E8D63A3598F0@PGSMSX106.gar.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Wei, On Thu, 9 Feb 2017 14:50:05 +0000, "Dai, Wei" wrote: > > -----Original Message----- > > From: Dai, Wei > > Sent: Thursday, February 9, 2017 10:38 PM > > To: 'Olivier Matz' ; dev@dpdk.org; Zhang, > > Helin ; Ananyev, Konstantin > > > > Cc: Guo Fengtian ; stable@dpdk.org > > Subject: RE: [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after > > a PF reset > > > > The stats register can rewind to zero when the port is running for > > a long period. So I am afraid that this check is not always correct. > > Why not introduce a variable to directly indicate whether the > > resulted stats should be updated or not. > > Another way is to clear > hw_stats->last_vfgprc/last_vfgorc/last_vfgptc/last_vfmprc at the same > time PF is set down. > Can we know easily in VF if the PF was set down? Thanks, Olivier