From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 972A25A56 for ; Mon, 16 Nov 2015 11:35:42 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 16 Nov 2015 02:35:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,302,1444719600"; d="scan'208";a="851905831" Received: from sie-lab-212-222.ir.intel.com (HELO silpixa00366884.ir.intel.com) ([10.237.212.222]) by fmsmga002.fm.intel.com with ESMTP; 16 Nov 2015 02:35:39 -0800 From: Harry van Haaren To: dev@dpdk.org Date: Mon, 16 Nov 2015 10:35:17 +0000 Message-Id: <1447670117-17723-5-git-send-email-harry.van.haaren@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447670117-17723-1-git-send-email-harry.van.haaren@intel.com> References: <1447670117-17723-1-git-send-email-harry.van.haaren@intel.com> Cc: shemming@brocade.com Subject: [dpdk-dev] [PATCH 4/4] fm10k: remove crc size from all byte counters 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: Mon, 16 Nov 2015 10:35:43 -0000 This patch removes the crc bytes from byte counter statistics. Signed-off-by: Harry van Haaren --- drivers/net/fm10k/fm10k_ethdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 441f713..fdb2e81 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -1183,11 +1183,13 @@ fm10k_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) ipackets = opackets = ibytes = obytes = 0; for (i = 0; (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) && - (i < hw->mac.max_queues); ++i) { + (i < hw->mac.max_queues); ++i) { stats->q_ipackets[i] = hw_stats->q[i].rx_packets.count; stats->q_opackets[i] = hw_stats->q[i].tx_packets.count; - stats->q_ibytes[i] = hw_stats->q[i].rx_bytes.count; - stats->q_obytes[i] = hw_stats->q[i].tx_bytes.count; + stats->q_ibytes[i] = hw_stats->q[i].rx_bytes.count - + (stats->q_ipackets[i] * 4); + stats->q_obytes[i] = hw_stats->q[i].tx_bytes.count - + (stats->q_opackets[i] * 4); ipackets += stats->q_ipackets[i]; opackets += stats->q_opackets[i]; ibytes += stats->q_ibytes[i]; -- 1.9.1