OSDN Git Service

hv_netvsc: use skb_get_hash() instead of a homegrown implementation
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 25 Jan 2016 15:00:41 +0000 (16:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Mar 2017 10:13:18 +0000 (12:13 +0200)
commit6cc5b73d79697e1a529249572ac022192f1ddffd
treeeaba9d9b6c0bd2bdb633ddc7b935e1789544db55
parentcea050150323a2c09efc316f0272af053e0b87e2
hv_netvsc: use skb_get_hash() instead of a homegrown implementation

commit 757647e10e55c01fb7a9c4356529442e316a7c72 upstream.

Recent changes to 'struct flow_keys' (e.g commit d34af823ff40 ("net: Add
VLAN ID to flow_keys")) introduced a performance regression in netvsc
driver. Is problem is, however, not the above mentioned commit but the
fact that netvsc_set_hash() function did some assumptions on the struct
flow_keys data layout and this is wrong.

Get rid of netvsc_set_hash() by switching to skb_get_hash(). This change
will also imply switching to Jenkins hash from the currently used Toeplitz
but it seems there is no good excuse for Toeplitz to stay.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/netvsc_drv.c