DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maryam Tahhan <maryam.tahhan@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 1/7] ethdev: add additional error stats
Date: Tue,  9 Jun 2015 16:10:40 +0100	[thread overview]
Message-ID: <1433862646-91880-2-git-send-email-maryam.tahhan@intel.com> (raw)
In-Reply-To: <1433862646-91880-1-git-send-email-maryam.tahhan@intel.com>

Add MAC error and drop statistics to struct rte_eth_stats and the
extended stats.
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
---
 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

  reply	other threads:[~2015-06-09 15:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 15:10 [dpdk-dev] [PATCH v2 0/7] Expose IXGBE extended stats to DPDK apps Maryam Tahhan
2015-06-09 15:10 ` Maryam Tahhan [this message]
2015-06-10  0:29   ` [dpdk-dev] [PATCH v2 1/7] ethdev: add additional error stats Stephen Hemminger
2015-06-17 14:01     ` Thomas Monjalon
2015-06-09 15:10 ` [dpdk-dev] [PATCH v2 2/7] ixgbe: move stats register reads to a new function Maryam Tahhan
2015-06-09 15:10 ` [dpdk-dev] [PATCH v2 3/7] ixgbe: Expose extended error statistics Maryam Tahhan
2015-06-09 15:10 ` [dpdk-dev] [PATCH v2 4/7] ethdev: expose extended error stats Maryam Tahhan
2015-06-09 15:10 ` [dpdk-dev] [PATCH v2 5/7] testpmd: extend testpmd to show all extended stats Maryam Tahhan
2015-06-09 15:10 ` [dpdk-dev] [PATCH v2 6/7] app: remove dump_cfg Maryam Tahhan
2015-06-09 15:10 ` [dpdk-dev] [PATCH v2 7/7] app: add a new app proc_info Maryam Tahhan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433862646-91880-2-git-send-email-maryam.tahhan@intel.com \
    --to=maryam.tahhan@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).