summaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorStephen Hemminger2016-08-23 21:17:57 +0200
committerDavid S. Miller2016-08-23 21:05:38 +0200
commit4323b47cf8edfe95bd58e20965667e71121c866e (patch)
treef0390ea6a1d24e1fea5f8898aab37170232dfdc0 /drivers/net/hyperv/hyperv_net.h
parenthv_netvsc: report vmbus name in ethtool (diff)
downloadkernel-qcow2-linux-4323b47cf8edfe95bd58e20965667e71121c866e.tar.gz
kernel-qcow2-linux-4323b47cf8edfe95bd58e20965667e71121c866e.tar.xz
kernel-qcow2-linux-4323b47cf8edfe95bd58e20965667e71121c866e.zip
hv_netvsc: add ethtool statistics for tx packet issues
Printing console messages is not helpful when system is out of memory; and can be disastrous with netconsole. Instead keep statistics of these anomalous conditions. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
-rw-r--r--drivers/net/hyperv/hyperv_net.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 8031deeb0a40..284b97b6b258 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -652,6 +652,14 @@ struct netvsc_stats {
struct u64_stats_sync syncp;
};
+struct netvsc_ethtool_stats {
+ unsigned long tx_scattered;
+ unsigned long tx_no_memory;
+ unsigned long tx_no_space;
+ unsigned long tx_too_big;
+ unsigned long tx_busy;
+};
+
struct netvsc_reconfig {
struct list_head list;
u32 event;
@@ -681,6 +689,7 @@ struct net_device_context {
/* Ethtool settings */
u8 duplex;
u32 speed;
+ struct netvsc_ethtool_stats eth_stats;
/* the device is going away */
bool start_remove;