Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ced84017 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Greg Kroah-Hartman
Browse files

hv_netvsc: flag software created hash value



[ Upstream commit df9f540ca74297a84bafacfa197e9347b20beea5 ]

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: f72860af ("hv_netvsc: Exclude non-TCP port numbers from vRSS hashing")
Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0d9231e2
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -295,9 +295,9 @@ static inline u32 netvsc_get_hash(
		else if (flow.basic.n_proto == htons(ETH_P_IPV6))
			hash = jhash2((u32 *)&flow.addrs.v6addrs, 8, hashrnd);
		else
			hash = 0;
			return 0;

		skb_set_hash(skb, hash, PKT_HASH_TYPE_L3);
		__skb_set_sw_hash(skb, hash, false);
	}

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

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