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 79EE1682E for ; Wed, 19 Nov 2014 10:18:08 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 19 Nov 2014 01:28:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,415,1413270000"; d="scan'208";a="639572961" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by orsmga002.jf.intel.com with ESMTP; 19 Nov 2014 01:28:29 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by pgsmsx105.gar.corp.intel.com (10.221.44.96) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 19 Nov 2014 17:26:56 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.240]) with mapi id 14.03.0195.001; Wed, 19 Nov 2014 17:26:56 +0800 From: "Qiu, Michael" To: "Zang, Zhida" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] i40e: fixed tx stats bug Thread-Index: AQHQA9TzoaEoq5QfdkyyKQxnL+fDFg== Date: Wed, 19 Nov 2014 09:26:54 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286C98A63@SHSMSX101.ccr.corp.intel.com> References: <1416386354-18274-1-git-send-email-zhida.zang@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 Subject: Re: [dpdk-dev] [PATCH] i40e: fixed tx stats bug 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: Wed, 19 Nov 2014 09:18:09 -0000 On 11/19/2014 4:43 PM, zhida zang wrote:=0A= > From: zzang =0A= >=0A= > Fixed tx stats bug in i40e=0A= =0A= =0A= Would you mind to give more details about this bug in the commit log?=0A= =0A= This can really help reviewer to get the initial idea about your patch=0A= without go through the code it self.=0A= =0A= Thanks,=0A= Michael=0A= >=0A= > Signed-off-by: zzang =0A= > ---=0A= > lib/librte_pmd_i40e/i40e_ethdev.c | 5 +++--=0A= > 1 file changed, 3 insertions(+), 2 deletions(-)=0A= >=0A= > diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e= _ethdev.c=0A= > index 4b7a827..e01590c 100644=0A= > --- a/lib/librte_pmd_i40e/i40e_ethdev.c=0A= > +++ b/lib/librte_pmd_i40e/i40e_ethdev.c=0A= > @@ -1102,6 +1102,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct = rte_eth_stats *stats)=0A= > struct i40e_hw *hw =3D I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);= =0A= > struct i40e_hw_port_stats *ns =3D &pf->stats; /* new stats */=0A= > struct i40e_hw_port_stats *os =3D &pf->stats_offset; /* old stats */=0A= > + struct i40e_eth_stats *ves =3D &pf->main_vsi->eth_stats; /* vsi stats *= /=0A= > =0A= > /* Get statistics of struct i40e_eth_stats */=0A= > i40e_stat_update_48(hw, I40E_GLPRT_GORCH(hw->port),=0A= > @@ -1284,8 +1285,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct = rte_eth_stats *stats)=0A= > =0A= > stats->ipackets =3D ns->eth.rx_unicast + ns->eth.rx_multicast +=0A= > ns->eth.rx_broadcast;=0A= > - stats->opackets =3D ns->eth.tx_unicast + ns->eth.tx_multicast +=0A= > - ns->eth.tx_broadcast;=0A= > + stats->opackets =3D ves->tx_unicast + ves->tx_multicast +=0A= > + ves->tx_broadcast;=0A= > stats->ibytes =3D ns->eth.rx_bytes;=0A= > stats->obytes =3D ns->eth.tx_bytes;=0A= > stats->oerrors =3D ns->eth.tx_errors;=0A= =0A=