bridge: is PACKET_LOOPBACK unlikely()?
Subsystems (3)
RFC 1/1 bridge: is PACKET_LOOPBACK unlikely()?
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 <[email protected]>
Signed-off-by Simon Horman <[email protected]>
net/bridge/br_input.c +1 -1
@@ -141,7 +141,7 @@ struct sk_buff *br_handle_frame(struct sconst 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))
David Miller
maintainerFrom: Simon Horman <[email protected]>
Date: Mon, 23 Aug 2010 12:35:32 +0900
Quoted 6 lines
While looking at using
netdev_rx_handler_registerfor openvswitch Jesse Gross suggested that anunlikely()might be worthwhile in that code. I'm interested to see if its appropriate for the bridge code.Cc Jesse Gross <[email protected]>Signed-off-by Simon Horman <[email protected]>
Seems reasonable to me, applied to net-next-2.6