Message ID | 1469498772-66958-1-git-send-email-wei.zhao1@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 5466B5682; Tue, 26 Jul 2016 04:07:42 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E1DA05597 for <dev@dpdk.org>; Tue, 26 Jul 2016 04:07:40 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 25 Jul 2016 19:07:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,422,1464678000"; d="scan'208";a="853394370" Received: from dpdk2.bj.intel.com ([172.16.182.189]) by orsmga003.jf.intel.com with ESMTP; 25 Jul 2016 19:07:39 -0700 From: Wei Zhao1 <wei.zhao1@intel.com> To: dev@dpdk.org Cc: Wei Zhao1 <wei.zhao1@intel.com> Date: Tue, 26 Jul 2016 10:06:12 +0800 Message-Id: <1469498772-66958-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when port stopped X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Zhao1, Wei
July 26, 2016, 2:06 a.m. UTC
rx_good_bytes and rx_good_packets statstic is inconsistent when port stopped,ipackets statistic is minus the discard packets but rx_bytes statistic not.
Also,i40e has no statstic of discard bytes, so we have to delete discard packets item from rx_good_packets statstic.
Fixes: 9aace75fc82e ("i40e: fix statistics")
Signed-off-by: Wei Zhao1 <wei.zhao1@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi, zhaowei Few comments below: > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao1 > Sent: Tuesday, July 26, 2016 10:06 AM > To: dev@dpdk.org > Cc: Zhao1, Wei > Subject: [dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when port > stopped > Avoid typo: fiX -> fix; statstic -> statistic And there are some requirements based on the subject and commit log in , such as: * The summary line should be around 50 characters. * The text of the commit message should be wrapped at 72 characters. Please check the doc " doc/guides/contributing/patches.rst" and use " scripts/check-git-log.sh" to help you. > rx_good_bytes and rx_good_packets statstic is inconsistent when port > stopped,ipackets statistic is minus the discard packets but rx_bytes statistic > not. > Also,i40e has no statstic of discard bytes, so we have to delete discard > packets item from rx_good_packets statstic. > > Fixes: 9aace75fc82e ("i40e: fix statistics") > > Signed-off-by: Wei Zhao1 <wei.zhao1@intel.com> > --- > drivers/net/i40e/i40e_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index 11a5804..553dfd9 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -2319,8 +2319,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, > struct rte_eth_stats *stats) > > stats->ipackets = pf->main_vsi->eth_stats.rx_unicast + > pf->main_vsi->eth_stats.rx_multicast + > - pf->main_vsi->eth_stats.rx_broadcast - > - pf->main_vsi->eth_stats.rx_discards; > + pf->main_vsi->eth_stats.rx_broadcast; > stats->opackets = pf->main_vsi->eth_stats.tx_unicast + > pf->main_vsi->eth_stats.tx_multicast + > pf->main_vsi->eth_stats.tx_broadcast; rx_discards is included in imiss. So I think it's better to minus the discard count. /Jingjing
Hi, Wu Jingjing Thanks for your feedback .I didn't find statistic of discard bytes i40e data sheet, so I have to delete discard packets item from rx_good_packets statistic. In other words, we have no way to to minus the discard byte count from rx_good_bytes. Also I will make some change to meet requirements of commit log and subject. -----Original Message----- From: Wu, Jingjing Sent: Friday, July 29, 2016 10:50 AM To: Zhao1, Wei <wei.zhao1@intel.com> Cc: dev@dpdk.org Subject: RE: [dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when port stopped Hi, zhaowei Few comments below: > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao1 > Sent: Tuesday, July 26, 2016 10:06 AM > To: dev@dpdk.org > Cc: Zhao1, Wei > Subject: [dpdk-dev] [PATCH] net/i40e: fiX statstic inconsistent when > port stopped > Avoid typo: fiX -> fix; statstic -> statistic And there are some requirements based on the subject and commit log in , such as: * The summary line should be around 50 characters. * The text of the commit message should be wrapped at 72 characters. Please check the doc " doc/guides/contributing/patches.rst" and use " scripts/check-git-log.sh" to help you. > rx_good_bytes and rx_good_packets statstic is inconsistent when port > stopped,ipackets statistic is minus the discard packets but rx_bytes > statistic not. > Also,i40e has no statstic of discard bytes, so we have to delete > discard packets item from rx_good_packets statstic. > > Fixes: 9aace75fc82e ("i40e: fix statistics") > > Signed-off-by: Wei Zhao1 <wei.zhao1@intel.com> > --- > drivers/net/i40e/i40e_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c > b/drivers/net/i40e/i40e_ethdev.c index 11a5804..553dfd9 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -2319,8 +2319,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, > struct rte_eth_stats *stats) > > stats->ipackets = pf->main_vsi->eth_stats.rx_unicast + > pf->main_vsi->eth_stats.rx_multicast + > - pf->main_vsi->eth_stats.rx_broadcast - > - pf->main_vsi->eth_stats.rx_discards; > + pf->main_vsi->eth_stats.rx_broadcast; > stats->opackets = pf->main_vsi->eth_stats.tx_unicast + > pf->main_vsi->eth_stats.tx_multicast + > pf->main_vsi->eth_stats.tx_broadcast; rx_discards is included in imiss. So I think it's better to minus the discard count. /Jingjing
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 11a5804..553dfd9 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2319,8 +2319,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->ipackets = pf->main_vsi->eth_stats.rx_unicast + pf->main_vsi->eth_stats.rx_multicast + - pf->main_vsi->eth_stats.rx_broadcast - - pf->main_vsi->eth_stats.rx_discards; + pf->main_vsi->eth_stats.rx_broadcast; stats->opackets = pf->main_vsi->eth_stats.tx_unicast + pf->main_vsi->eth_stats.tx_multicast + pf->main_vsi->eth_stats.tx_broadcast;