DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"Zhao1, Wei" <wei.zhao1@intel.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"Zhang, Helin" <helin.zhang@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: fix Rx statistic inconsistent
Date: Thu, 22 Sep 2016 08:11:21 +0000	[thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F80E27148C@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <b61c31de-ac72-ead1-ae0d-1be5008ce195@intel.com>

NACK.
This patch is not required any more as we discussed offline.

@zhaowei, please change the patch's status in patchwork because no change is required now

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Wednesday, September 14, 2016 10:10 PM
> To: Zhao1, Wei; dev@dpdk.org; Zhang, Helin; Wu, Jingjing
> Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: fix Rx statistic inconsistent
> 
> On 8/9/2016 3:07 AM, Wei Zhao1 wrote:
> > rx_good_bytes and rx_good_packets statistic is inconsistent when port
> > stopped,ipackets statistic is minus the discard packets but rx_bytes
> > statistic not,but i40e has no statistic of discard bytes.So we check
> > "dev_started" flag, if the port is started we do the statistic work,if
> > stopped we don't.We can avoid the statistic inconsistent problem by
> > this way.
> >
> > Fixes: 9aace75fc82e ("i40e: fix statistics")
> >
> > Signed-off-by: Wei Zhao1 <wei.zhao1@intel.com>
> > ---
> >  drivers/net/i40e/i40e_ethdev.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> > b/drivers/net/i40e/i40e_ethdev.c index d0aeb70..47ed6e9 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -2315,7 +2315,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev,
> struct rte_eth_stats *stats)
> >  	unsigned i;
> >
> >  	/* call read registers - updates values, now write them to struct */
> > -	i40e_read_stats_registers(pf, hw);
> > +	if (dev->data->dev_started == 1)
> > +		i40e_read_stats_registers(pf, hw);
> >
> >  	stats->ipackets = pf->main_vsi->eth_stats.rx_unicast +
> >  			pf->main_vsi->eth_stats.rx_multicast + @@ -2494,7
> +2495,8 @@
> > i40e_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat
> *xstats,
> >  	if (n < count)
> >  		return count;
> >
> > -	i40e_read_stats_registers(pf, hw);
> > +	if (dev->data->dev_started == 1)
> > +		i40e_read_stats_registers(pf, hw);
> >
> >  	if (xstats == NULL)
> >  		return 0;
> >
> 
> +cc i40e maintainers, can you please review the code?

      reply	other threads:[~2016-09-22  8:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09  2:07 Wei Zhao1
2016-09-14 14:10 ` Ferruh Yigit
2016-09-22  8:11   ` Wu, Jingjing [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9BB6961774997848B5B42BEC655768F80E27148C@SHSMSX103.ccr.corp.intel.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=helin.zhang@intel.com \
    --cc=wei.zhao1@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).