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 3F5F07E6E for ; Wed, 15 Oct 2014 05:07:22 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 14 Oct 2014 20:15:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,721,1406617200"; d="scan'208";a="605509384" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 14 Oct 2014 20:14:47 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s9F3EiR3018444; Wed, 15 Oct 2014 11:14:44 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s9F3EgsW018633; Wed, 15 Oct 2014 11:14:44 +0800 Received: (from jijiangl@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s9F3EgA6018629; Wed, 15 Oct 2014 11:14:42 +0800 From: Jijiang Liu To: dev@dpdk.org Date: Wed, 15 Oct 2014 11:14:38 +0800 Message-Id: <1413342878-18584-1-git-send-email-jijiang.liu@intel.com> X-Mailer: git-send-email 1.7.12.2 Subject: [dpdk-dev] [PATCH] Add Rx error statistics for Fortville 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, 15 Oct 2014 03:07:22 -0000 This patch adds incoming packet error statistics in the i40e_ethdev.c file. Signed-off-by: Jijiang Liu --- lib/librte_pmd_i40e/i40e_ethdev.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c index 46c43a7..dbf231f 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -1274,6 +1274,9 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) pf->offset_loaded = true; + if (pf->main_vsi) + i40e_update_vsi_stats(pf->main_vsi); + stats->ipackets = ns->eth.rx_unicast + ns->eth.rx_multicast + ns->eth.rx_broadcast; stats->opackets = ns->eth.tx_unicast + ns->eth.tx_multicast + @@ -1283,8 +1286,12 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->oerrors = ns->eth.tx_errors; stats->imcasts = ns->eth.rx_multicast; - if (pf->main_vsi) - i40e_update_vsi_stats(pf->main_vsi); + /* Rx Errors */ + stats->ibadcrc = ns->crc_errors; + stats->ibadlen = ns->rx_length_errors + ns->rx_undersize + + ns->rx_oversize + ns->rx_fragments + ns->rx_jabber; + stats->imissed = ns->eth.rx_discards; + stats->ierrors = stats->ibadcrc + stats->ibadlen + stats->imissed; PMD_DRV_LOG(DEBUG, "***************** PF stats start *******************"); PMD_DRV_LOG(DEBUG, "rx_bytes: %lu", ns->eth.rx_bytes); -- 1.7.7.6