net: thunderx: Fix VF driver's interface statistics
authorSunil Goutham <sgoutham@cavium.com>
Tue, 15 Nov 2016 12:08:16 +0000 (17:38 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2016 18:28:33 +0000 (13:28 -0500)
commit964cb69bdc9db255f7c3a80f6e1bed8a25e4c60e
tree2f07450b5aab178369483447eeadcc2a41d6e0a7
parentcadcf95a4f70362c96a8fe39ff5d5df830d4db7f
net: thunderx: Fix VF driver's interface statistics

This patch fixes multiple issues
1. Convert all driver statistics to percpu counters for accuracy.
2. To avoid multiple CQEs posted by a TSO packet appended to HW,
   TSO pkt's SQE has 'post_cqe' not set but a dummy SQE is added
   for getting HW transmit completion notification. This dummy
   SQE has 'dont_send' set and HW drops the pkt pointed to in this
   thus Tx drop counter increases. This patch fixes this by subtracting
   SW tx tso counter from HW Tx drop counter for actual packet drop counter.
3. Reset all individual queue's and VNIC HW stats when interface is going down.
4. Getrid off unnecessary counters in hot path.
5. Bringout all CQE error stats i.e both Rx and Tx.

Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/nic.h
drivers/net/ethernet/cavium/thunder/nic_main.c
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
drivers/net/ethernet/cavium/thunder/nicvf_main.c
drivers/net/ethernet/cavium/thunder/nicvf_queues.c
drivers/net/ethernet/cavium/thunder/nicvf_queues.h