From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <maryam.tahhan@intel.com>
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by dpdk.org (Postfix) with ESMTP id 265AE8E7D
 for <dev@dpdk.org>; Mon, 19 Oct 2015 14:21:22 +0200 (CEST)
Received: from fmsmga001.fm.intel.com ([10.253.24.23])
 by orsmga103.jf.intel.com with ESMTP; 19 Oct 2015 05:20:55 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.17,701,1437462000"; d="scan'208";a="814322924"
Received: from sie-lab-212-170.ir.intel.com (HELO
 silpixa00378251.ir.intel.com) ([10.237.212.170])
 by fmsmga001.fm.intel.com with ESMTP; 19 Oct 2015 05:20:54 -0700
From: Maryam Tahhan <maryam.tahhan@intel.com>
To: dev@dpdk.org
Date: Mon, 19 Oct 2015 13:20:53 +0100
Message-Id: <1445257253-3673-1-git-send-email-maryam.tahhan@intel.com>
X-Mailer: git-send-email 2.4.3
Subject: [dpdk-dev] [PATCH v2 1/1] ethdev: distinguish between drop and
	error stats
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>
X-List-Received-Date: Mon, 19 Oct 2015 12:21:23 -0000

Make a distniction between dropped packets and error statistics to allow
a higher level fault management entity to interact with DPDK and take
appropriate measures when errors are detected. It will also provide
valuable information for any applications that collects/extracts DPDK
stats, such applications include Open vSwitch.
After this patch the distinction is:
ierrors = Total number of packets dropped by hardware (malformed
packets, ...) Where the # of drops can ONLY be <=  the packets received
(without overlap between registers).
ipkterrors = Total number of erroneous received packets. Where the #
of errors can be >= the packets received (without overlap between
registers), this is because there may be multiple errors associated with
a packet.

v2:
 - Added detailed descriptions for ierrors and ipkterrors.

Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
---
 lib/librte_ether/rte_ethdev.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 8a8c82b..e27ba31 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -200,8 +200,18 @@ struct rte_eth_stats {
 	/**< Deprecated; Total of RX packets with CRC error. */
 	uint64_t ibadlen;
 	/**< Deprecated; Total of RX packets with bad length. */
-	uint64_t ierrors;   /**< Total number of erroneous received packets. */
+	uint64_t ierrors;
+	/**< Total number of packets dropped by hardware (malformed packets...)
+	 * Where the # of drops can ONLY be <=  the packets received (without
+	 * overlap between registers).
+	 */
 	uint64_t oerrors;   /**< Total number of failed transmitted packets. */
+	uint64_t ipkterrors;
+	/**< Total number of erroneous received packets. Where the number of
+	 * errors can be >= the packets received (without overlap between
+	 * registers), this is because there may be multiple errors associated with
+	 * a packet.
+	 */
 	uint64_t imcasts;
 	/**< Deprecated; Total number of multicast received packets. */
 	uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */
-- 
2.4.3