]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
bridge: is PACKET_LOOPBACK unlikely()?
authorSimon Horman <horms@verge.net.au>
Sun, 22 Aug 2010 17:35:32 +0000 (17:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Aug 2010 04:09:04 +0000 (21:09 -0700)
While looking at using netdev_rx_handler_register for openvswitch Jesse
Gross suggested that an unlikely() might be worthwhile in that code.
I'm interested to see if its appropriate for the bridge code.

Cc: Jesse Gross <jesse@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_input.c

index 826cd5221536cadd3b0d13dfec2e9d3639b92a93..6d04cfdf45413257d3055f876632be64ed3abbd7 100644 (file)
@@ -141,7 +141,7 @@ struct sk_buff *br_handle_frame(struct sk_buff *skb)
        const unsigned char *dest = eth_hdr(skb)->h_dest;
        int (*rhook)(struct sk_buff *skb);
 
-       if (skb->pkt_type == PACKET_LOOPBACK)
+       if (unlikely(skb->pkt_type == PACKET_LOOPBACK))
                return skb;
 
        if (!is_valid_ether_addr(eth_hdr(skb)->h_source))