Skip to content

Commit

Permalink
hyperv: Add IPv6 into the hash computation for vRSS
Browse files Browse the repository at this point in the history
This will allow the workload spreading via vRSS for IPv6.

Signed-off-by: Haiyang Zhang <[email protected]>
Reviewed-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
haiyangz authored and davem330 committed Oct 30, 2014
1 parent acf722f commit 4c87454
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion drivers/net/hyperv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/hyperv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4c87454

Please sign in to comment.