From 3c47efd90d84af552e2cfbea31aad86182a5da0b Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Mon, 20 Jul 2015 13:28:29 +0100 Subject: [PATCH] ixgbe: fix Rx error stats 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. Fixes: f6bf669b9900 ("ixgbe: account more Rx errors") Signed-off-by: Maryam Tahhan Acked-by: Balazs Nemeth Acked-by: Wenzhuo Lu Tested-by: Marvin Liu --- 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 3a8cff0b17..09fac2524e 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.20.1