diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-05-26 14:50:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-27 06:25:57 -0400 |
commit | 745898eaf0eb7a04a56dec1188d9148259510863 (patch) | |
tree | c4ad29d7bc6e8ceb5a96f68cee363f871b2bf17f /net/ipv4/tcp.c | |
parent | 78d3fd0b7de844a6dad56e9620fc9d2271b32ab9 (diff) |
tcp: Optimise GRO port comparisons
Instead of doing two 16-bit operations for the source/destination
ports, we can do one 32-bit operation to take care both.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 7a0f0b27bf1f..ff6adecc54c6 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2544,7 +2544,7 @@ struct sk_buff **tcp_gro_receive(struct sk_buff **head, struct sk_buff *skb) | |||
2544 | 2544 | ||
2545 | th2 = tcp_hdr(p); | 2545 | th2 = tcp_hdr(p); |
2546 | 2546 | ||
2547 | if ((th->source ^ th2->source) | (th->dest ^ th2->dest)) { | 2547 | if (*(u32 *)&th->source ^ *(u32 *)&th2->source) { |
2548 | NAPI_GRO_CB(p)->same_flow = 0; | 2548 | NAPI_GRO_CB(p)->same_flow = 0; |
2549 | continue; | 2549 | continue; |
2550 | } | 2550 | } |