aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorGravatar stephen hemminger <stephen@networkplumber.org> 2017-08-01 19:58:53 -0700
committerGravatar David S. Miller <davem@davemloft.net> 2017-08-02 16:55:33 -0700
commit0c195567a8f6e82ea5535cd9f1d54a1626dd233e (patch)
treec23e3f19dd745d47a0b028661695394f75e53bc7 /drivers/net/hyperv/hyperv_net.h
parentatm: solos-pci: constify attribute_group structures (diff)
downloadlinux-0c195567a8f6e82ea5535cd9f1d54a1626dd233e.tar.gz
linux-0c195567a8f6e82ea5535cd9f1d54a1626dd233e.tar.bz2
linux-0c195567a8f6e82ea5535cd9f1d54a1626dd233e.zip
netvsc: transparent VF management
This patch implements transparent fail over from synthetic NIC to SR-IOV virtual function NIC in Hyper-V environment. It is a better alternative to using bonding as is done now. Instead, the receive and transmit fail over is done internally inside the driver. Using bonding driver has lots of issues because it depends on the script being run early enough in the boot process and with sufficient information to make the association. This patch moves all that functionality into the kernel. 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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index f2cef5aaed1f..c701b059c5ac 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -680,6 +680,15 @@ struct netvsc_ethtool_stats {
unsigned long tx_busy;
};
+struct netvsc_vf_pcpu_stats {
+ u64 rx_packets;
+ u64 rx_bytes;
+ u64 tx_packets;
+ u64 tx_bytes;
+ struct u64_stats_sync syncp;
+ u32 tx_dropped;
+};
+
struct netvsc_reconfig {
struct list_head list;
u32 event;
@@ -713,6 +722,9 @@ struct net_device_context {
/* State to manage the associated VF interface. */
struct net_device __rcu *vf_netdev;
+ struct netvsc_vf_pcpu_stats __percpu *vf_stats;
+ struct work_struct vf_takeover;
+ struct work_struct vf_notify;
/* 1: allocated, serial number is valid. 0: not allocated */
u32 vf_alloc;