Skip to content

Commit df9f540

Browse files
shemmingerdavem330
authored andcommitted
hv_netvsc: flag software created hash value
When the driver needs to create a hash value because it was not done at higher level, then the hash should be marked as a software not hardware hash. Fixes: f72860a ("hv_netvsc: Exclude non-TCP port numbers from vRSS hashing") Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 39069fa commit df9f540

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/net/hyperv/netvsc_drv.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ static inline u32 netvsc_get_hash(
285285
else if (flow.basic.n_proto == htons(ETH_P_IPV6))
286286
hash = jhash2((u32 *)&flow.addrs.v6addrs, 8, hashrnd);
287287
else
288-
hash = 0;
288+
return 0;
289289

290-
skb_set_hash(skb, hash, PKT_HASH_TYPE_L3);
290+
__skb_set_sw_hash(skb, hash, false);
291291
}
292292

293293
return hash;
@@ -795,8 +795,7 @@ static struct sk_buff *netvsc_alloc_recv_skb(struct net_device *net,
795795
skb->protocol == htons(ETH_P_IP))
796796
netvsc_comp_ipcsum(skb);
797797

798-
/* Do L4 checksum offload if enabled and present.
799-
*/
798+
/* Do L4 checksum offload if enabled and present. */
800799
if (csum_info && (net->features & NETIF_F_RXCSUM)) {
801800
if (csum_info->receive.tcp_checksum_succeeded ||
802801
csum_info->receive.udp_checksum_succeeded)

0 commit comments

Comments
 (0)