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 23ECA5A58 for ; Tue, 9 Jun 2015 17:10:51 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 09 Jun 2015 08:10:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,581,1427785200"; d="scan'208";a="743677391" Received: from sie-lab-212-170.ir.intel.com (HELO silpixa00378251.ir.intel.com) ([10.237.212.170]) by orsmga002.jf.intel.com with ESMTP; 09 Jun 2015 08:10:52 -0700 From: Maryam Tahhan To: dev@dpdk.org Date: Tue, 9 Jun 2015 16:10:40 +0100 Message-Id: <1433862646-91880-2-git-send-email-maryam.tahhan@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1433862646-91880-1-git-send-email-maryam.tahhan@intel.com> References: <1433862646-91880-1-git-send-email-maryam.tahhan@intel.com> Subject: [dpdk-dev] [PATCH v2 1/7] ethdev: add additional error stats 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, 09 Jun 2015 15:10:52 -0000 Add MAC error and drop statistics to struct rte_eth_stats and the extended stats. Signed-off-by: Maryam Tahhan --- lib/librte_ether/rte_ethdev.c | 4 ++++ lib/librte_ether/rte_ethdev.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 5a94654..a439b4a 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -136,6 +136,10 @@ static const struct rte_eth_xstats_name_off rte_stats_strings[] = { {"rx_flow_control_xon", offsetof(struct rte_eth_stats, rx_pause_xon)}, {"tx_flow_control_xoff", offsetof(struct rte_eth_stats, tx_pause_xoff)}, {"rx_flow_control_xoff", offsetof(struct rte_eth_stats, rx_pause_xoff)}, + {"rx_mac_err", offsetof(struct rte_eth_stats, imacerr)}, + {"rx_phy_err", offsetof(struct rte_eth_stats, iphyerr)}, + {"tx_drops", offsetof(struct rte_eth_stats, odrop)}, + {"rx_drops", offsetof(struct rte_eth_stats, idrop)} }; #define RTE_NB_STATS (sizeof(rte_stats_strings) / sizeof(rte_stats_strings[0])) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 16dbe00..5bc3b81 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -224,6 +224,10 @@ struct rte_eth_stats { /**< Total number of good bytes received from loopback,VF Only */ uint64_t olbbytes; /**< Total number of good bytes transmitted to loopback,VF Only */ + uint64_t imacerr; /**< Total of RX packets with MAC Errors. */ + uint64_t iphyerr; /**< Total of RX packets with PHY Errors. */ + uint64_t idrop; /**< Total number of dropped received packets. */ + uint64_t odrop; /**< Total number of dropped transmitted packets. */ }; /** -- 1.9.3