diff options
author | 2017-10-06 08:33:57 -0700 | |
---|---|---|
committer | 2017-10-08 10:11:01 -0700 | |
commit | 486e3981057cacdafd62ba0618612193ff12d1dd (patch) | |
tree | 176e667891e8558f79b7df8d4a5accef61f57db5 /drivers/net/hyperv/hyperv_net.h | |
parent | Merge branch 'mlxsw-more-extack' (diff) | |
download | linux-486e3981057cacdafd62ba0618612193ff12d1dd.tar.gz linux-486e3981057cacdafd62ba0618612193ff12d1dd.tar.bz2 linux-486e3981057cacdafd62ba0618612193ff12d1dd.zip |
hv_netvsc: Change the hash level variable to bit flags
This simplifies the logic and make it easier to add more
options.
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.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index 6f550e15a41c..a81335e8ebe8 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h @@ -704,6 +704,14 @@ struct netvsc_reconfig { u32 event; }; +/* L4 hash bits for different protocols */ +#define HV_TCP4_L4HASH 1 +#define HV_TCP6_L4HASH 2 +#define HV_UDP4_L4HASH 4 +#define HV_UDP6_L4HASH 8 +#define HV_DEFAULT_L4HASH (HV_TCP4_L4HASH | HV_TCP6_L4HASH | HV_UDP4_L4HASH | \ + HV_UDP6_L4HASH) + /* The context of the netvsc device */ struct net_device_context { /* point back to our device context */ @@ -726,10 +734,9 @@ 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; + u32 l4_hash; /* L4 hash settings */ struct netvsc_ethtool_stats eth_stats; /* State to manage the associated VF interface. */ |