diff options
author | Stephen Hemminger <sthemmin@microsoft.com> | 2019-11-01 16:42:38 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-05 14:01:35 -0800 |
commit | 1fac7ca4e63bf935780cc632ccb6ba8de5f22321 (patch) | |
tree | 12971992adf35d2bce8056288a871fd00aa74941 /drivers/net/hyperv/netvsc_drv.c | |
parent | df9f540ca74297a84bafacfa197e9347b20beea5 (diff) | |
download | linux-1fac7ca4e63bf935780cc632ccb6ba8de5f22321.tar.bz2 |
hv_netvsc: record hardware hash in skb
Since RSS hash is available from the host, record it in
the skb.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc_drv.c')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index e5e43db4acf2..5fa5c49e481b 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -766,6 +766,7 @@ static struct sk_buff *netvsc_alloc_recv_skb(struct net_device *net, const struct ndis_pkt_8021q_info *vlan = nvchan->rsc.vlan; const struct ndis_tcp_ip_checksum_info *csum_info = nvchan->rsc.csum_info; + const u32 *hash_info = nvchan->rsc.hash_info; struct sk_buff *skb; int i; @@ -802,6 +803,9 @@ static struct sk_buff *netvsc_alloc_recv_skb(struct net_device *net, skb->ip_summed = CHECKSUM_UNNECESSARY; } + if (hash_info) + skb_set_hash(skb, *hash_info, PKT_HASH_TYPE_L4); + if (vlan) { u16 vlan_tci = vlan->vlanid | (vlan->pri << VLAN_PRIO_SHIFT) | (vlan->cfi ? VLAN_CFI_MASK : 0); |