Commit 4c87454a authored by Haiyang Zhang's avatar Haiyang Zhang Committed by David S. Miller
Browse files

hyperv: Add IPv6 into the hash computation for vRSS



This will allow the workload spreading via vRSS for IPv6.

Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent acf722f7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -193,7 +193,9 @@ static bool netvsc_set_hash(u32 *hash, struct sk_buff *skb)
	struct flow_keys flow;
	int data_len;

	if (!skb_flow_dissect(skb, &flow) || flow.n_proto != htons(ETH_P_IP))
	if (!skb_flow_dissect(skb, &flow) ||
	    !(flow.n_proto == htons(ETH_P_IP) ||
	      flow.n_proto == htons(ETH_P_IPV6)))
		return false;

	if (flow.ip_proto == IPPROTO_TCP)
+2 −1
Original line number Diff line number Diff line
@@ -728,7 +728,8 @@ int rndis_filter_set_rss_param(struct rndis_device *rdev, int num_queue)
	rssp->hdr.size = sizeof(struct ndis_recv_scale_param);
	rssp->flag = 0;
	rssp->hashinfo = NDIS_HASH_FUNC_TOEPLITZ | NDIS_HASH_IPV4 |
			 NDIS_HASH_TCP_IPV4;
			 NDIS_HASH_TCP_IPV4 | NDIS_HASH_IPV6 |
			 NDIS_HASH_TCP_IPV6;
	rssp->indirect_tabsize = 4*ITAB_NUM;
	rssp->indirect_taboffset = sizeof(struct ndis_recv_scale_param);
	rssp->hashkey_size = HASH_KEYLEN;