]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Add ethtool handler to set and get TCP hash levels
authorHaiyang Zhang <haiyangz@microsoft.com>
Fri, 6 Oct 2017 15:33:58 +0000 (08:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Oct 2017 17:11:01 +0000 (10:11 -0700)
commit32cf392aeec911f943d9d7bc82c1ad80f6451a33
tree9cbaf22e7c8d211c4d49d329f3973daef160beb2
parenteb2ccdab153ccac5cb0478ce24465126884a3ee8
hv_netvsc: Add ethtool handler to set and get TCP hash levels

The patch supports the options to switch TCP hash level between
L3 and L4 by ethtool command. TCP 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.

For example, for TCP over IPv4 on eth0:
To include TCP port numbers in hashing:
ethtool -N eth0 rx-flow-hash tcp4 sdfn
To exclude TCP port numbers in hashing:
ethtool -N eth0 rx-flow-hash tcp4 sd
To show TCP hash level:
ethtool -n eth0 rx-flow-hash tcp4

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c