From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 8BB125A31 for ; Mon, 20 Jul 2015 14:18:18 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 20 Jul 2015 05:18:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,507,1432623600"; d="scan'208";a="767620537" 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; 20 Jul 2015 05:18:17 -0700 From: Maryam Tahhan To: dev@dpdk.org Date: Mon, 20 Jul 2015 13:18:14 +0100 Message-Id: <1437394694-196862-1-git-send-email-maryam.tahhan@intel.com> X-Mailer: git-send-email 2.4.3 Subject: [dpdk-dev] [PATCH v1 1/1] ixgbe: Fix phy errors in stats->ierrors 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, 20 Jul 2015 12:18:18 -0000 Bug fix to remove (rxnfgpc - hw_stats->gprc) which does not account for phy errors. hw_stats->gprc is the Number of good (non-erred) Rx packets (from the network) that pass L2 filtering and has a legal length as defined by LongPacketEnable. While rxnfgpc is the Number of good (non-erred with legal length) Rx packets (from the network) regardless of packet filtering and receive enablement. Thus hw_stats->gprc can be > rxnfgpc and this calculation should be removed from the calculation of ierrors. Validated with testpmd by sending packets to the interface without forwarding enabled - packets should be dropped and the error counters incremented. Signed-off-by: Maryam Tahhan --- drivers/net/ixgbe/ixgbe_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 3a8cff0..09fac25 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2143,8 +2143,7 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) hw_stats->rfc + hw_stats->rjc + hw_stats->fccrc + - hw_stats->fclast + - (rxnfgpc - hw_stats->gprc); /* PHY Errors*/ + hw_stats->fclast; /* Tx Errors */ /*txdgpc: packets that are DMA'ed*/ -- 2.4.3