From patchwork Thu Oct 8 14:37:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Tahhan, Maryam" X-Patchwork-Id: 7484 Return-Path: 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 E69C48DAB; Thu, 8 Oct 2015 16:37:42 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9A42C8DA7 for ; Thu, 8 Oct 2015 16:37:40 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 08 Oct 2015 07:37:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,655,1437462000"; d="scan'208,217";a="806492978" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga001.fm.intel.com with ESMTP; 08 Oct 2015 07:37:37 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.139]) by IRSMSX152.ger.corp.intel.com ([169.254.6.64]) with mapi id 14.03.0248.002; Thu, 8 Oct 2015 15:37:36 +0100 From: "Tahhan, Maryam" To: Jay Rolette Thread-Topic: [dpdk-dev] [PATCH] ethdev: distinguish between drop and error stats Thread-Index: AQHQ/RCgwmPlqiFfVUCcKt4PKnicmp5YILWAgAmSGOA= Date: Thu, 8 Oct 2015 14:37:36 +0000 Message-ID: <1A27633A6DA49C4A92FCD5D4312DBF536A5B392B@IRSMSX109.ger.corp.intel.com> References: <1443790078-15834-1-git-send-email-maryam.tahhan@intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: DPDK Subject: Re: [dpdk-dev] [PATCH] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Jay Yeah, I will do this to make the distinction clear for the counters I’m modifying in my patch. But please note that these aren’t counters that are defined in the NIC datasheets, these are the high level DPDK general counters for ethdevs. Their descriptions exist in the code and the generated DPDK docs. Best Regards, Maryam From: Jay Rolette [mailto:rolette@infiniteio.com] Sent: Friday, October 2, 2015 2:25 PM To: Tahhan, Maryam Cc: DPDK Subject: Re: [dpdk-dev] [PATCH] ethdev: distinguish between drop and error stats Can you improve the comments on these counters? If you didn't happen to follow this thread, there's no way to reasonably figure out what the difference is from looking at the code without chasing it all the way down and cross-referencing the NIC datasheet. Thanks, Jay On Fri, Oct 2, 2015 at 7:47 AM, Maryam Tahhan > wrote: 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). Rx_pkt_errors = 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. Signed-off-by: Maryam Tahhan > --- lib/librte_ether/rte_ethdev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.4.3 diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 8a8c82b..53dd55d 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -200,8 +200,9 @@ 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 dropped received packets. */ uint64_t oerrors; /**< Total number of failed transmitted packets. */ + uint64_t ipkterrors; /**< Total number of erroneous received packets. */ uint64_t imcasts; /**< Deprecated; Total number of multicast received packets. */ uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */