ixgbe: fix Rx error stats
authorMaryam Tahhan <maryam.tahhan@intel.com>
Mon, 20 Jul 2015 12:28:29 +0000 (13:28 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 23 Jul 2015 12:55:25 +0000 (14:55 +0200)
commit3c47efd90d84af552e2cfbea31aad86182a5da0b
tree5027905ce56234ba664ecef0a12c834c06a7f4e2
parent4558b74377305ae724f4b4862eb2068c79ef00a0
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 <maryam.tahhan@intel.com>
Acked-by: Balazs Nemeth <balazs.nemeth@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: Marvin Liu <yong.liu@intel.com>
drivers/net/ixgbe/ixgbe_ethdev.c