net/enic: fix Rx drop counters
authorJohn Daley <johndale@cisco.com>
Fri, 3 Jun 2016 00:22:45 +0000 (17:22 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Wed, 15 Jun 2016 15:13:56 +0000 (17:13 +0200)
commit65b5434dae667b19375d9c7676d5d3e7ec56b234
tree2ca565cb35d74523878080088e853aacb01aa075
parent4321f1c604150f5585480de71336e6e382ef16be
net/enic: fix Rx drop counters

rx_no_bufs is a hardware counter of packets dropped on the
interface due to no host buffers and should be used to update
r_stats->imissed counter instead of rx_nombuf.

Include rx_drop in ierrors. rx_drop is incremented if packets
arrive when the receive queue is disabled.

Add a structure and functions for initializing and clearing
software counters. Add count of Rx mbuf allocation failures
(rx_nombuf) as the first counter.

Fixes: fefed3d1e62c ("enic: new driver")

Signed-off-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic.h
drivers/net/enic/enic_main.c
drivers/net/enic/enic_rx.c