From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 1068958D8 for ; Thu, 22 Sep 2016 10:11:43 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 22 Sep 2016 01:11:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,378,1470726000"; d="scan'208";a="764387675" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 22 Sep 2016 01:11:25 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 22 Sep 2016 01:11:25 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 22 Sep 2016 01:11:25 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.234]) by shsmsx102.ccr.corp.intel.com ([169.254.2.15]) with mapi id 14.03.0248.002; Thu, 22 Sep 2016 16:11:21 +0800 From: "Wu, Jingjing" To: "Yigit, Ferruh" , "Zhao1, Wei" , "dev@dpdk.org" , "Zhang, Helin" Thread-Topic: [dpdk-dev] [PATCH v3] net/i40e: fix Rx statistic inconsistent Thread-Index: AQHR8eMaZk66gjAu5UCETwejausk5aB4uZeAgAyzmCA= Date: Thu, 22 Sep 2016 08:11:21 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F80E27148C@SHSMSX103.ccr.corp.intel.com> References: <1470708472-39154-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: fix Rx statistic inconsistent X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 08:11:44 -0000 NACK. This patch is not required any more as we discussed offline. @zhaowei, please change the patch's status in patchwork because no change i= s 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 inconsisten= t >=20 > 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 > > --- > > 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 =3D=3D 1) > > + i40e_read_stats_registers(pf, hw); > > > > stats->ipackets =3D 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 =3D=3D 1) > > + i40e_read_stats_registers(pf, hw); > > > > if (xstats =3D=3D NULL) > > return 0; > > >=20 > +cc i40e maintainers, can you please review the code?