Skip to content

Commit

Permalink
bridge: is PACKET_LOOPBACK unlikely()?
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Horman authored and David S. Miller committed Aug 23, 2010
1 parent fcb12fd commit c2368e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit c2368e7

Please sign in to comment.