dect
/
linux-2.6
Archived
13
0
Fork 0

[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>
This commit is contained in:
Thomas Graf 2005-08-20 17:25:52 -07:00 committed by David S. Miller
parent 5861524241
commit e9c6042273
1 changed files with 1 additions and 1 deletions

View File

@ -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);