From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 67E60C31A for ; Wed, 20 May 2015 11:35:16 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 20 May 2015 02:35:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,464,1427785200"; d="scan'208";a="495971703" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by FMSMGA003.fm.intel.com with ESMTP; 20 May 2015 02:35:14 -0700 Received: from kmsmsx154.gar.corp.intel.com (172.21.73.14) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 20 May 2015 17:35:14 +0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by KMSMSX154.gar.corp.intel.com (172.21.73.14) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 20 May 2015 17:35:13 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.120]) by shsmsx102.ccr.corp.intel.com ([169.254.2.109]) with mapi id 14.03.0224.002; Wed, 20 May 2015 17:35:11 +0800 From: "Qiu, Michael" To: Michael Qiu , "dev@dpdk.org" Thread-Topic: [PATCH] ixgbe: reset hardware stat when initialize Thread-Index: AQHQiWcJtaO1qEHIXkOktCJI+Ei9yg== Date: Wed, 20 May 2015 09:35:11 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E602860467FA19@SHSMSX101.ccr.corp.intel.com> References: <1431072861-28565-1-git-send-email-qiudayu@cn.ibm.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] ixgbe: reset hardware stat when initialize 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, 20 May 2015 09:35:16 -0000 Any comments about this patch?=0A= =0A= Thanks,=0A= Michael=0A= =0A= On 5/8/2015 4:14 PM, Michael Qiu wrote:=0A= > From: Michael Qiu =0A= >=0A= > When initialize the hardware, the stat should be reset.=0A= > Otherwise when detach then attach port, the stat will not=0A= > be re-init to zero.=0A= >=0A= > Signed-off-by: Michael Qiu =0A= > ---=0A= > lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 6 ++++++=0A= > 1 file changed, 6 insertions(+)=0A= >=0A= > diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/i= xgbe_ethdev.c=0A= > index 1b3b4b5..dbcc12a 100644=0A= > --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c=0A= > +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c=0A= > @@ -840,6 +840,9 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev)=0A= > return -EIO;=0A= > }=0A= > =0A= > + /* Reset the hw statistics */=0A= > + ixgbe_dev_stats_reset(eth_dev);=0A= > +=0A= > /* disable interrupt */=0A= > ixgbe_disable_intr(hw);=0A= > =0A= > @@ -1015,6 +1018,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)= =0A= > /* Disable the interrupts for VF */=0A= > ixgbevf_intr_disable(hw);=0A= > =0A= > + /* Reset the hw statistics */=0A= > + ixgbevf_dev_stats_reset(eth_dev);=0A= > +=0A= > hw->mac.num_rar_entries =3D 128; /* The MAX of the underlying PF */=0A= > diag =3D hw->mac.ops.reset_hw(hw);=0A= > =0A= =0A=