diff options
author | Thomas Graf <tgraf@suug.ch> | 2005-08-20 17:25:52 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 16:02:57 -0700 |
commit | e9c604227391308b185aa6b14c7f93b0a0c2e51b (patch) | |
tree | 7562b6a91b5dacd25e19086a354cde1a281471af | |
parent | 58615242417638794a5ba299c49e3fbd6f47c2a3 (diff) | |
download | kernel_goldelico_gta04-e9c604227391308b185aa6b14c7f93b0a0c2e51b.zip kernel_goldelico_gta04-e9c604227391308b185aa6b14c7f93b0a0c2e51b.tar.gz kernel_goldelico_gta04-e9c604227391308b185aa6b14c7f93b0a0c2e51b.tar.bz2 |
[IPV4]: Avoid common branch misprediction while checking csum in ip_rcv()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/ip_input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 322b082..6a06e15 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c @@ -400,7 +400,7 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, iph = skb->nh.iph; - if (ip_fast_csum((u8 *)iph, iph->ihl) != 0) + if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl))) goto inhdr_error; len = ntohs(iph->tot_len); |