* [dpdk-stable] [PATCH] net/ixgbevf: fix stats update after a PF reset
@ 2017-01-11 17:04 Olivier Matz
2017-02-06 13:58 ` [dpdk-stable] [dpdk-dev] " Olivier Matz
0 siblings, 1 reply; 6+ messages in thread
From: Olivier Matz @ 2017-01-11 17:04 UTC (permalink / raw)
To: dev, helin.zhang, konstantin.ananyev; +Cc: Guo Fengtian, stable
From: Guo Fengtian <fengtian.guo@6wind.com>
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
Signed-off-by: Guo Fengtian <fengtian.guo@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
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 2d8641a..455a0c9 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -389,7 +389,8 @@ static int ixgbe_dev_udp_tunnel_port_del(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 != 0) \
+ cur += (latest - last) & UINT_MAX; \
last = latest; \
}
@@ -398,7 +399,8 @@ static int ixgbe_dev_udp_tunnel_port_del(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 != 0) \
+ cur += (0x1000000000LL + latest - last) & 0xFFFFFFFFFLL; \
last = latest; \
}
--
2.8.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset
2017-01-11 17:04 [dpdk-stable] [PATCH] net/ixgbevf: fix stats update after a PF reset Olivier Matz
@ 2017-02-06 13:58 ` Olivier Matz
2017-02-09 14:37 ` Dai, Wei
2017-02-09 14:50 ` Dai, Wei
0 siblings, 2 replies; 6+ messages in thread
From: Olivier Matz @ 2017-02-06 13:58 UTC (permalink / raw)
To: dev, helin.zhang, konstantin.ananyev; +Cc: Guo Fengtian, stable
Hi,
On Wed, 11 Jan 2017 18:04:14 +0100, Olivier Matz
<olivier.matz@6wind.com> wrote:
> From: Guo Fengtian <fengtian.guo@6wind.com>
>
> 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
> Signed-off-by: Guo Fengtian <fengtian.guo@6wind.com>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Ping
Thanks,
Olivier
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset
2017-02-06 13:58 ` [dpdk-stable] [dpdk-dev] " Olivier Matz
@ 2017-02-09 14:37 ` Dai, Wei
2017-02-09 14:50 ` Dai, Wei
1 sibling, 0 replies; 6+ messages in thread
From: Dai, Wei @ 2017-02-09 14:37 UTC (permalink / raw)
To: Olivier Matz, dev, Zhang, Helin, Ananyev, Konstantin; +Cc: Guo Fengtian, stable
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:dev-bounces@dpdk.org] On Behalf Of Olivier Matz
> Sent: Monday, February 6, 2017 9:59 PM
> To: dev@dpdk.org; Zhang, Helin <helin.zhang@intel.com>; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>
> Cc: Guo Fengtian <fengtian.guo@6wind.com>; stable@dpdk.org
> 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 <olivier.matz@6wind.com>
> wrote:
> > From: Guo Fengtian <fengtian.guo@6wind.com>
> >
> > 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
> > Signed-off-by: Guo Fengtian <fengtian.guo@6wind.com>
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>
> Ping
>
>
> Thanks,
> Olivier
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset
2017-02-06 13:58 ` [dpdk-stable] [dpdk-dev] " Olivier Matz
2017-02-09 14:37 ` Dai, Wei
@ 2017-02-09 14:50 ` Dai, Wei
2017-02-16 16:49 ` Olivier Matz
1 sibling, 1 reply; 6+ messages in thread
From: Dai, Wei @ 2017-02-09 14:50 UTC (permalink / raw)
To: Olivier Matz, dev, Zhang, Helin, Ananyev, Konstantin; +Cc: Guo Fengtian, stable
Another way is to clear hw_stats->last_vfgprc/last_vfgorc/last_vfgptc/last_vfmprc
at the same time PF is set down.
> -----Original Message-----
> From: Dai, Wei
> Sent: Thursday, February 9, 2017 10:38 PM
> To: 'Olivier Matz' <olivier.matz@6wind.com>; dev@dpdk.org; Zhang, Helin
> <helin.zhang@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: Guo Fengtian <fengtian.guo@6wind.com>; 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.
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Olivier Matz
> > Sent: Monday, February 6, 2017 9:59 PM
> > To: dev@dpdk.org; Zhang, Helin <helin.zhang@intel.com>; Ananyev,
> > Konstantin <konstantin.ananyev@intel.com>
> > Cc: Guo Fengtian <fengtian.guo@6wind.com>; stable@dpdk.org
> > 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
> > <olivier.matz@6wind.com>
> > wrote:
> > > From: Guo Fengtian <fengtian.guo@6wind.com>
> > >
> > > 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
> > > Signed-off-by: Guo Fengtian <fengtian.guo@6wind.com>
> > > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> >
> > Ping
> >
> >
> > Thanks,
> > Olivier
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset
2017-02-09 14:50 ` Dai, Wei
@ 2017-02-16 16:49 ` Olivier Matz
2017-03-14 9:46 ` Olivier Matz
0 siblings, 1 reply; 6+ messages in thread
From: Olivier Matz @ 2017-02-16 16:49 UTC (permalink / raw)
To: Dai, Wei; +Cc: dev, Zhang, Helin, Ananyev, Konstantin, Guo Fengtian, stable
Hi Wei,
On Thu, 9 Feb 2017 14:50:05 +0000, "Dai, Wei" <wei.dai@intel.com> wrote:
> > -----Original Message-----
> > From: Dai, Wei
> > Sent: Thursday, February 9, 2017 10:38 PM
> > To: 'Olivier Matz' <olivier.matz@6wind.com>; dev@dpdk.org; Zhang,
> > Helin <helin.zhang@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>
> > Cc: Guo Fengtian <fengtian.guo@6wind.com>; 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbevf: fix stats update after a PF reset
2017-02-16 16:49 ` Olivier Matz
@ 2017-03-14 9:46 ` Olivier Matz
0 siblings, 0 replies; 6+ messages in thread
From: Olivier Matz @ 2017-03-14 9:46 UTC (permalink / raw)
To: Dai, Wei; +Cc: dev, Zhang, Helin, Ananyev, Konstantin, Guo Fengtian, stable
Hi Wei,
On Thu, 16 Feb 2017 17:49:22 +0100, Olivier Matz <olivier.matz@6wind.com> wrote:
> Hi Wei,
>
> On Thu, 9 Feb 2017 14:50:05 +0000, "Dai, Wei" <wei.dai@intel.com> wrote:
> > > -----Original Message-----
> > > From: Dai, Wei
> > > Sent: Thursday, February 9, 2017 10:38 PM
> > > To: 'Olivier Matz' <olivier.matz@6wind.com>; dev@dpdk.org; Zhang,
> > > Helin <helin.zhang@intel.com>; Ananyev, Konstantin
> > > <konstantin.ananyev@intel.com>
> > > Cc: Guo Fengtian <fengtian.guo@6wind.com>; 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?
Any guideline for this? Or is it something we cannot fix?
Thanks,
Olivier
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-14 9:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11 17:04 [dpdk-stable] [PATCH] net/ixgbevf: fix stats update after a PF reset Olivier Matz
2017-02-06 13:58 ` [dpdk-stable] [dpdk-dev] " Olivier Matz
2017-02-09 14:37 ` Dai, Wei
2017-02-09 14:50 ` Dai, Wei
2017-02-16 16:49 ` Olivier Matz
2017-03-14 9:46 ` Olivier Matz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).