From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 363795A34 for ; Tue, 17 Nov 2015 02:23:36 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 16 Nov 2015 17:23:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,305,1444719600"; d="scan'208";a="852505391" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 16 Nov 2015 17:23:30 -0800 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 16 Nov 2015 17:23:30 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 16 Nov 2015 17:23:29 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.83]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.138]) with mapi id 14.03.0248.002; Tue, 17 Nov 2015 09:23:25 +0800 From: "Qiu, Michael" To: "Van Haaren, Harry" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 4/4] fm10k: remove crc size from all byte counters Thread-Index: AQHRIFquc+dOXJpqTEKm9XwVw1QdfQ== Date: Tue, 17 Nov 2015 01:23:25 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E6028621B82684@SHSMSX101.ccr.corp.intel.com> References: <1447670117-17723-1-git-send-email-harry.van.haaren@intel.com> <1447670117-17723-5-git-send-email-harry.van.haaren@intel.com> 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 Cc: "shemming@brocade.com" Subject: Re: [dpdk-dev] [PATCH 4/4] fm10k: remove crc size from all byte counters 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: Tue, 17 Nov 2015 01:23:36 -0000 Hi, Harry=0A= =0A= Have you ever tested this patch by yourself?=0A= =0A= fm10k's stats should already remove the crc bytes by default.=0A= =0A= After your patch applied, if send a packet without vlan(64 bytes),=0A= we expect receive 60 bytes, but it will disappoint you, that only=0A= 56 bytes shows in system.=0A= =0A= Thanks,=0A= Michael=0A= =0A= On 2015/11/16 18:36, Harry van Haaren wrote:=0A= > This patch removes the crc bytes from byte counter statistics.=0A= >=0A= > Signed-off-by: Harry van Haaren =0A= > ---=0A= > drivers/net/fm10k/fm10k_ethdev.c | 8 +++++---=0A= > 1 file changed, 5 insertions(+), 3 deletions(-)=0A= >=0A= > diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_e= thdev.c=0A= > index 441f713..fdb2e81 100644=0A= > --- a/drivers/net/fm10k/fm10k_ethdev.c=0A= > +++ b/drivers/net/fm10k/fm10k_ethdev.c=0A= > @@ -1183,11 +1183,13 @@ fm10k_stats_get(struct rte_eth_dev *dev, struct r= te_eth_stats *stats)=0A= > =0A= > ipackets =3D opackets =3D ibytes =3D obytes =3D 0;=0A= > for (i =3D 0; (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) &&=0A= > - (i < hw->mac.max_queues); ++i) {=0A= > + (i < hw->mac.max_queues); ++i) {=0A= > stats->q_ipackets[i] =3D hw_stats->q[i].rx_packets.count;=0A= > stats->q_opackets[i] =3D hw_stats->q[i].tx_packets.count;=0A= > - stats->q_ibytes[i] =3D hw_stats->q[i].rx_bytes.count;=0A= > - stats->q_obytes[i] =3D hw_stats->q[i].tx_bytes.count;=0A= > + stats->q_ibytes[i] =3D hw_stats->q[i].rx_bytes.count -=0A= > + (stats->q_ipackets[i] * 4);=0A= > + stats->q_obytes[i] =3D hw_stats->q[i].tx_bytes.count -=0A= > + (stats->q_opackets[i] * 4);=0A= > ipackets +=3D stats->q_ipackets[i];=0A= > opackets +=3D stats->q_opackets[i];=0A= > ibytes +=3D stats->q_ibytes[i];=0A= =0A=