diff options
author | Sunil Goutham <sgoutham@cavium.com> | 2016-11-15 15:08:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-16 21:28:33 +0300 |
commit | 964cb69bdc9db255f7c3a80f6e1bed8a25e4c60e (patch) | |
tree | 2f07450b5aab178369483447eeadcc2a41d6e0a7 /drivers/net/ethernet/cavium/thunder/nic_main.c | |
parent | cadcf95a4f70362c96a8fe39ff5d5df830d4db7f (diff) | |
download | linux-964cb69bdc9db255f7c3a80f6e1bed8a25e4c60e.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/cavium/thunder/nic_main.c')
-rw-r--r-- | drivers/net/ethernet/cavium/thunder/nic_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c index 85c9e6201e8b..6677b96e1f3f 100644 --- a/drivers/net/ethernet/cavium/thunder/nic_main.c +++ b/drivers/net/ethernet/cavium/thunder/nic_main.c @@ -851,6 +851,7 @@ static int nic_reset_stat_counters(struct nicpf *nic, nic_reg_write(nic, reg_addr, 0); } } + return 0; } |