net: Check skb->rxhash in gro_receive
authorTom Herbert <therbert@google.com>
Wed, 15 Jan 2014 16:58:06 +0000 (08:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jan 2014 00:22:54 +0000 (16:22 -0800)
commit0b4cec8c2e872a6bc9146a001d7532f31023aed5
tree4f8553bbaac648dffb40b33c4a1422a6be066724
parent57bdf7f42be05640f8080b06844c94367ad1884b
net: Check skb->rxhash in gro_receive

When initializing a gro_list for a packet, first check the rxhash of
the incoming skb against that of the skb's in the list. This should be
a very strong inidicator of whether the flow is going to be matched,
and potentially allows a lot of other checks to be short circuited.
Use skb_hash_raw so that we don't force the hash to be calculated.

Tested by running netperf 200 TCP_STREAMs between two machines with
GRO, HW rxhash, and 1G. Saw no performance degration, slight reduction
of time in dev_gro_receive.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c