net/enic: fix calculation of truncated packets
authorNelson Escobar <neescoba@cisco.com>
Wed, 13 Jul 2016 16:52:34 +0000 (09:52 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 15 Jul 2016 21:37:13 +0000 (23:37 +0200)
commitd142e1ac10893b7a5b0240809325ac737237a57a
treef8c85bccc34cd637786cc40f61c95ff65795c5f4
parent837e68ae94a2db471c7e1c158bab5517d9a408fc
net/enic: fix calculation of truncated packets

The calculation of truncated packets didn't take into account packet
errors due to the adapter not having buffers, causing both the
ipackets, and imissed counts to be wrong if such errors occurred.  In
order to properly calculate the number of packets truncated, we need
to subtract the count of errors due to no buffers.

Fixes: c44d9f01adf3 ("net/enic: count truncated packets")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
drivers/net/enic/enic_main.c