From 49f702087453215b7b657b05eda26cbf861a2f83 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 20 Aug 2005 17:26:30 -0700 Subject: [PATCH] --- yaml --- r: 6392 b: refs/heads/master c: 3e192beaf5ef260a31e84a12c0a04eff2eec02ab h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/ipv4/ip_input.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index a26b952e919d..306f916ab88e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d245407e758b14c464c609b632873f85709360c7 +refs/heads/master: 3e192beaf5ef260a31e84a12c0a04eff2eec02ab diff --git a/trunk/net/ipv4/ip_input.c b/trunk/net/ipv4/ip_input.c index 48e4ddc1e337..7e78095baef1 100644 --- a/trunk/net/ipv4/ip_input.c +++ b/trunk/net/ipv4/ip_input.c @@ -333,16 +333,16 @@ static inline int ip_rcv_options(struct sk_buff *skb) static inline int ip_rcv_finish(struct sk_buff *skb) { - struct net_device *dev = skb->dev; struct iphdr *iph = skb->nh.iph; - int err; /* * Initialise the virtual path cache for the packet. It describes * how the packet travels inside Linux networking. */ - if (skb->dst == NULL) { - if ((err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))) { + if (likely(skb->dst == NULL)) { + int err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, + skb->dev); + if (unlikely(err)) { if (err == -EHOSTUNREACH) IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS); goto drop; @@ -350,7 +350,7 @@ static inline int ip_rcv_finish(struct sk_buff *skb) } #ifdef CONFIG_NET_CLS_ROUTE - if (skb->dst->tclassid) { + if (unlikely(skb->dst->tclassid)) { struct ip_rt_acct *st = ip_rt_acct + 256*smp_processor_id(); u32 idx = skb->dst->tclassid; st[idx&0xFF].o_packets++;