]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Add ethtool handler to set and get UDP hash levels
authorHaiyang Zhang <haiyangz@microsoft.com>
Tue, 22 Aug 2017 02:22:39 +0000 (19:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Aug 2017 21:08:12 +0000 (14:08 -0700)
commit534eee7aece5a6c5e7d4b12c9c8ea0f5c55c96a1
tree19b9069aa1b175b4888c5ed02a4de99f58326ddb
parent5906fdae22ecdba99095fa8d9a0bbdb10bf03ff4
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>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc_drv.c