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.

> -----Original Message-----
> From: dev [mailto:[email protected]] On Behalf Of Olivier Matz
> Sent: Monday, February 6, 2017 9:59 PM
> To: [email protected]; Zhang, Helin <[email protected]>; Ananyev,
> Konstantin <[email protected]>
> Cc: Guo Fengtian <[email protected]>; [email protected]
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset
> 
> Hi,
> 
> On Wed, 11 Jan 2017 18:04:14 +0100, Olivier Matz <[email protected]>
> wrote:
> > From: Guo Fengtian <[email protected]>
> >
> > 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: [email protected]
> > Signed-off-by: Guo Fengtian <[email protected]>
> > Signed-off-by: Olivier Matz <[email protected]>
> 
> Ping
> 
> 
> Thanks,
> Olivier

Reply via email to