From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CA8D7A0471 for ; Fri, 19 Jul 2019 02:17:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8168828EE; Fri, 19 Jul 2019 02:17:33 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 36B3C28EE; Fri, 19 Jul 2019 02:17:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 17:17:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,280,1559545200"; d="scan'208";a="179423245" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 18 Jul 2019 17:17:29 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 17:17:29 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jul 2019 17:17:29 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.232]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.162]) with mapi id 14.03.0439.000; Fri, 19 Jul 2019 08:17:28 +0800 From: "Zhang, Qi Z" To: Stephen Hemminger CC: "Wu, Jingjing" , "Lu, Wenzhuo" , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/iavf: fix Rx bytes stats Thread-Index: AQHVPFgbC6REDTvthka4d7nbUb8QkKbNuPKAgANc/MA= Date: Fri, 19 Jul 2019 00:17:27 +0000 Message-ID: <039ED4275CED7440929022BC67E7061153D695C9@SHSMSX105.ccr.corp.intel.com> References: <20190717043100.46092-1-qi.z.zhang@intel.com> <20190716215537.60762ee6@hermes.lan> In-Reply-To: <20190716215537.60762ee6@hermes.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2ExMjZhZjUtZjY0ZS00YWJmLThlYmYtODhhYTE2ZDJkNzE5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYzE3MXlqZThvZ3NyWGlQMm9pRkNxb2N5WkpZZWJrTjU4U2tUaWVKQ1RJQmRFb2s1d3ZHcEVoQllnT1piWjl1cSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action 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-stable] [dpdk-dev] [PATCH] net/iavf: fix Rx bytes stats X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Wednesday, July 17, 2019 12:56 PM > To: Zhang, Qi Z > Cc: Wu, Jingjing ; Lu, Wenzhuo > ; dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix Rx bytes stats >=20 > On Wed, 17 Jul 2019 12:31:00 +0800 > Qi Zhang wrote: >=20 > > Exclude 4 bytes CRC for rx bytes stats. > > This also aligned Rx stats calculation with PF. > > > > Fixes: f4a41a6953af ("net/avf: support stats") > > Cc: stable@dpdk.org > > > > Signed-off-by: Qi Zhang > > --- > > drivers/net/iavf/iavf_ethdev.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/net/iavf/iavf_ethdev.c > > b/drivers/net/iavf/iavf_ethdev.c index 53dc05c78..fe75e86ab 100644 > > --- a/drivers/net/iavf/iavf_ethdev.c > > +++ b/drivers/net/iavf/iavf_ethdev.c > > @@ -1047,6 +1047,7 @@ iavf_dev_stats_get(struct rte_eth_dev *dev, > struct rte_eth_stats *stats) > > stats->imissed =3D pstats->rx_discards; > > stats->oerrors =3D pstats->tx_errors + pstats->tx_discards; > > stats->ibytes =3D pstats->rx_bytes; > > + stats->ibytes -=3D stats->ipackets * RTE_ETHER_CRC_LEN; > > stats->obytes =3D pstats->tx_bytes; > > } else { > > PMD_DRV_LOG(ERR, "Get statistics failed"); >=20 > Correct, DPDK statistics should not include CRC. >=20 > Acked-by: Stephen Hemminger Applied to dpdk-next-net-intel. Thanks Qi