aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorGravatar Haiyang Zhang <haiyangz@microsoft.com> 2017-08-21 19:22:39 -0700
committerGravatar David S. Miller <davem@davemloft.net> 2017-08-22 14:08:12 -0700
commit4823eb2f3af44e2b9f7f02bed5a211e9ce79051f (patch)
tree19b9069aa1b175b4888c5ed02a4de99f58326ddb /drivers/net/hyperv/hyperv_net.h
parenthv_netvsc: Clean up unused parameter from netvsc_get_rss_hash_opts() (diff)
downloadlinux-4823eb2f3af44e2b9f7f02bed5a211e9ce79051f.tar.gz
linux-4823eb2f3af44e2b9f7f02bed5a211e9ce79051f.tar.bz2
linux-4823eb2f3af44e2b9f7f02bed5a211e9ce79051f.zip
hv_netvsc: Add ethtool handler to set and get UDP hash levels
The patch add the functions to switch UDP hash level between L3 and L4 by ethtool command. UDP over IPv4 and v6 can be set differently. The default hash level is L4. We currently only allow switching TX hash level from within the guests. On Azure, fragmented UDP packets have high loss rate with L4 hashing. Using L3 hashing is recommended in this case. For example, for UDP over IPv4 on eth0: To include UDP port numbers in hasing: ethtool -N eth0 rx-flow-hash udp4 sdfn To exclude UDP port numbers in hasing: ethtool -N eth0 rx-flow-hash udp4 sd To show UDP hash level: ethtool -n eth0 rx-flow-hash udp4 Signed-off-by: Haiyang Zhang <haiyangz@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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 9198dd1240ed..ff1c0c8d5e0d 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -720,6 +720,8 @@ struct net_device_context {
u32 tx_send_table[VRSS_SEND_TAB_SIZE];
/* Ethtool settings */
+ bool udp4_l4_hash;
+ bool udp6_l4_hash;
u8 duplex;
u32 speed;
struct netvsc_ethtool_stats eth_stats;