hyperv: Add IPv6 into the hash computation for vRSS
authorHaiyang Zhang <haiyangz@microsoft.com>
Thu, 30 Oct 2014 21:07:17 +0000 (14:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Oct 2014 20:10:04 +0000 (16:10 -0400)
This will allow the workload spreading via vRSS for IPv6.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c
drivers/net/hyperv/rndis_filter.c

index 78ec33f5100b183e31bfc949763acfa4685b9836..3295e4ee9dbb19ee821370833e545ac944366610 100644 (file)
@@ -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)
index 2b86f0b6f6d18adf8b13bdba263a426a4d89aaa6..ccce6f24b009c797b777f94d690e1c76e382e136 100644 (file)
@@ -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;